Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
sync_dryrun()
{
echo
echo -e "\033[1m ...dryrun...\033[0m"
rsync -vr --delete ~/Projects/rails_app/ deployer@linode:~/ --dry-run
echo -e "\033[1m ...dryrun...\033[0m"
echo
}
root = "/home/deployer/project/"
working_directory root
pid "#{root}/tmp/pids/unicorn.pid"
stderr_path "#{root}/log/unicorn.log"
stdout_path "#{root}/log/unicorn.log"
listen "/tmp/unicorn.rails_app.sock"
worker_processes 2
timeout 30
upstream unicorn {
server unix:/tmp/unicorn.rails_app.sock fail_timeout=0;
}
server {
listen 80 default deferred;
# server_name example.com;
root /home/deployer/rails_app/public;
location ^~ /assets/ {
#!/bin/bash
if [ $# -eq 1 ]
NM=`uname -a && date`
NAME=`echo $NM | md5sum | cut -f1 -d" "`
then
ppa_name=`echo "$1" | cut -d":" -f2 -s`
if [ -z "$ppa_name" ]
then
echo "PPA name not found"
echo "Utility to add PPA repositories in your debian machine"