Skip to content

Instantly share code, notes, and snippets.

wkj

Block or report user

Report or block wkj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View webhook-transformer.js
function transform_payload(payload) {
var headers = {"content-type": "application/json",
"X-Insert-Key": "newrelic-insights-insert-api-key"};
var body = [{"eventType": payload["event"],
"timestamp": Date.parse(payload["timestamp"]),
"session_id": payload["session"]}];
return {"status": "ok", "headers": headers, "body": body};
}
View tddium.rake
# To set up:
#
# Add this file as /lib/tasks/tddium.rake
#
# Create an IAM user on AWS with no special policies, then add the access
# key and secret key to your Tddium suite config like this:
#
# cd /your/local/app/directory
# tddium config:add suite AWS_ACCESS_KEY yourkeyhere
# tddium config:add suite AWS_SECRET_KEY yoursecrethere
View ree-1.8.7-2011.03
build_package_patched() {
# These three patches are included when RVM builds REE
cd source
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/tcmalloc.patch'
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/stdout-rouge-fix.patch'
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/no_sslv2.diff'
patch -p1 < tcmalloc.patch
patch -p1 < stdout-rouge-fix.patch
patch -p1 < no_sslv2.diff
cd ..
View ree-1.8.7-2011.03
build_package_patched() {
# These three patches are included when RVM builds REE
cd source
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/tcmalloc.patch'
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/stdout-rouge-fix.patch'
wget 'https://github.com/wayneeseguin/rvm/raw/master/patches/ree/1.8.7/no_sslv2.diff'
patch -p1 < tcmalloc.patch
patch -p1 < stdout-rouge-fix.patch
patch -p1 < no_sslv2.diff
cd ..
View gist:5058827
# Setup:
# tddium config:add suite EY_API_TOKEN xxxxxxxx
# (take EY_API_TOKEN value from ~/.eyrc)
# tddium config:add suite EY_DEPLOY_KEY yyyyyyy
# (EY_DEPLOY_KEY value is Base64-encoded content of your ~/.ssh/id_rsa OR any other ssh key authorised for a given EY env)
require 'timeout'
require 'etc'
require 'base64'
@wkj
wkj / 0-readme.md
Created Jun 4, 2012 — forked from burke/0-readme.md
ruby-1.9.3-p125 cumulative performance patch.
View 0-readme.md

Patched ruby 1.9.3-p125 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p125 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Huge thanks to funny-falcon for the performance patches.

@wkj
wkj / gem.rb
Created Aug 8, 2011
Build and install a gem for testing with Cucumber and Aruba
View gem.rb
# Copyright 2011 Solano Labs All Rights Reserved
require 'aruba'
require 'aruba/api'
class CukeGem
@setup_done = false
class << self
include Aruba::Api
@wkj
wkj / tddium.rake
Created Jun 15, 2011
Tddium pre_hook and db_hook examples
View tddium.rake
namespace :tddium do
desc "tddium environment pre-run setup task"
task :pre_hook do
%w(tddium recurly pricing).each do |cfg|
system "cd config && ln -nfs #{cfg}.example.yml #{cfg}.yml"
end
end
desc "tddium environment db setup task"
You can’t perform that action at this time.