Saturday, October 29, 2011

Iron man goodies

ohh yes I am an Iron Man fan... who wouldnt want to be one...

wish list of Iron man stuff one must have :D
- The Killer Costume Party gear... The Iron man Helmet...
http://www.ebay.in/itm/Iron-Man-Deluxe-Helmet-/270831607595?pt=LH_DefaultDomain_203&hash=item3f0ed25f2b

and few action figures...

Tuesday, August 30, 2011

setting up a git repo at your domain hosting provider..
pre requisite - git should be installed there

follow
http://railstips.org/blog/archives/2008/11/23/gitn-your-shared-host-on/

Monday, August 22, 2011

Capistrano for dummies

the bare basics..
http://www.softiesonrails.com/2007/4/5/the-absolute-moron-s-guide-to-capistrano
http://teachmetocode.com/screencasts/basic-deployment-with-capistrano/

Wednesday, June 15, 2011

Rails to MySQL data types

MySQL Column Data Type to Ruby class type (when using ActiveRecord)

MySQL Data Type Empty Ruby Class Ruby Class
bigint NilClass Bignum
binary String String
blob String String
bool NilClass TrueClass
FalseClass
char String String
date NilClass Date
datetime NilClass Time
decimal NilClass Fixnum
double NilClass Float
enum String String
float NilClass Float
int NilClass Bignum
longblob String String
longtext String String
mediumblob String String
mediumint NilClass Fixnum
mediumtext String String
set NilClass String
smallint NilClass Fixnum
text String String
time NilClass Time
timestamp NilClass Time
tinyblob String String
tinyint NilClass Fixnum
tinyint(1) NilClass TrueClass
FalseClass
tinytext String String
varbinary String String
varchar String String
year NilClass String

For completeness sake, here's a summary of Rails migration types and their MySQL column data types.
Rails Migration Type to MySQL Column Data Type

Rails Migration Symbol MySQL Data Type
:binary blob
:boolean tinyint(1)
:date date
:datetime datetime
:decimal decimal
:float float
:integer int(11)
:string varchar(255)
:text text
:time time
:timestamp datetime

Thursday, June 9, 2011

gem development/packaging ref

gem development reference

http://sirupsen.com/create-your-first-ruby-gem-and-release-it-to-gemcutter/
http://integrumtech.com/2010/01/how-to-build-a-ruby-gem/

Sunday, May 29, 2011

Roll with Rake!!!

output of
rake -T

rake about # List versions of all Rails frameworks and the environment
rake db:create # Create the database from config/database.yml for the current Rails.env (use db:create:all to create all dbs in the config)
rake db:drop # Drops the database for the current Rails.env (use db:drop:all to drop all databases)
rake db:fixtures:load # Load fixtures into the current environment's database.
rake db:migrate # Migrate the database (options: VERSION=x, VERBOSE=false).
rake db:migrate:status # Display status of migrations
rake db:rollback # Rolls the schema back to the previous version (specify steps w/ STEP=n).
rake db:schema:dump # Create a db/schema.rb file that can be portably used against any DB supported by AR
rake db:schema:load # Load a schema.rb file into the database
rake db:seed # Load the seed data from db/seeds.rb
rake db:setup # Create the database, load the schema, and initialize with the seed data (use db:reset to also drop the db first)
rake db:structure:dump # Dump the database structure to an SQL file
rake db:version # Retrieves the current schema version number
rake doc:app # Generate docs for the app -- also availble doc:rails, doc:guides, doc:plugins (options: TEMPLATE=/rdoc-template.rb, TITLE="Custom Title")
rake log:clear # Truncates all *.log files in log/ to zero bytes
rake middleware # Prints out your Rack middleware stack
rake notes # Enumerate all annotations (use notes:optimize, :fixme, :todo for focus)
rake notes:custom # Enumerate a custom annotation, specify with ANNOTATION=CUSTOM
rake rails:template # Applies the template supplied by LOCATION=/path/to/template
rake rails:update # Update both configs and public/javascripts from Rails (or use just update:javascripts or update:configs)
rake routes # Print out all defined routes in match order, with names.
rake secret # Generate a cryptographically secure secret key (this is typically used to generate a secret for cookie sessions).
rake stats # Report code statistics (KLOCs, etc) from the application
rake test # Runs test:units, test:functionals, test:integration together (also available: test:benchmark, test:profile, test:plugins)
rake test:recent # Run tests for {:recent=>"test:prepare"} / Test recent changes
rake test:uncommitted # Run tests for {:uncommitted=>"test:prepare"} / Test changes since last checkin (only Subversion and Git)
rake time:zones:all # Displays all time zones, also available: time:zones:us, time:zones:local -- filter with OFFSET parameter, e.g., OFFSET=-6
rake tmp:clear # Clear session, cache, and socket files from tmp/ (narrow w/ tmp:sessions:clear, tmp:cache:clear, tmp:sockets:clear)
rake tmp:create # Creates tmp directories for sessions, cache, sockets, and pids