Find:
:(\w+)[\s]+=>[\s]+
Replace:
$1:
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
# Clear existing task so we can replace it rather than "add" to it. | |
Rake::Task["deploy:compile_assets"].clear | |
namespace :deploy do | |
desc 'Compile assets' | |
task :compile_assets => [:set_rails_env] do | |
# invoke 'deploy:assets:precompile' | |
invoke 'deploy:assets:precompile_local' | |
invoke 'deploy:assets:backup_manifest' |
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
# Update, upgrade and install development tools: | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
sudo apt-get -y install build-essential git-core libssl-dev libsqlite3-dev curl nodejs nginx | |
# Install rvm | |
\curl -sSL https://get.rvm.io | bash -s 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
## Show hidden files in TextMate by Chris Your | |
## https://gist.github.com/chrisyour/728445 | |
## File Patern | |
# old | |
!(/\.(?!htaccess)[^/]*|\.(tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$ | |
# new | |
!(/\.(?!\W*)[^/]*|\.(gitkeep|DS_Store|tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$ |
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/sh | |
for that in `ps acx | grep -i $1 | awk {'print $1'}`; do | |
kill $that; | |
done |
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
alias gcap='~/git_cap gitname gitpwd' |
1 install nginx_tcp_proxy_module
I followed this tutorial by Johnathan Leppert and the instructions from nginx_tcp_proxy_module but changed nginx to use passenger and thin.
tcp {
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
# => Start private_pub (Faye) as Deamon | |
RAILS_ENV=production bundle exec rackup private_pub.ru -s thin -E production -D | |
# => find Process on Port x | |
fuser -n tcp 9292 | |
-> 9292/tcp: 3748 | |
# => kill process | |
kill -9 3748 |
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
(function($, undefined) { | |
/** | |
* Unobtrusive scripting adapter for jQuery | |
* | |
* Requires jQuery 1.6.0 or later. | |
* https://github.com/rails/jquery-ujs | |
* Uploading file using rails.js | |
* ============================= |