Skip to content

Instantly share code, notes, and snippets.

@tyrotinal
tyrotinal / gist:5530373
Created May 7, 2013 05:05
rails: mail catcher starting at 00000
mailcatcher --ip=0.0.0.0
rake db:drop
rake db:create
@tyrotinal
tyrotinal / gist:5530377
Created May 7, 2013 05:06
rake: migrate
rake db:migrate
rake db:reset
@tyrotinal
tyrotinal / gist:5530381
Created May 7, 2013 05:07
railsHowTo: intalling Rails 3.2
#Installing RVM.
--------------------------------
RVM is used for managing GEM sets and ruby versions. There is a lot that you can do with it. For more information visit: [RVM website](https://rvm.io/)
##Installing RVM Prereq:
echo ######Installing pre pre reqs#########
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install build-essential zlib1g-dev libssl-dev libreadline-dev \
git-core curl libyaml-dev libcurl4-dev libsqlite3-dev apache2-dev -y
##Installing RVM more prereq
@tyrotinal
tyrotinal / gist:5530384
Created May 7, 2013 05:07
lampHowTo: install lamp
#Install LAMP: Single Script
echo "######INSTALLING PHP and apache and all the requriemtns########"
sudo apt-get install apache2 libapache2-mod-php5 -y
sudo apt-get install php5 mysql-server php-pear php5-mysql php5-suhosin -y
echo "######GOING TO ASK FOR PASSWORD HERE#########"
sudo apt-get install mysql-client mysql-server mysql-navigator php5-mysql php5-gd -y
echo "######checking if everything is installed#########"
sudo apt-get install apache2 libapache2-mod-php5 php5 mysql-server php-pear php5-mysql php5-suhosin mysql-client mysql-server mysql-navigator php5-mysql php5-gd -y
@tyrotinal
tyrotinal / gist:5530386
Created May 7, 2013 05:07
nodeHowTo: install node from source for a user
#Installing node for a local user
##install the dependcies
apt-get install python-software-properties python g++ make
##clone node and install
mkdir -p ~/local/src
cd ~/local/src
git clone git://github.com/joyent/node.git
cd node
@tyrotinal
tyrotinal / gist:5606236
Created May 19, 2013 00:42
ruby: 1-simple class initializer
require_relative 'Car'
car = Car.new(20,50)
puts "gas: #{car.get_gas} mile: #{car.get_mile}"
puts "\n"
car.set_gas = 22
car.set_mile = 55
puts "Now.. gas: #{car.get_gas} mile: #{car.get_mile}"
@tyrotinal
tyrotinal / gist:5606251
Created May 19, 2013 00:54
ruby: 1 - simple class Car
class Car
def initialize (gas,mile)
@gas = gas
@mile = mile
end
def get_gas
return @gas
end