Skip to content

Instantly share code, notes, and snippets.

@SFEley
SFEley / Daily Store Rollout Schedule
Last active March 29, 2016 21:01
Store activations schedule for new_sales_detail
DAY 1
----------
2783 85718 customers
4219 4781 customers
2933 4098 customers
1810 78 customers
2645 6130 customers
[2783, 4219, 2933, 1810, 2645]
@SFEley
SFEley / RubyDL.md
Created October 30, 2013 18:56
Docs for Ruby DL class, taken from **ext/dl/doc** in Ruby 1.8.7 source tree and converted to Markdown. (This document disappeared in the 1.9.x releases and was replaced by inadequate inline rdocs.)

Ruby/DL

Ruby/DL provides an interface to the dynamic linker such as dlopen() on UNIX and LoadLibrary() on Windows.

Building and Installing

$ ruby extconf.rb # to create the Makefile $ make # to build the library 'dl.so' $ make libtest.so # to build the C library 'libtest.so' for the test script

@SFEley
SFEley / secret.rake
Created April 22, 2013 01:18
Open an encrypted data bag item in one's usual editor, decrypted. Adapted from Aaron Jensen's excellent script: https://gist.github.com/aaronjensen/4123044
namespace :secret do
desc "Edit an encrypted data bag item in EDITOR"
task :edit, :item do |t, args|
unless ENV['EDITOR']
puts "No EDITOR found. Try:"
puts "export EDITOR=vim"
exit 1
end
abort 'usage: rake "secret:edit[<item name>]"' unless args.item
@SFEley
SFEley / gist:1054553
Created June 29, 2011 18:43 — forked from andrzejsliwa/gist:778535
list all available cucumber steps - (rake cucumber:steps)
# From https://gist.github.com/778535
# In turn based on http://www.natontesting.com/2010/01/11/updated-script-to-list-all-cucumber-step-definitions/
desc "List all available steps"
task :steps do
require 'hirb'
extend Hirb::Console
features_dir = "features"
step_candidates = Dir.glob(File.join(features_dir,'**/*.rb'))
# Follow all the gem requires, and identify which files have steps in them
@SFEley
SFEley / deploy.rb
Created August 31, 2010 20:39
Vlad config file with Hoptoad and Unicorn
set :application, "_____"
set :repository, "git@github.com:_____/#{application}.git"
begin
# Parsing the annoying multi-line output of 'git branch'...
set :branch, `git branch --no-color`.match(/\* (.+)/)[1]
rescue Exception => e
set :branch, '(none)'
end