This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| http://nyan-mode.buildsomethingamazing.com/ |
| # PostgreSQL. Versions 7.4 and 8.x are supported. | |
| # | |
| # Install the pg driver: | |
| # gem install pg | |
| # On Mac OS X with macports: | |
| # gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config | |
| # On Windows: | |
| # gem install pg | |
| # Choose the win32 build. | |
| # Install PostgreSQL and put its /bin directory on your path. |
| pretty colour code for headers | |
| #474747 |
| #!/usr/local/bin/ruby | |
| # Creates a new repo called ARGV[0] | |
| @args = ARGV | |
| @args.each_with_index{|o,i| puts "#{i} : #{o}"} | |
| if not @args[1] =~ /(private|public)/ | |
| puts "invalid arguments: #{@args.inspect}" | |
| exit(1) |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| int main (int argc, char* argv[]) { | |
| if (argc < 2) { | |
| printf("Needs an argument\n"); | |
| exit(1); | |
| } |
| http://commondatastorage.googleapis.com/chromium-browser-continuous/index.html |
| namespace :db do | |
| desc "do active_record migrations" | |
| task :migrate do | |
| ActiveRecord::Base.logger = Logger.new(STDOUT) | |
| ActiveRecord::Migration.verbose = true | |
| ActiveRecord::Migrator.migrate("migrations") | |
| end | |
| end |