Skip to content

Instantly share code, notes, and snippets.

View yyuu's full-sized avatar
👽
Working from home

Yamashita, Yuu yyuu

👽
Working from home
View GitHub Profile
@yyuu
yyuu / Main.scala
Created March 18, 2014 14:28
quick sort with using scala.concurrent.forkjoin
import scala.concurrent.forkjoin.ForkJoinPool
import scala.concurrent.forkjoin.RecursiveTask
object Main {
def main(args: Array[String]) {
val pool = new ForkJoinPool()
println(s"${Thread.currentThread.getId}: unsorted=" + args.mkString(", "))
val sorted = pool.invoke(new QuickSortingTask(args))
println(s"${Thread.currentThread.getId}: sorted=" + sorted.mkString(", "))
}
@niyaton
niyaton / rbenv_init.zsh
Created August 19, 2013 04:29
eval (rbenv init -) とか重いんですよ.
# Initialize rbenv.
# "eval rbenv init -" is much heavy. use cached script.
if [ -n "$(printenv TMUX)" ]; then
source $ZSHHOME/rbenv.init-no-rehash
else
source $ZSHHOME/rbenv.init
fi
check_rbenv_init() {
rbenv init - | diff - $ZSHHOME/rbenv.init
@gipi
gipi / gist:1321981
Last active September 27, 2015 19:47
Pretty print #json with #python #oneliner
echo '{"foo": "lorem", "bar": "ipsum"}' | python -mjson.tool
@doryokujin
doryokujin / gist:1258927
Created October 3, 2011 11:33
manage rvm and gem using fabric
# -*- coding: utf-8 -*-
#
# install: http://morgangoose.com/blog/2011/01/06/using-the-parallel-branch-of-fabric/
# document: http://docs.fabfile.org/en/1.2.0/index.html
#
import os
from fabric.api import *
from fabric.decorators import *