Skip to content

Instantly share code, notes, and snippets.

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

Seiji Toyama seiji

🏠
Working from home
View GitHub Profile
@seiji
seiji / jenkins-build-Unity-iPhone.sh
Created May 11, 2012 02:27
jenkins-build-Unity-iPhone-TestFlight
UNITY_APP_PATH=/Applications/Unity3.4/Unity.app/Contents/MacOS/Unity
UNITY_PROJECT_PATH=$WORKSPACE/Unity
UNITY_EDITOR_LOG_PATH=~/Library/Logs/Unity/Editor.log
XCODE_PROJECT_PATH=$WORKSPACE/Unity-iPhone
KEYCHAIN_LOCATION=~/Library/Keychains/login.keychain
XCODE_PROJECT_CONFIG_PATH=$XCODE_PROJECT_PATH/Unity-iPhone.xcodeproj
### EDIT AREA START
UNITY_BATCH_EXECUTE_METHOD=XXXXX
#!/usr/bin/env ruby
require 'redis'
class UserNotFoundException < Exception; end
class UserRanking
KEY="ranking"
def initialize(user_id)
@redis= Redis.new
@seiji
seiji / gist:2716306
Created May 17, 2012 04:18
input_userauth_request
a
abbey
abbie
abby
abc
abc123
abcd
abcde
abcdef
abeni
@seiji
seiji / new_linode_centos6.markdown
Created May 17, 2012 04:48 — forked from mmrwoods/new_linode_centos6.markdown
Make me a new CentOS linode

Make me a new CentOS linode

Notes:

  • Change, me, myhost, myip etc. to your username, hostname, ip address and so on.
  • Run all commands as root unless otherwise directed.
  • You might want to look at mounting /var and /home on separate partitions.
  • I've just allowed all members of the wheel group to operate as root. This is the height of laziness and highlights the fact that I'm just a developer that's stolen a sysadmin's woolly hat. It works fine, but the phrase "can do better" springs to mind.
#!/usr/bin/env ruby
require 'socket'
if $0 == __FILE__
# write this
gs = TCPServer.open("", 12345)
socks= [gs]
addr= gs.addr
addr.shift
@seiji
seiji / gist:3010771
Created June 28, 2012 11:26
redis-benchmark-sortedset.patch
diff --git src/redis-benchmark.c src/redis-benchmark.c
index 19eb491..34ee0d3 100644
--- src/redis-benchmark.c
+++ src/redis-benchmark.c
@@ -73,6 +73,10 @@ static struct config {
int loop;
int idlemode;
char *tests;
+
+ /* add zincr */
#!/usr/bin/env ruby
require 'mongo-hadoop'
MongoHadoop.map do |document|
if document['user'] and document['user']['time_zone']
[{ :_id => document['user']['time_zone'], :count => 1 }]
else
[{ :_id => 'Unknown', :count => 1 }]
end
end
#!/usr/bin/env ruby
require 'mongo-hadoop'
MongoHadoop.reduce do |key, values|
count = 0
values.each do |value|
count += 1
end
{:_id => key, :count => count}
end
#!/usr/bin/osascript
on run argv
tell application "Google Chrome"
tell window 1
set newTab to make new tab with properties {URL:item 1 of argv}
end tell
end tell
end run
@seiji
seiji / gist:3915593
Created October 19, 2012 00:33
Install Ricty
brew install fontforge
mkdir $HOME/tmp
cd $HOME/tmp
curl -L -o $HOME/tmp/Inconsolata.otf http://levien.com/type/myfonts/Inconsolata.otf
curl -L -o $HOME/tmp/3.2.0.zip https://github.com/yascentur/Ricty/zipball/3.2.0
curl -L -o $HOME/tmp/migu-1m-20120411-2.zip "http://sourceforge.jp/frs/redir.php?m=jaist&f=%2Fmix-mplus-ipa%2F56156%2Fmigu-1m-20120411-2.zip"
unzip $HOME/tmp/3.2.0.zip
unzip $HOME/tmp/migu-1m-20120411-2.zip