Skip to content

Instantly share code, notes, and snippets.

View ppworks's full-sized avatar
🏠
Working from home

Naoto Koshikawa ppworks

🏠
Working from home
View GitHub Profile
@ppworks
ppworks / english_numerals.rb
Created June 2, 2012 05:31
minatork01 english numerals
#!/usr/bin/env ruby
num = ARGV.first.to_i
nums1 = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']
nums10 = ['ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen', 'eighteen', 'nineteen']
if num < 10
puts nums1[num]
elsif 10 <= num && num < 20
@ppworks
ppworks / amida.rb
Created June 2, 2012 05:14
minatork01 amidakuji
#!/usr/bin/env ruby
num = ARGV[0].to_i
# header
header = 'A'
print ' '
headers = []
num.times do|i|
headers << ([header.bytes.to_a[0] + i]).pack('U*')
@ppworks
ppworks / .gitignore
Created May 13, 2012 06:39
.gitignore for objective-c
build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*.xcworkspace
@ppworks
ppworks / gist:2621821
Created May 6, 2012 11:44
kintain仕様

仕様

家出た時間、会社ついた時間、会社出た時間、家ついた時間だけを登録するアプリ。

共通

  • ログインする

イベント記録

@ppworks
ppworks / logs.md
Created April 29, 2012 00:59
p4dhack logs for designer

p4dhack logs for designer

パートナーへ伝える用のgist

git clone〜bundle install

mkdir work # お好きなところ
cd work
git clone git://github.com/ppworks/p4dhack.git
@ppworks
ppworks / idea.md
Created April 28, 2012 10:44
idea for #p4dhack

アイデア

人を勝手にメンターにするサービス。 #p4dhack

— PP worksさん (@ppworks) 4月 16, 2012
<script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

愛妻弁当食っているリア充を晒すサービス #p4dhack

— PP worksさん (@ppworks) 4月 16, 2012
<script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

家出た時間、会社ついた時間、会社出た時間、家ついた時間だけを登録するアプリ。 #p4dhack— PP worksさん (@ppworks)

@ppworks
ppworks / roman.rb
Created April 26, 2012 03:49
Convert a Number into Roman Numerals.
module Roman
CHAR = "IVXLCDM"
def self.to_num n
return "" if n <= 0 || 5000 <= n
str = sprintf("%04d", n).reverse!
res = ''
4.times do|i|
res = "#{roman_char(str[i], i*2)}#{res}"
end
res
@ppworks
ppworks / gist:2296716
Created April 4, 2012 00:37
facebook mobile hack tokyo 2012 memo
  • ファーストセッション
    • 紹介
      • Netflixのシェア事例
      • People want to talk to one another
        • sharing is a means to an end
        • the conversation is the end
        • build experiences and products which meet this need
        • sharing should be organic and natural, not incentivised
          or forced.
      • 用語
@ppworks
ppworks / gist:2191331
Created March 25, 2012 04:11
heroku pgbackups:capture error
heroku pgbackups:capture --expire --app welove
SHARED_DATABASE (DATABASE_URL)  ----backup--->  b005

Pending... /
Pending... |

やたら長いので、、、

Ctrl + C

@ppworks
ppworks / gist:2009978
Created March 10, 2012 03:44
install vim for rails

support clipboard

see https://gist.github.com/721952

brew install https://raw.github.com/gist/721952/e99293dc36c9b5c27aec0a4024b848ce50b9b126/vim.rb --big

install vundle