This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-O, [--skip-activerecord] # Skip Active Record files | |
-J, [--skip-prototype] # Skip Prototype files | |
-T, [--skip-testunit] # Skip Test::Unit files | |
You can get a complete list of all the available options by running the command: | |
$ rails new --help | |
Creating the app | |
$ sudo gem install rails | |
rails new YourApp -OJT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#split a name into three parts. you can also compare fname and mname when mname is blank | |
SELECT initialimport.CustomerNumber as CustNumb, | |
SUBSTRING_INDEX(SUBSTRING_INDEX(ContactPerson, ' ', 1), ' ', -1) as fname, | |
SUBSTRING_INDEX(SUBSTRING_INDEX(ContactPerson, ' ', 2), ' ', -1) as mname, | |
SUBSTRING_INDEX(SUBSTRING_INDEX(ContactPerson, ' ', 3), ' ', -1) as lname | |
FROM initialimport; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//start mongodb | |
mongod --dbpath data | |
mongoimport --db opendata --collection atlenergy < energy_wb.json | |
#restore database from mongodump | |
mongorestore --collection col --db opendata opendata/col.bson | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install curl git -y | |
sudo aptitude install git-completion | |
git config --global color.ui "auto" | |
git config --global user.name "Forrest Sutton" | |
git config --global user.email "<email>@gmail.com" | |
ssh-keygen -t dsa -C "<email>@gmail.com" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |
NewerOlder