Skip to content

Instantly share code, notes, and snippets.

View grauwoelfchen's full-sized avatar
🐺
Typing with carved wooden keyboard ᕕ( ᐛ )ᕗ

Yasha grauwoelfchen

🐺
Typing with carved wooden keyboard ᕕ( ᐛ )ᕗ
View GitHub Profile
sudo gem install schacon-ticgit --source=http://gems.github.com
sudo apt-get install ticgit
git push origin ticgit
push = refs/heads/ticgit:refs/heads/ticgit
@grauwoelfchen
grauwoelfchen / google.rb
Created March 3, 2011 01:43
This is a simple command for google search.
#!/usr/bin/env ruby
require 'cgi'
system "open \"http://www.google.co.jp/search?&hl=ja&q=#{CGI.escape(ARGV.first)}\""
@grauwoelfchen
grauwoelfchen / moxssg.rb
Created March 3, 2011 03:11
This is a useful command for moxssg members
#!/usr/bin/env ruby
require 'cgi'
site = CGI.escape(ARGV.first ||'')
default = 'http://www.moxssg.com/'
case site
when ''
url = default
@grauwoelfchen
grauwoelfchen / checkip.rb
Created March 3, 2011 05:13
This is simple checker of current ip address.
#!/usr/bin/env ruby
cmd = 'w3m'
if open("| which #{cmd} 2>/dev/null") {|f| f.gets}
system "w3m http://current-ip-address.heroku.com -dump | awk '{print $4}'"
else
puts "please install \"w3m\"."
end
@grauwoelfchen
grauwoelfchen / gist:897564
Created April 1, 2011 00:58
cron of mailman.
#
# Every 5 mins, try to gate news to mail. You can comment this one out
# if you don't want to allow gating, or don't have any going on right now,
# or want to exclusively use a callback strategy instead of polling.
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/bin/python -S /usr/share/mailman/cron/gate_news
#
#
@grauwoelfchen
grauwoelfchen / gist:897603
Created April 1, 2011 01:40
pageTitle of CakePHP 1.3
// 1.2
$this->pageTitle = 'Cute Blog';
// with h1
<h1><?php e($this->pageTitle = 'Wonderful Blog'); ?></h1>
// 1.3
$this->set('title_for_layout', 'Nice Blog');