http://guides.rubyonrails.org/migrations.html
- add_column
- add_index
- change_column
- change_table
- create_table
- drop_table
| /* | |
| DESCRIPTION | |
| ----------- | |
| Use NodeJS to read RFID ids through the USB serial stream. Code derived from this forum: | |
| http://groups.google.com/group/nodejs/browse_thread/thread/e2b071b6a70a6eb1/086ec7fcb5036699 | |
| CODE REPOSITORY | |
| --------------- | |
| https://gist.github.com/806605 |
| var stitch = require('stitch'); | |
| var express = require('express'); | |
| options = { | |
| paths : [__dirname + '/lib', __dirname + '/vendor'], | |
| compilers: { | |
| jade: function(module, filename) { | |
| var jade = require('jade'); | |
| var source = require('fs').readFileSync(filename, 'utf8'); |
| # Migration generator shortcuts. | |
| # rails generate migration MyNewMigration | |
| # rails generate migration add_fieldname_to_tablename fieldname:string | |
| # rails generate model Product name:string description:text | |
| # The set of available column types [:string, :text, :integer, :float, :decimal, :datetime, :timestamp, :time, :date, :binary, :boolean] | |
| # A migration is a subclass of ActiveRecord::Migration. You must implement the "up" and "down" (revert) methods. | |
| # These are the handy methods available to a Migration: |
| Existing schema is below: | |
| ActiveRecord::Schema.define(:version => 20120130161449) do | |
| create_table "movies", :force => true do |t| | |
| t.string "title" | |
| t.string "rating" | |
| t.text "description" | |
| t.datetime "release_date" | |
| t.datetime "created_at" |
| var ClientRouter = Backbone.Router.extend({ | |
| routes: { | |
| '404': 'notfound', | |
| '500': 'error', | |
| 'auth': 'auth', | |
| 'authCallback?oauth_token=:oauth_token&oauth_verifier=:oauth_verifier': 'authCallback', | |
| '': 'defaultRoute' | |
| }, | |
| defaultRoute: function() { |
http://guides.rubyonrails.org/migrations.html
Based on: http://coderwall.com/p/1mni7w
brew install postgresql
initdb /usr/local/var/postgres -E utf8
mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/postgresql/9.1.4/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist| <div id="iPhoneBro" class="iPhone gen"> | |
| <div class="title"> | |
| <input type="submit" class="back button" value="Messages"> | |
| <span class="contact_name button">(614) MEME-BRO</span> | |
| <input type="submit" class="edit button" value="Edit"> | |
| </div> | |
| <div id="conversation" class="conversation "> | |
| <div class="time"><div class="time"><p>Aug 9, 2012 3:43 AM</p></div></div><div class="text sent" id="query"><div class="reflect"></div><p>Check Out <a href-"http://www.memebro.com/?r=codepen">memebro.com</a></p></div> | |
| <div class="text receive"><div class="reflect"></div><p>Try "+popular", "+trending", or "+new" for meme lists</p></div> | |
| <div class="text sent" id="query"><div class="reflect"></div><p>+popular</p></div> |
| (function($){ | |
| isString = function (obj) { | |
| return toString.call(obj) == '[object String]'; | |
| }; | |
| $.fn.bodysnatch = function() { | |
| var collection = this; | |
| return collection.each(function(a,b) { | |
| var element = $(this); | |
| var clone = element.clone(); |
| /** | |
| The idea here is that all changes to your new object can be observed | |
| */ | |
| Ember.View.extend({ | |
| model: Ember.StalkableObject.create(), | |
| saveModel: Ember.observer(function () { | |
| /** do some fancy stuff to save changes to your model */ | |
| }, 'model.@properties') | |
| }); |