Public Gists by anildigital

Gravatar
Fri May 01 06:06:46 -0700 2009
1
2
3
#!/usr/bin/env ruby
 
unless ARGV[0]
Gravatar
Fri May 01 02:10:05 -0700 2009
1
ruby -r 'lib/jekyll/converters/wordpress.rb' -e 'Jekyll::WordPress.process("#{ENV["DB"]}", "#{ENV["USER"]}", "#{ENV["PASS"]}")'
Gravatar
Fri Apr 03 22:53:15 -0700 2009
1
2
3
# Monitor HTTP requests being made from your machine with a one-liner..
# Replace "en1" below with your network interface's name (usually en0 or en1)
sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*"
Gravatar
Wed Apr 01 23:14:43 -0700 2009
1
2
3
njero - http://neverlet.be
sutto - http://blog.ninjahideout.com
zapnap - http://blog.zerosum.org
Gravatar
Sun Mar 29 11:05:06 -0700 2009
1
2
rtunnel_client -c 127.0.0.1 -f 127.0.0.1:4000 -t 127.0.0.1:3000
rtunnel_client -c icanhasruby.com -f 4000 -t 127.0.0.1:3000
Gravatar
Sun Mar 22 00:50:43 -0700 2009
1
2
3
on Mac, listen it online
 
curl http://gist.github.com/raw/83108/a8367d1b8260c6e82d6eacd12297ec27f8dfbe6e/How%20to%20be%20a%20program%20manager.txt | say
Gravatar
Wed Mar 11 12:45:39 -0700 2009
1
# SVN requires 30x the disk space to store the same history
Gravatar
Wed Mar 11 11:51:07 -0700 2009
1
http://www.youtube.com/watch?v=mDx5qPqBaSI&eurl=http://github.com/adelcambre/
Gravatar
Wed Mar 11 03:01:13 -0700 2009
1
2
3
cd /usr/bin &&
sudo wget http://ack.googlecode.com/svn/tags/latest/ack &&
sudo chmod 755 ack &&
Gravatar
Sat Mar 07 00:46:00 -0800 2009
1
2
3
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# username@Machine ~/dev/dir[master]$ # clean working directory
Gravatar
Tue Mar 03 10:12:25 -0800 2009
1
2
3
# Convert tabs to spaces in your project
 
find . -type f -exec perl -i -pe 's/\t/ /g' \{\} \;
Gravatar
Wed Feb 25 15:05:08 -0800 2009
1
2
3
#!/usr/bin/env ruby
 
$existing_methods = []
Gravatar
Thu Jan 29 10:55:43 -0800 2009
1
2
3
Gravatar
Wed Jan 28 11:13:39 -0800 2009
1
2
3
(defservlet demo
  (GET "/"
    (html [:h1 "Hello World"]))
Gravatar
Tue Jan 13 03:38:32 -0800 2009
1
2
3
module Rack
  class Evil
    def initialize(app)
Gravatar
Wed Jan 07 21:58:53 -0800 2009
1
2
3
##
# command aliases
##
Gravatar
Sat Jan 03 08:49:28 -0800 2009
1
2
3
# Useful Ruby Snippets
 
# Returns current directory path
Gravatar
Wed Dec 31 09:07:40 -0800 2008
1
ruby -e '($>.sync=%w[.6 <_< .6 >_>]*5+%w[@_@ 1 >_< 1]).map{|e|sleep e.to_f;$><<"\r"+e}'
Gravatar
Sun Dec 28 07:01:50 -0800 2008
1
2
3
require 'rubygems'
require 'sinatra'
 
Gravatar
Sun Dec 28 05:47:25 -0800 2008
1
2
3
<% cheats = (`cheat sheets`).split("\n") %>
<% cheat = (`cheat #{cheats[rand(cheats.size)]}`).split("\n") %>
<body>