This file contains 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
#Create ~/.inputrc and fill it with this: | |
"\e[A": history-search-backward | |
"\e[B": history-search-forward | |
set show-all-if-ambiguous on | |
set completion-ignore-case on | |
#This allows you to search through your history using the up and down arrows … i.e. type "cd /" and press the up arrow and you'll search through everything in your history that starts with "cd /". |
This file contains 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
<h2>App Academy ExpressJS Screencasts</h2> | |
<ul class="list-group"> | |
<li><a href="http://vimeo.com/groups/appacademy/videos/88022112">1 - Module Exports</a></li> | |
<li><a href="http://vimeo.com/groups/appacademy/videos/88022113">2 - HTTP</a></li> | |
<li><a href="http://vimeo.com/groups/appacademy/videos/88022115">3 - Threads</a></li> | |
<li><a href="http://vimeo.com/groups/appacademy/videos/88022116">4 - Ruby IO Select</a></li> | |
<li><a href="http://vimeo.com/groups/appacademy/videos/88022119">5 - Ruby Event Reactor</a></li> | |
<li><a href="http://vimeo.com/groups/appacademy/videos/88025189">6 - Node Event Reactor</a></li> | |
<li><a href="http://vimeo.com/groups/appacademy/videos/88135357">7 - Express Routing</a></li> | |
<li><a href="http://vimeo.com/groups/appacademy/videos/88135358">8 - Express Next</a></li> |
This file contains 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
<li><a href="http://scottksmith.com/blog/2014/05/02/building-restful-apis-with-node/">RESTful API w/Node</a></li> | |
<li><a href="http://scottksmith.com/blog/2014/05/05/beer-locker-building-a-restful-api-with-node-crud/">RESTful API w/Node -- CRUD</a></li> | |
<li><a href="http://scottksmith.com/blog/2014/05/29/beer-locker-building-a-restful-api-with-node-passport/">RESTful API w/Node -- Passport</a></li> | |
<li><a href="http://scottksmith.com/blog/2014/07/02/beer-locker-building-a-restful-api-with-node-oauth2-server/">RESTful API w/Node -- OAuth2 Server</a></li> | |
<li><a href="http://scottksmith.com/blog/2014/09/14/beer-locker-building-a-restful-api-with-node-digest/">RESTful API w/Node -- Digest</a></li> | |
<li><a href="http://scottksmith.com/blog/2014/09/18/beer-locker-building-a-restful-api-with-node-username-and-password/">RESTful API w/Node -- Username and Password</a></li> |
This file contains 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
From: http://davidwalsh.name/upgrade-nodejs | |
Install n helper module via npm: | |
npm install n | |
Then do the following: | |
sudo npm cache clean -f | |
sudo npm install -g n | |
sudo n stable |
This file contains 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
Converting md files to html w/highlighting | |
0a) Create a root directory to pull in all the repos | |
0b) Recursively clone or pull each repo | |
$> git clone <repo_url> | git pull on the existing repos | |
0c) Create a TOC index.html file for the root folder | |
$> echo '<head>' >> index.html | |
$> echo '' >> index.html | |
$> echo '</head>' >> index.html | |
$> echo '<body>' >> index.html | |
$> ls >> temp.html |
This file contains 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
// documentation for installed gems: | |
gem server | |
// use railroady to generate model/controller uml diagrams | |
rake diagram:all | |
// updating a single gem at a time | |
http://ilikestuffblog.com/2012/07/01/you-should-update-one-gem-at-a-time-with-bundler-heres-how/ | |
$> bundle update ––source GEMNAME |
This file contains 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
//***** ------- Order belongs_to Customer ==> methods gained: | |
@order.customer | |
@order.customer= | |
@order.build_customer(customer_number: 123, customer_name: "Joe Blow") --> only creates customer instance ... does not save! | |
@order.create_customer((customer_number: 123, customer_name: "Joe Blow") --> creates instance and saves it! | |
@order.create_customer!( ... ) --> raises error if record is not valid | |
//***** ------- Customer has_many Orders ==> methods gained: | |
@orders = @customer.orders |
This file contains 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
# Misc Tips/Tricks | |
### Limit the size of your Rails Test/Dev Logs | |
https://www.stormconsultancy.co.uk/blog/development/tips-tricks/limit-the-size-of-your-rails-test-and-development-logs/ | |
``` | |
In your config/environments/test.rb and development.rb just add the line: | |
config.logger = Logger.new(config.paths['log'].first, 1, 50 * 1024 * 1024) | |
and your log files will never grow bigger than 50Mb. You can change the size to your own preference. The ‘1’ in the second parameter means that 1 historic log file will be kept, so you’ll have up to 100Mb of logs – the current log and the previous chunk of 50Mb. |
This file contains 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
### This Guide is summary of steps outlined in the guide published by | |
### DigitalOcean here: https://www.digitalocean.com/community/tutorials/how-to-configure-devise-and-omniauth-for-your-rails-application | |
### TODO: automate this guide into a ruby script | |
### TODO: required auth tokens to be read from a local 'keys' folder w/individual | |
### PROVIDER (Twitter, FB, GH, Goog, etc.) token json files | |
X ----- [1] Add to Gemfile | |
gem 'therubyracer' |
OlderNewer