####Go to temp dir
$ cd /tmp
####Download your version of btsync i386
or x64
$ curl http://btsync.s3-website-us-east-1.amazonaws.com/btsync_i386.tar.gz -o btsync.tar.gz
# i386
$ curl http://btsync.s3-website-us-east-1.amazonaws.com/btsync_x64.tar.gz -o btsync.tar.gz
# x64
####Then unpack this shit
$ tar -xf btsync.tar.gz
####And move to your local bin
$ sudo mv btsync /usr/local/bin/
####Okey, generate sample config
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
#require "ruby-debug" | |
require "logger" | |
Thread.abort_on_exception = true | |
namespace :paperclip_restructure do | |
namespace :assets do | |
desc "Migrate assets to new folder structure" | |
task :migrate, :workers, :needs => :preload do |t, args| |
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
# Sample verbose configuration file for Unicorn (not Rack) | |
# | |
# This configuration file documents many features of Unicorn | |
# that may not be needed for some applications. See | |
# http://unicorn.bogomips.org/examples/unicorn.conf.minimal.rb | |
# for a much simpler configuration file. | |
# | |
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete | |
# documentation. | |
app_name = "rename_me" |
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 | |
# | |
# mongodb Startup script for the mongodb server | |
# | |
# chkconfig: - 64 36 | |
# description: MongoDB Database Server | |
# | |
# processname: mongodb | |
# |
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
def xml | |
@xml_string << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" | |
end | |
def tag(tag, attrs={}, &block) | |
@xml_string << "<#{tag}" | |
text = attrs.delete(:text) | |
@xml_string << " " if not attrs.empty? | |
attrs.each_pair do |key, value| | |
@xml_string << "#{key.to_s}=\"#{value.to_s}\"" |
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
require "bundler/capistrano" | |
#set :whenever_command, "bundle exec whenever" # uncomment this if you need whenever integration | |
#require "whenever/capistrano" # uncomment this if you need whenever integration | |
load 'deploy/assets' | |
set :rvm_ruby_string, '1.9.3' | |
# Load RVM's capistrano plugin. | |
require "rvm/capistrano" | |
set :rvm_type, :system |
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
Host heroku.com | |
HostName heroku.com | |
User git | |
IdentityFile ~/.ssh/heroku.identity | |
IdentitiesOnly yes |
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
# Install with: | |
# bash < <(curl -L https://raw.github.com/gist/1333785) | |
# | |
# Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug | |
echo "Installing ruby-debug with ruby-1.9.3-p0 ..." | |
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem | |
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem |
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
# Our own variable where we deploy this app to | |
deploy_to = "/srv/example.com" | |
current_path = "#{deploy_to}/current" | |
shared_path = "#{deploy_to}/shared" | |
shared_bundler_gems_path = "#{shared_path}/bundler_gems" | |
# See http://unicorn.bogomips.org/Sandbox.html | |
# Helps ensure the correct unicorn_rails is used when upgrading with USR2 | |
Unicorn::HttpServer::START_CTX[0] = "#{shared_bundler_gems_path}/bin/unicorn_rails" |