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
load 'deploy/assets' | |
require "bundler/capistrano" | |
set :application, "some_web" | |
set :repository, "[email protected]:whatever.git" | |
set :deploy_to, "/home/ubuntu/some_web" | |
set :user, 'ubuntu' | |
set :use_sudo, false |
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
#!/usr/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby | |
require 'rubygems' | |
require 'zerigo_dns' | |
require 'route53' | |
Zerigo::DNS::Base.user = '[email protected]' | |
Zerigo::DNS::Base.api_key = 'yourkeyhere' | |
# iterate through all domain names |
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 | |
# | |
# Homepage: http://www.debian-tutorials.com | |
# Email: [email protected] | |
# Bash script to download and install or upgrade wordpress to specified directory. | |
install_wp () | |
{ | |
cd ~</pre> | |
<!--more--> | |
<pre> |
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
namespace :db do | |
desc "Backup database to #{RAILS_ROOT}/db/backup" | |
task :backup => :environment do | |
max_backups = (ENV["MAX"] || 14).to_i | |
timestamp = Time.now.strftime("%Y%m%d_%H%M%S") | |
backup_folder = File.join("db", "backup") | |
backup_file = File.join(backup_folder, "#{RAILS_ENV}_dump_#{timestamp}.sql.gz") | |
FileUtils.makedirs(backup_folder) | |
db_config = ActiveRecord::Base.configurations[RAILS_ENV] | |
command = "mysqldump -u #{db_config['username']} -p#{db_config['password']} --default-character-set=utf8 --single-transaction --quick #{db_config['database']} | gzip -c > #{backup_file}" |
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
Workflow: | |
1) Do a git pull to ensure your master is having the latest copy | |
2) Create a new branch with the command | |
git checkout -b <branchname> | |
"I'd normally name the branchname something in relation to the task at hand, this is supposed to make your life easier." |
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
# ~/.bashrc | |
# for git branch display on bash | |
# -- START --- | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
function proml { | |
PS1="\u@\h:\w\[\033[0;32m\]$(parse_git_branch)\[\033[0;0m\]> " |
NewerOlder