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
@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
}
@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 / cabbage salad.markdown
Last active December 22, 2015 13:58
cabbage salad

ใ‚ญใƒฃใƒ™ใƒ„ใฎไป˜ใ‘ๅˆใ›

ๆœ้ฃŸใงใ‚ใจไธ€ๅ“๏ผใจใ„ใ†ๆ™‚ใซใ€‚

ๆๆ–™

  • ใ‚ญใƒฃใƒ™ใƒ„ 1/4็މ
  • ใƒ„ใƒŠ็ผถ 1็ผถ
  • ใƒžใƒจใƒใƒผใ‚บ
@shinka-cb
shinka-cb / Spanish Omelette.markdown
Last active August 29, 2015 14:03
Spanish Omelette

ใ‚นใƒšใ‚คใƒณใ‚ชใƒ ใƒฌใƒ„

้›ฃๆ˜“ๅบฆ้ซ˜ใ‚๏ผˆใ ใ‹ใ‚‰ใฉใ†ใ—ใŸ

ๆๆ–™

  • ๅต 5ๅ€‹
  • ๅกฉใ‚ณใ‚ทใƒงใ‚ฆ ้ฉ้‡
  • ใฟใ˜ใ‚“ๅˆ‡ใ‚Šใซใ—ใŸใƒ‘ใ‚ปใƒช
  • ็‰›ไนณๅฐ‘ใ€… (Optional)
@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 / 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
#!/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