Skip to content

Instantly share code, notes, and snippets.

@shenqi
shenqi / update.rb
Created August 17, 2010 13:17
sync everything at start-up and growl the result
#!/usr/bin/env ruby -Ku
require 'rbconfig'
require 'rubygems'
require 'meow'
#絶対パスで指定。 '/'でクローズ
REPODIR = '/Users/shenqi/src/'
PERLDIR = '/Users/shenqi/perl5/'
@shenqi
shenqi / seikei.rb
Created August 18, 2010 04:57
fetch livedoor weather and growl it!
#!/usr/bin/env ruby -Ku
require 'net/http'
require 'rubygems'
require 'rmagick'
include Magick
class Kakumaru
def initialize(iconurl)
#initialize
git config --global user.name hoge
git config --global user.email hoge@example.com
#delete ゴミ files
find . -name .DS_Store -print -delete
#find . -name Thumbs.db -print -delete
#ignore setting
echo /hoge/hoge > .gitignore
#!/usr/bin/env ruby -Ku
require 'net/http'
require 'rubygems'
require 'nokogiri'
require 'meow'
TOPURL = 'http://baseball.yahoo.co.jp/npb/schedule/'
ffmpeg -i $argv[1] -vcodec libx264 -s 640x360 -b 600k -vpre faster -vpre ipod640 -r 24000/1001 -acodec libfaac -ac 2 -ar 48000 -ab 192k -threads 2 -f ipod $argv[2].m4v
#!/usr/bin/env ruby -Ku
require 'rubygems'
require 'meow'
LIBDIR = '/Users/shenqi/Media/Music/' #set the path for itunes music library
def gomi_remover(string)
return (`echo "#{string}" | iconv -f UTF-8-MAC -t UTF-8`).chomp
--- ./android-sdk-mac_86/tools/android.bak 2010-11-18 08:46:46.000000000 +0000
+++ ./android-sdk-mac_86/tools/android 2010-12-09 05:53:23.000000000 +0000
@@ -63,7 +63,7 @@
# Mac OS X needs an additional arg, or you get an "illegal thread" complaint.
if [ `uname` = "Darwin" ]; then
- os_opts="-XstartOnFirstThread"
+ os_opts="-XstartOnFirstThread -d32"
else
os_opts=
@shenqi
shenqi / .mozconfig
Created January 23, 2011 19:17
.mozconfig for Firefox on Intel Processor (32-bit compilation: Mac OS X 10.6.6)
. $topsrcdir/browser/config/mozconfig
CC="gcc-4.2 -arch i386"
CXX="g++-4.2 -arch i386"
HOST_CC="gcc-4.2"
HOST_CXX="g++-4.2"
RANLIB=ranlib
AR=ar
AS=$CC
LD=ld
STRIP="strip -x -S"
@shenqi
shenqi / .pentadacylrc
Created January 24, 2011 15:37
:openコマンドで検索クエリーが渡されないので応急処置
command -nargs=+ tempopen open http://www.google.co.jp/search?hl=ja&q=<args>
command -nargs=+ temptabopen tabopen http://www.google.co.jp/search?hl=ja&q=<args>
map o -builtin :tempopen<Space>
map t -builtin :temptabopen<Space>
@shenqi
shenqi / .mozconfig
Created February 14, 2011 20:53
.mozconfig for Firefox on Intel Processor (64-bit compilation: Mac OS X 10.6.6)
. $topsrcdir/browser/config/mozconfig
CC="gcc-4.2 -arch x86_64"
CXX="g++-4.2 -arch x86_64"
HOST_CC="gcc-4.2"
HOST_CXX="g++-4.2"
RANLIB=ranlib
AR=ar
AS=$CC
LD=ld
STRIP="strip -x -S"