Public Gists by anildigital

Gravatar
Sun Aug 30 07:40:08 -0700 2009
1
2
3
# put this in ~/.bash_profile or whatever
ruby_or_irb () {
  if [ "$1" == "" ]; then
Gravatar
Sat Aug 29 00:34:20 -0700 2009
1
2
3
      === Epic Snow Leopard Upgrayyyyd Guide ===
 
Son, you’re now living in the land of 64-bit systems.
Gravatar
Wed Aug 26 10:39:20 -0700 2009
1
2
3
#!/usr/bin/python
 
# Simple Python script to test SMTP settings
Gravatar
Mon Aug 17 10:02:48 -0700 2009
1
2
3
1. ARR INTRO & ARR Enjoying the Song by Kailash Kher
[http://www.youtube.com/watch?v=JQ0sxCcpoco](http://www.youtube.com/watch?v=JQ0sxCcpoco)
 
Gravatar
Sun Jul 26 00:23:29 -0700 2009
1
2
3
# >> First workflow
git svn clone <svn_repo>
 
Gravatar
Fri Jul 17 22:46:01 -0700 2009
1
2
3
- simple
- public over private
- personal vanity
Gravatar
Tue Jun 23 02:18:42 -0700 2009
1
2
3
require 'test/unit'
require 'benchmark'
 
Gravatar
Tue Jun 23 00:25:07 -0700 2009
1
2
# run code from command line with url
ruby -ropen-uri -e 'eval(open("http://url").read)'
Gravatar
Mon Jun 22 21:54:36 -0700 2009
1
2
3
require 'test/unit'
class TestHashSize < Test::Unit::TestCase
 
Gravatar
Fri Jun 19 06:12:57 -0700 2009
1
2
3
# Bash snippet to open new shells in most recently visited dir.
# Useful if you want to open a new terminal tab at the present
# tab's location.
Gravatar
Thu Jun 18 10:45:16 -0700 2009
1
2
3
module Enumerable
  def return
    each do |i|
Gravatar
Thu May 28 21:41:02 -0700 2009
1
2
3
~$ gem list -r -s http://gems.rubyforge.org | wc -l
    4760
~$ gem list -r -s http://gems.github.com | wc -l
Gravatar
Sat May 23 12:27:59 -0700 2009
1
2
3
#/Library/Ruby/Gems/1.8/gems/mysql-2.7$ ARCHFLAGS="-arch i386" ruby extconf.rb --with-mysql-dir=/usr/local/mysqlchecking for mysql_query() in -lmysqlclient... yes
checking for mysql_ssl_set()... yes
checking for mysql.h... yes
Gravatar
Sat May 23 02:49:45 -0700 2009
1
2
3
cd /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7
gem install mysql --
--with-mysql-config=/usr/local/mysql/bin/mysql_config
Gravatar
Thu May 21 05:24:04 -0700 2009
1
2
s3cmd setacl --acl-public s3://<s3 file/folder> path
s3cmd.rb put MyBucket:TheFile.txt x-amz-acl:public-read
Gravatar
Mon May 18 23:09:53 -0700 2009
1
2
#Uploading files from command line
curl -k -F filedata=@office_pic.jpg -F "asset_type=bg" http://localhost/upload/upload_asset
Gravatar
Sun May 10 02:53:40 -0700 2009
1
2
# Setting up SOCKS proxy
ssh -N -D 4000 anil@icanhasruby.com
Gravatar
Thu May 07 10:17:49 -0700 2009
1
2
3
# first you'll want to create a gist then `git clone` the private url
# second you'll want to run this script in the gist's directory
loop do
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"]}")'