Skip to content

Instantly share code, notes, and snippets.

View shinka-cb's full-sized avatar
🏠
Working from home

shinka-cb

🏠
Working from home
View GitHub Profile
#!/bin/bash
# Usage: ./make_iTunesPlus.sh hoge.wav foo.wav ...
PRE_IFS=$IFS
IFS=$'\n'
for song in $@; do
echo "Processing: ${song}"
filename=$(basename $song)
afconvert $song $filename.caf -d 0 -f caff --soundcheck-generate
@shinka-cb
shinka-cb / sushiZip.hs
Last active August 29, 2015 14:23
sushiZip
data Edible = 🍚 | 🐟 | 🍣 deriving (Show)
gohan = repeat 🍚
fish = repeat 🐟
f:: Edible -> Edible -> Edible
f 🍚 🐟 = 🍣
sushiZip = zipWith f gohan fish
@shinka-cb
shinka-cb / Beerstack.rb
Last active August 29, 2015 14:04
Infinite Beer
class Array
def pop # Overrides original Array class
"🍺" # Just Beer
end
end
beerstack = Array.new
loop do
print beerstack.pop
@shinka-cb
shinka-cb / Spanish Omelette.markdown
Last active August 29, 2015 14:03
Spanish Omelette

スペインオムレツ

難易度高め(だからどうした

材料

  • 卵 5個
  • 塩コショウ 適量
  • みじん切りにしたパセリ
  • 牛乳少々 (Optional)
@shinka-cb
shinka-cb / cabbage salad.markdown
Last active December 22, 2015 13:58
cabbage salad

キャベツの付け合せ

朝食であと一品!という時に。

材料

  • キャベツ 1/4玉
  • ツナ缶 1缶
  • マヨネーズ
@shinka-cb
shinka-cb / .zshrc
Created October 17, 2011 10:20
パス名が長くなったら途中を異なる色で(ryと短縮するzshのプロンプト
PROMPT="%B%{${fg[blue]}%}%(5~.%-2~/%{${fg[cyan]}%}(ry%{${fg[blue]}%}/%2~.%~)%(!.#.$) %{${reset_color}%}%b"
@shinka-cb
shinka-cb / gist:1244767
Created September 27, 2011 10:23
A random method for "LTG (Lambda: The Gathering)" held in ICFP Programming Contest 2011
#!/bin/bash
opp()
{
read lr
case $lr in
1) read card; read slot;;
2) read slot; read card;;
esac
}