- mkdir vagrant
- cd vagrant
- vagrant box add ubuntu http://dl.dropbox.com/u/7490647/talifun-ubuntu-11.04-server-i386.box
- vagrant init ubuntu
# install build tools | |
sudo yum install make automake gcc gcc-c++ kernel-devel git-core -y | |
# install python 2.7 and change default python symlink | |
sudo yum install python27-devel -y | |
sudo rm /usr/bin/python | |
sudo ln -s /usr/bin/python2.7 /usr/bin/python | |
# yum still needs 2.6, so write it in and backup script | |
sudo cp /usr/bin/yum /usr/bin/_yum_before_27 |
#! /usr/bin/python | |
import argparse, getopt, sys | |
parser = argparse.ArgumentParser(description='Writes SQL inserts based off a CSV file. Assumes values are strings.') | |
parser.add_argument('file', help='name and location of the file to parse') | |
parser.add_argument('table', help='table name on which inserts will be based') | |
parser.add_argument('cols', help='comma-separated value of the columns to write') | |
args = parser.parse_args() |
class TestCountriesSpec extends Specification { | |
val appWithMemoryDatabase = FakeApplication(additionalConfiguration = inMemoryDatabase()) | |
abstract class WithDbData extends WithApplication(appWithMemoryDatabase) { | |
override def around[T: AsResult](t: => T): Result = super.around { | |
setupData() | |
t | |
} |
<? | |
class MySQL { | |
/** | |
* The DB Host to connect to | |
* | |
* @var string | |
*/ | |
protected $host; |
source 'http://rubygems.org' | |
gem 'rails', '3.1.0' | |
gem 'unicorn' | |
gem "mongoid", "~> 2.4" | |
gem "bson_ext", "~> 1.5" | |
gem 'jquery-rails' | |
gem 'sorcery' | |
gem 'cancan' | |
gem 'twitter-bootstrap-rails', :git => 'http://github.com/seyhunak/twitter-bootstrap-rails.git' |
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.
I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your own needs.
##References
##Create Rails App
command to make new directory:
mkdir AppName