Skip to content

Instantly share code, notes, and snippets.

View zudochkin's full-sized avatar
😻

Dima Zudochkin zudochkin

😻
View GitHub Profile
@zudochkin
zudochkin / Ubuntu rbenv
Created September 27, 2012 16:01 — forked from HatemMahmoud/Ubuntu rbenv
Installing Ruby 1.9.2 with OpenSSL on Ubuntu 11.04 using ruby-build and rbenv
# for more info: https://gist.github.com/1120938
@zudochkin
zudochkin / gist:3775889
Created September 24, 2012 13:13 — forked from olistik/gist:2627011
Ubuntu 12.04 setup (rbenv, janus, postgres)

Basic pre-requisites

  • Some utilities:
sudo apt-get install vim tmux git
  • Copy/paste from the command line:
sudo apt-get install xclip
@zudochkin
zudochkin / gist:3706225
Created September 12, 2012 12:13
Sinatra Dropbox Oauth
require 'rubygems'
require 'erb'
require 'sinatra'
require 'dropbox'
configure do
enable :sessions
end
def authed?
@zudochkin
zudochkin / default
Created August 24, 2012 15:43 — forked from mauricio/default
# as we’re going to use Unicorn as the application server
# we’re not going to use common sockets
# but Unix sockets for faster communication
upstream shop {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response (in case the Unicorn master nukes a
# single worker for timing out).
# for UNIX domain socket setups:
server unix:/tmp/shop.socket fail_timeout=0;
@zudochkin
zudochkin / etc_init.d_unicorn_example.co.uk
Created August 18, 2012 20:40 — forked from rubysolo/etc_init.d_unicorn_example.co.uk
Ruby on Rails server setup on Ubuntu 11.04 with Nginx, Unicorn, Rbenv
#! /bin/bash
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the unicorn web server
# Description: starts unicorn