Skip to content

Instantly share code, notes, and snippets.

View dpaluy's full-sized avatar

David Paluy dpaluy

  • Majestic Labs
  • Austin, TX
  • X @dpaluy
View GitHub Profile
@mikhailov
mikhailov / installation.sh
Created November 23, 2010 15:18
nginx+passenger (real production config)
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776
$ cd /usr/src
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
@benolee
benolee / howto_pow_ubuntu.txt
Created July 1, 2011 03:32
HowTo Ubuntu pow-like setup
$ sudo aptitude install apache2 dnsmasq
$ sudo vim /etc/dnsmasq.conf
# ...
address=/dev/127.0.0.1
listen-address=127.0.0.1
$ sudo vim /etc/dhcp3/dhclient.conf
# uncomment line 20:
@kevinold
kevinold / deploy.rb
Created July 26, 2011 20:55 — forked from jeronimo/deploy.rb
Capistrano recipe to sync rails MongoDB and files
set :sync_directories, ["public/system/images"]
set :sync_backups, 3
set :db_file, "mongoid.yml"
set :db_drop, '--drop' # drop database (rewrites everything)
@danielberlinger
danielberlinger / performance.rb
Created March 27, 2012 20:10
A Rails initializer for using Rails 3 notifications and statsd
require 'statsd'
$statsd = Statsd.new('your_host_here')
ActiveSupport::Notifications.subscribe /process_action.action_controller/ do |*args|
event = ActiveSupport::Notifications::Event.new(*args)
controller = event.payload[:controller]
action = event.payload[:action]
format = event.payload[:format] || "all"
format = "all" if format == "*/*"
status = event.payload[:status]
rails_env = ENV['RAILS_ENV'] || "production"
rails_root = ENV['RAILS_ROOT'] || "/mnt/data-store/html/gogobot/current"
WORKER_TIMEOUT = 60 * 10 # 10 minutes
# Stale workers
Thread.new do
loop do
begin
`ps -e -o pid,command | grep [r]esque`.split("\n").each do |line|
@ben-av
ben-av / gist:3608264
Created September 3, 2012 10:05
Capistrano - deployment email with list of git commits
namespace :release do
desc "get current commit in remote server"
task :before do
begin
remote_sha = capture("cd #{current_path}; git rev-parse --verify HEAD")
set :remote_before_commit, remote_sha.strip
# first time deploy can throw exception
rescue
end
end
@funny-falcon
funny-falcon / 00-description.md
Created September 14, 2012 12:05
Patches against ruby-1.9.3-head

This is falcon.patch splitted to be reviewed.

  • 01-cached-lp.diff - Cached expanded $LOAD_PATH - speedups startup
  • 02-sorted-lf.diff - Sorted $LOADED_FEATURES - tiny speedup startup
  • 03-st_opt.diff - Some improvements for hash creation
  • 04-sparse_array.diff - Performance improvement for methods/constants/instance variable offset tables
  • 05-ary-queue.diff - make array to be fully suitable as queue
  • 06-st_opt_sparse_array.diff - 03 + 04
  • 07-backport-gc.diff - backport of COW friendly GC
@mpapis
mpapis / cflags.patch
Created October 8, 2012 18:49
Fix Ruby CFLAGS detection/update
--- a/configure.in
+++ b/configure.in
@@ -267,11 +267,9 @@
cflagspat="$cflagspat;s|"`eval echo '"'"${debugflags}"'"' | sed 's/[[][|.*]]/\\&/g;s/^ */ /;s/ *$/ /'`'| |g'
test -z "warnflags" ||
cflagspat="$cflagspat;s|"`eval echo '"'"${warnflags}"'"' | sed 's/[[][|.*]]/\\&/g;s/^ */ /;s/ *$/ /'`'| |g'
-if test -z "${CFLAGS+set}"; then
- cflags=`echo " $cflags " | sed "$cflagspat;s/^ *//;s/ *$//"`
- orig_cflags="$cflags"
- cflags="$cflags "'${optflags} ${debugflags} ${warnflags}'
$VERBOSE = nil
require File.expand_path('../rooby', __FILE__)
Person = Rooby::Class.new 'Person' do
define :initialize do |name|
@name = name
end
define :name do
@olivierlacan
olivierlacan / gist:4062929
Last active February 10, 2024 10:57 — forked from Gregg/gist:968534
Code School Screencasting Framework

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.