Skip to content

Instantly share code, notes, and snippets.

View pompopo's full-sized avatar
💭
🍜

pompopo pompopo

💭
🍜
View GitHub Profile
import 'dart:core';
Iterable<int> fib() sync* {
int first = 1;
int second = 1;
yield 1;
yield 1;
while (true) {
final next = first + second;
first = second;
import 'dart:core';
import 'dart:core' as prefix0;
import 'dart:mirrors';
class Author {
const Author(this.name, this.email);
final String name;
final String email;
}
import 'dart:core';
class A {
A(this.i);
A.double(int k) {
i = k * 2;
}
int i;
}
cat lib/l10n/intl_ja.arb | jq -r '.|with_entries(select(.key|contains("@")|not))|to_entries[]|.key + "=" + .value'
@pompopo
pompopo / sh.sh
Created July 4, 2019 03:17
絵文字スロット生成コマンド
# :a: :b: :o: の箇所を好きな絵文字に置き換える。
ruby -e "puts %i(:a: :b: :o:).repeated_permutation(3).map(&:join)" | pbcopy
@pompopo
pompopo / fizzbuzz.swift
Created July 3, 2018 07:14
Swift FizzBuzz
extension String: ExpressibleByIntegerLiteral {
public init(integerLiteral value: Int) {
if value % 15 == 0 {
self = "FizzBuzz"
} else if value % 3 == 0 {
self = "Fizz"
} else if value % 5 == 0 {
self = "Buzz"
} else {
self = String(value)
@pompopo
pompopo / index.md
Last active May 22, 2018 08:23
5/22 勉強会メモ

Reason

Reasonとは

  • https://reasonml.github.io/
  • Facebook製のOcaml方言
  • OCamlのライブラリもJSのライブラリも使える
  • Javascript、ネイティブに変換
  • Reactにも使える(作者が同じ)

最近はまたiOSやってる

#include "Arduboy.h"
Arduboy arduboy;
int x = 0;
int y = WIDTH / 2;
float dx = 0;
float dy = 0;
float g = 3;
void setup() {
arduboy.begin();
@pompopo
pompopo / gist:b7a43e1238dab8acfca0
Created May 13, 2015 08:30
使われてないPDFファイルを検索
#!/bin/sh
for pdf in `find . -name '*.pdf'`
do
name=`basename $pdf .pdf`
if ! grep -shqI "$name" `find . -type f -name "*.[mh]" -o -name "*.xib" -o -name "*.storyboard"`;then
echo "$pdf is not used"
fi
done