Skip to content

Instantly share code, notes, and snippets.

View jasp's full-sized avatar
🏠
Working from home

Jakob Skov-Pedersen jasp

🏠
Working from home
View GitHub Profile
@joerichsen
joerichsen / gist:735296
Created December 9, 2010 20:35
A version that works with with the newest savon version
# Old version is here
# https://gist.github.com/657153
# In Gemfile
gem 'savon', :git => 'http://github.com/rubiii/savon.git', :branch => 'eight'
gem 'httpclient'
# Run this in the console to fetch the name and address of the first debtor
HTTPI::Adapter.use = :net_http
client = Savon::Client.new do
@igrigorik
igrigorik / rack-client-em-http.rb
Created January 30, 2011 01:06
sync / async API with rack-client
require 'rack/client'
require 'yajl'
require 'pp'
require 'eventmachine'
require 'em-synchrony'
require 'em-synchrony/em-http'
module Rack
module Client
@rheaton
rheaton / tracker_csv_export_to_pdf.rb
Created March 30, 2011 15:38
takes a csv file from tracker and makes story cards. be careful of the order when you are cutting them up.
#!/usr/bin/env ruby
# Script to generate PDF cards suitable for planning poker
# from Pivotal Tracker [http://www.pivotaltracker.com/] CSV export.
# Inspired by Bryan Helmkamp's http://github.com/brynary/features2cards/
# Example output: http://img.skitch.com/20100522-d1kkhfu6yub7gpye97ikfuubi2.png
require 'rubygems'
@pogodan
pogodan / Gemfile
Created April 24, 2011 14:10
edge rails/3.1 Gemfile
source :rubygems
gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'arel', :git => 'git://github.com/rails/arel.git'
gem 'rack', :git => 'git://github.com/rack/rack.git'
gem 'sprockets', :git => 'git://github.com/sstephenson/sprockets.git'
gem 'sqlite3'
# Asset template engines
@estum
estum / user.rb
Last active December 21, 2015 05:49
Migrate passwords from legacy systems to Devise
# updated variant of older solution:
# http://www.davidverhasselt.com/2012/05/13/how-to-migrate-passwords-from-legacy-systems-to-devise
class User < ActiveRecord::Base
# ...
def valid_password?(password)
if legacy_password?
# Use Devise's secure_compare to avoid timing attacks
@pnc
pnc / observer.md
Last active April 1, 2025 21:38
Using Erlang observer/appmon remotely

Using OTP's observer (appmon replacement) remotely

$ ssh remote-host "epmd -names"
epmd: up and running on port 4369 with data:
name some_node at port 58769

Note the running on port for epmd itself and the port of the node you're interested in debugging. Reconnect to the remote host with these ports forwarded:

$ ssh -L 4369:localhost:4369 -L 58769:localhost:58769 remote-host