Skip to content

Instantly share code, notes, and snippets.

View pablete's full-sized avatar

Pablo A. Delgado pablete

View GitHub Profile
# 1) Point *.example.com in your DNS setup to your server.
#
# 2) Setup an Apache vhost to catch the star pointer:
#
# <VirtualHost *:80>
# ServerName *.example.com
# </VirtualHost>
#
# 3) Set the current account from the subdomain
class ApplicationController < ActionController::Base
require './cassandra'
require './cassandra_constants'
require './cassandra_types'
require 'pp'
transport = Thrift::BufferedTransport.new(Thrift::Socket.new("localhost", "9160"))
transport.open
client = CassandraThrift::Cassandra::Client.new(Thrift::BinaryProtocol.new(transport))
curl -o /tmp/skaes-ruby187pl299-pl300.patch https://gist.github.com/raw/6fe90b6c78394d5917fe/a75ff7b5e4bd1eda8958d19f43b89dd0516fd3f4/ruby187pl299-pl300.diff
rvm install ruby-1.8.7-p299 --trace --patch /tmp/skaes-ruby187pl299-pl300.patch -C --enable-gcdebug
rm /tmp/skaes-ruby187pl299-pl300.patch
rvm alias create skaes-ruby ruby-1.8.7-p299
@pablete
pablete / 01.png
Created November 1, 2011 23:32
Embed this into gmail
01.png
@pablete
pablete / request_start_variable.patch
Created March 4, 2012 15:22
Add a 'start_time' variable to nginx 1.0.10 to support an X-REQUEST-START header. This header is used by New Relic RPM to record queue time.
--- nginx-1.0.10/src/http/ngx_http_variables.c 2011-05-30 08:36:17.000000000 -0400
+++ nginx-1.0.10-patched/src/http/ngx_http_variables.c 2011-11-24 23:48:09.000000000 -0500
@@ -92,6 +92,8 @@
ngx_http_variable_value_t *v, uintptr_t data);
static ngx_int_t ngx_http_variable_pid(ngx_http_request_t *r,
ngx_http_variable_value_t *v, uintptr_t data);
+static ngx_int_t ngx_http_variable_start_time(ngx_http_request_t *r,
+ ngx_http_variable_value_t *v, uintptr_t data);
/*
@pablete
pablete / 0-readme.md
Created November 22, 2012 17:18 — forked from burke/0-readme.md
ruby-1.9.3-p194 cumulative performance patch.

Patched ruby 1.9.3-p194 for 30% faster rails boot

Overview

This script installs a patched version of ruby 1.9.3-p194 with boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Many thanks to funny-falcon for the performance patches.

@pablete
pablete / index.html
Last active December 13, 2015 17:29 — forked from darwin/index.html
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/>
<script src="http://cmx.io/v/0.1/cmx.js"></script>
<body>
<scene id="scene1">
<label t="translate(0,346)">
<tspan x="0" y="0em">Powers</tspan>
</label>
<drawing t="translate(0,31)">
<line stroke="green">
# rbenv setup
export RBENV_ROOT=/usr/local/rbenv
export PATH="$RBENV_ROOT/bin:$PATH"
eval "$(rbenv init -)"
# Bootstrap script
apt-get -y update
apt-get -y install build-essential git-core libsqlite3-dev wget ssl-cert curl
#
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
#
# Add rbenv to the path:
echo '# rbenv setup' > /etc/profile.d/rbenv.sh
echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh
// Karma configuration
// Generated on Wed May 08 2013 16:21:22 GMT-0400 (CLT)
// base path, that will be used to resolve files and exclude
basePath = '';
// list of files / patterns to load in the browser
files = [