Skip to content

Instantly share code, notes, and snippets.

@shenqi
shenqi / classicfm.rb
Created February 22, 2012 01:22
Notify Classic.fm #NowPlaying
#!/usr/bin/env ruby -Ku
require 'net/http'
require 'rubygems'
require 'nokogiri'
require 'meow'
$appname = 'Classic.fm'
$image = '/Applications/Play.app/Contents/Resources/Play.icns'
@shenqi
shenqi / Tumblr.pm
Created March 1, 2011 22:29
Plagger::Plugin::Publish::Tumblr
package Plagger::Plugin::Publish::Tumblr;
use strict;
use warnings;
use Config::Pit;
use base qw( Plagger::Plugin );
use Encode;
use Time::HiRes qw(sleep);
use WWW::Tumblr;
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by UFRaw configure 0.17, which was
generated by GNU Autoconf 2.64. Invocation command line was
$ ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/ufraw/0.17 --without-gtk --without-gimp
## --------- ##
## Platform. ##
@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"
@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 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"
--- ./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=
#!/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
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 'net/http'
require 'rubygems'
require 'nokogiri'
require 'meow'
TOPURL = 'http://baseball.yahoo.co.jp/npb/schedule/'