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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
#!/bin/bash | |
# | |
# Copyright 2011, Tim Branyen @tbranyen <[email protected]> | |
# Dual licensed under the MIT and GPL licenses. | |
# | |
# Automatically clone single or multiple repos into a folder, | |
# great for setting up a git projects folder. | |
# | |
# Install: curl https://gist.github.com/raw/902154/github.sh > /usr/local/bin/gh | |
# chmod +x /usr/local/bin/gh |
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
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
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
# Rails Migration | |
http://guides.rubyonrails.org/migrations.html | |
## Migrations methods: | |
* add_column | |
* add_index | |
* change_column | |
* change_table | |
* create_table | |
* drop_table |
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
# Rails Models | |
### Generating models | |
$ rails g model User | |
### Associations | |
belongs_to | |
has_one |
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
# SSL self signed localhost for rails start to finish, no red warnings. | |
# 1) In your rails applicaiton root folder create self signed certificate | |
$ openssl req -new -newkey rsa:2048 -sha1 -days 365 -nodes -x509 -subj "/C=US/ST=Colorado/L=Colorado Springs/O=SW/CN=localhost.ssl" -keyout server.key -out server.crt | |
# 2) Add localhost.ssl to your hosts file | |
$ echo "127.0.0.1 localhost.ssl" | sudo tee -a /etc/hosts |