Skip to content

Instantly share code, notes, and snippets.

View alterisian's full-sized avatar

Ian Moss alterisian

View GitHub Profile
@alterisian
alterisian / grailsCheatSheet
Created November 11, 2010 11:55
Grails Command Line Cheat Sheet
grails create-app Creates a Grails application for the given name
grails create-domain-class Creates a new domain class
grails generate-all Generates a CRUD interface (controller + views) for a domain class
grails install-plugin Installs a plug-in for the given URL or name and version
grails create-controller Creates a new controller
grails interactive Starts Grails CLI (script runner) in interactive mode.
Keeps the JVM running between grails commands for faster script execution.
grails console Load the Grails interactive Swing console
grails run-app grails [environment]* run-app - Runs a Grails application
@alterisian
alterisian / heroku_to_github.txt
Created October 28, 2010 13:10
How to git your existing heroku app into a new github repo
git remote add github [EMAIL PROTECTED]:myaccount/myapp.git
git remote add heroku [EMAIL PROTECTED]:myapp.git
Then you can do “git push heroku” and “git push github”, or pull, or
From: http://blog.mindtonic.net/using-github-and-heroku-together
(Date.parse("2010-12-03")-Date.today).days
model.methods.sort.each{|m| puts m}; nil
# Convience method for ordanalized_date_string
def ods( date, day_of_week=false )
return ordanalized_date_string( date, day_of_week )
end
# Returns date string in format '29th December, 2009' i.e. UK style
# use instead of date.to_s( %stuff %rndstuff %another )
def ordanalized_date_string( date, day_of_week=false )
date_str = "#{date.day.ordinalize} %B, %Y"
this isn't a test