http://guides.rubyonrails.org/migrations.html
- add_column
- add_index
- change_column
- change_table
- create_table
- drop_table
http://guides.rubyonrails.org/migrations.html
(function($){ | |
//Finding min and max values in array from http://snippets.dzone.com/posts/show/769 | |
Array.prototype.min = function(){ return Math.min.apply({},this) }; | |
Array.prototype.max = function(){ return Math.max.apply({},this) }; | |
$.fn.masonry = function() { | |
this.each(function() { | |
var wall = $(this); |
Disclaimer: This file is called .a_README.markdown
so that it'll appear first
in the gist view (sorry for the horrible name)
Because this script prompts for user input, you have to execute it in a bit of an odd way. From a new command prompt simply copy and paste the following command and press return:
Disclaimer: This file is called .a_README.markdown
so that it'll appear first
in the gist view (sorry for the horrible name)
Because this script prompts for user input, you have to execute it in a bit of an odd way. From a new command prompt simply copy and paste the following command and press return:
# In the apps root directory run | |
# http://blog.phusion.nl/2010/09/21/phusion-passenger-running-multiple-ruby-versions/ | |
# passenger start -a localhost -p 3000 -e production -d | |
<VirtualHost *:80> | |
ServerName ranking.timehub.net | |
DocumentRoot /the/path/to/the/app/public | |
PassengerEnabled off | |
ProxyPass / http://localhost:3000/ | |
ProxyPassReverse / http://localhost:3000/ |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
# Update, upgrade and install development tools: | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install build-essential git-core curl libssl-dev \ | |
libreadline5 libreadline5-dev \ | |
zlib1g zlib1g-dev \ | |
libmysqlclient-dev \ | |
libcurl4-openssl-dev \ | |
libxslt-dev libxml2-dev |
#!/usr/bin/ruby | |
# Require: | |
# - linux or Mac | |
# - ruby 1.8.7 | |
# - Gem soap4r | |
# - curl | |
# | |
# Usage : | |
# ruby ovhfact.rb 2011 | |
# |
$('#products').append('<%= j render(@products) %>'); | |
<% if @products.next_page %> | |
$('.pagination').replaceWith('<%= j will_paginate(@products) %>'); | |
<% else %> | |
$('.pagination').remove(); | |
<% end %> |