Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Kuniwak Kuniwak

I may be slow to respond.
Block or report user

Report or block Kuniwak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
taiki45 / fizzubzz.hs
Created Dec 17, 2013 を読んで、こう書けばモーナド♡って気持ち、表現できたのではとおもってみたりでし
View fizzubzz.hs
fizz x = if x `mod` 3 == 0 then Left "fizz" else Right x
buzz x = if x `mod` 5 == 0 then Left "buzz" else Right x
fizzbuzz x = if x `mod` 15 == 0 then Left "fizzbuzz" else Right x
number x = Left $ show x
doFizzBuzz x = either id id $ fizzbuzz x >>= buzz >>= fizz >>= number
main = foldr1 (>>) $ fmap putStrLn (fmap doFizzBuzz [1..])
View 絶望しかない.java
Set<String> keys = map.keySet();
for (String key : keys) {
//some condes
Set<String> keys = map.keySet();
String[] keyarray = keys.toString().split(",");
for(int i=0; i<keyarray.length; i++){
rch850 /
Created Sep 27, 2013
nc -w 10 $IRC_SERVER 6667 << EOF &>/dev/null
okapies /
Last active Dec 24, 2018
翻訳: ”命令型のコールバック、関数型のプロミス: Node が逸した最大の機会” by James Coglan

命令型のコールバック、関数型のプロミス: Node が逸した最大の機会

Original: "Callbacks are imperative, promises are functional: Node's biggest missed opportunity" by James Coglan

Translated by Yuta Okamoto (@okapies)


  • 訳者は JavaScript や Node.js に関する専門知識がほとんどありません。識者のツッコミをお待ちしております。「◯◯が分からない」等も歓迎です。
  • 元記事から構成を一部変更しています。また、関数型プログラミングに関する記述のうち、議論の骨子に絡まないものは省略しています。
cobyism /
Last active Sep 17, 2019
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

View entypo.css
@font-face {
font-family: 'EntypoRegular';
src: url('font/entypo.eot');
src: url('font/entypo.eot?#iefix') format('embedded-opentype'),
url('font/entypo.woff') format('woff'),
url('font/entypo.ttf') format('truetype'),
url('font/entypo.svg#EntypoRegular') format('svg');
font-weight: normal;
font-style: normal;
View codegolf_circle_75.js
for(s='',x=y=n=40;y+n;s+='-*\n'[x+n?x*x--+y*y<900|0:(x=n,y-=2,2)]);return s
mitukiii /
Created Dec 7, 2012
percol 入れて zsh と組み合わせたら超便利

percol 入れて zsh と組み合わせたら超便利


percol とは

percol は入力の1行を1候補として,部分一致かつ AND 検索で絞り込みし,選択した候補を出力するコマンドです.端的に言えば Emacs の anything.el のコマンド版です.
jboner / latency.txt
Last active Sep 21, 2019
Latency Numbers Every Programmer Should Know
View latency.txt
Latency Comparison Numbers (~2012)
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
waltarix / tmux-do-not-combine-utf8.patch
Last active Mar 11, 2018
tmux: Fix a problems with displaying Ambiguous-width, Japanese Dakuten and Handakuten signs.
View tmux-do-not-combine-utf8.patch
diff --git a/screen-write.c b/screen-write.c
index 15f8d07..8a175a6 100644
--- a/screen-write.c
+++ b/screen-write.c
@@ -1334,6 +1334,7 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc)
/* If the width is zero, combine onto the previous character. */
+ /*
if (width == 0) {
You can’t perform that action at this time.