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
If bundle install gets stuck at | |
$ bundle install | |
Fetching gem metadata from http://rubygems.org/........ | |
Fetching gem metadata from http://rubygems.org/.. | |
then delete the contents of Gemfile.lock | |
Btw, in vim thats: | |
If you're in the first line of the file, use dG | |
If you're anywhere in the file, use :1,$d |
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
echo $PATH | |
PATH tells Bash where to look to find the executables like "ls" - | |
usually , they'll be somwehre like /usr/bin | |
You need to add those directories to your PATH to make them work. | |
path needs to list all the locations where binary files are found | |
eg: bin;usr/bin;/usr/local/bin. If you want to change your shell | |
then instead of PATH=/usr/bin/ksh you need | |
Code: | |
SHELL=/usr/bin/ksh |
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
-------------------------------------------------- | |
Server Stack | |
-------------------------------------------------- | |
As with other *nix applications, you can control nginx through the use | |
of signals. To use signals, you’ll need the process ID. | |
nginx is architected as a single master | |
process with any number of worker processes. | |
You can stop the master process with the |
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
rvm -v | |
rvm get head | |
rvm -v | |
rvm osx-ssl-certs status all | |
The above will show if certificates are outdated: | |
Certificates for /opt/sm/pkg/versions/openssl/1.0.1c/ssl/cert.pem: Old. | |
rvm osx-ssl-certs update all | |
The above will update the certificates: |
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
http://mislav.uniqpath.com/2010/07/git-tips/ |
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
put <%= params.inspect %> in application.html.erb |
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
db:create creates the database for the current env | |
db:create:all creates the databases for all envs | |
db:drop drops the database for the current env | |
db:drop:all drops the databases for all envs | |
db:migrate runs migrations for the current env that have not run yet | |
db:migrate:up runs one specific migration | |
db:migrate:down rolls back one specific migration | |
db:migrate:status shows current migration status | |
db:migrate:rollback rolls back the last migration | |
db:forward advances the current schema version to the next one |
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
http://nvie.com/posts/a-successful-git-branching-model/ | |
Master | |
Develop | |
Feature1 | |
Feature2 | |
Feature3 | |
Get original source updates to master. By git pull origin originalmaster. | |
Check where git remote is for originamaster. git remote -v |
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
ListAllCommands | grep searchstr | |
function ListAllCommands | |
{ | |
COMMANDS=`echo -n $PATH | xargs -d : -I {} find {} -maxdepth 1 \ | |
-executable -type f -printf '%P\n'` | |
ALIASES=`alias | cut -d '=' -f 1` | |
echo "$COMMANDS"$'\n'"$ALIASES" | sort -u | |
} | |
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
Instead of | |
rails server | |
do: | |
rails s -d | |
then to kill it, find which process is using the port: | |
lsof -i :3000 | |
finally, kill the process: | |
kill -9 $(lsof -i :3000 -t) |
NewerOlder