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
# Export database from MySQL: | |
sudo mysqldump -u database_username database_name > path_to_file_to_export_to.sql |
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
# Ignore .DS_Store files from a git repository | |
# Find and remove existing files from the repository: | |
find . -name .DS_Store -print0 | xargs -0 git-rm | |
# Add the line ".DS_Store" to the file .gitignore, which can be found at the top level of your repository (or created if it isn't there already) | |
git add .gitignore | |
git commit -m ".DS_Store banished!" | |
# http://stackoverflow.com/questions/107701/how-can-i-remove-dsstore-files-from-a-git-repository |
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
# Find what port an application is running on. | |
# Especially useful at Webfaction | |
ps -ef | grep APPNAME |
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 TextMate as default text editor | |
export EDITOR="/usr/bin/mate -w" |
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
# Capistrano deployment scripts | |
# the deployment script will go to default environment (usually "dev"), others like "staging" can be targeted by using "cap staging deploy", etc. | |
# update the server with the latest revision in the repository | |
cap deploy | |
# run rake db:migrate on the server | |
cap deploy:migrate | |
# updates the server with the latest project in the repository and then runs rake db:migrate |
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
# run Selenium tests on a whole app | |
./script/server -e test | |
# followed by | |
rake test:acceptance | |
# This is in lieu of running | |
./script/server -e test | |
# then browsing to |
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
# common Rake commands | |
# run migrations | |
rake db:migrate | |
# copy the database | |
rake db:test:clone_structure | |
# display all application routes | |
rake routes |
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
# configure RedirectPermanent in Apache vhost | |
# step 1: new virtual hosts for each domain | |
# step 2: RedirectPermanent in each new vhost file | |
RedirectPermanent / http://mysite.org | |
# put the RedirectPermanent inside a vhost for each mysite.com and mysite.net | |
# RedirectPermanent is part of mod_alias | |
# this was done so multiple domain extensions would all change to the same extension |
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
1 - In textmate, open the bundle editor> Edit Languages | |
2 - pick Rails: HTML(rails) from the left hand thing | |
3 - Then change | |
fileTypes = ( 'rhtml' ); | |
to | |
fileTypes = ( 'rhtml', 'html.erb' ); |
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
randy-j-hunts-macbook-air-2:design-ignites-change randyjhunt$ rake gems:install | |
(in /Users/randyjhunt/code/rails/design-ignites-change) | |
gem install mislav-will_paginate --version "~> 2.2.3" --source http://gems.github.com | |
WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and | |
/usr/bin aren't both writable. | |
WARNING: You don't have /Users/randyjhunt/.gem/ruby/1.8/bin in your PATH, | |
gem executables will not run. | |
Successfully installed mislav-will_paginate-2.2.3 | |
OlderNewer