Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jkraemer on github.
  • I am jkraemer (https://keybase.io/jkraemer) on keybase.
  • I have a public key whose fingerprint is C388 0ACE 6187 419B 177C 472E 0862 5A14 CE3C DDAA

To claim this, I am signing this object:

git.rb | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
--- ./capistrano/recipes/deploy/scm/git.rb.orig
+++ ./capistrano/recipes/deploy/scm/git.rb
@@ -157,10 +157,26 @@
execute.join(" && ")
end
- # An expensive export. Performs a checkout as above, then
- # removes the repo.
lib/cap-git-archive.rb:
-------------------------------------------------
require 'capistrano/recipes/deploy/scm/git'
Capistrano::Deploy::SCM::Git.class_eval do
def export(revision, destination)
git = command
execute = []
args = []
args << '--format=tar'
git clone http://github.com/dbalmain/ferret.git
cd ferret/ruby
rake package
gem install pkg/ferret-0.11.8.1.gem
module DigestAuthForFunctionalTests
def authenticate_with_http_digest(user = 'admin', password = 'admin', realm = 'Application')
unless ActionController::Base < ActionController::Testing
ActionController::Base.class_eval { include ActionController::Testing }
end
@controller.instance_eval %Q(
alias real_process_with_new_base_test process_with_new_base_test
def process_with_new_base_test(request, response)
@jkraemer
jkraemer / gist:885592
Created March 24, 2011 18:37
monkey patch for test::unit for testing evented libraries
require 'em-synchrony'
require 'test/unit/autorunner'
# Patch test::unit to run stuff inside the EM reactor
module Test
module Unit
class AutoRunner
alias_method :run_alias, :run
@jkraemer
jkraemer / Berksfile
Created April 19, 2013 08:11
Vagrant 1.2.1 / berkshelf-vagrant 1.1.3
site :opscode
cookbook 'apt'
@jkraemer
jkraemer / gist:5990285
Created July 13, 2013 10:33
Install Skype on 64bit Debian Wheezy / Crunchbang 11
sudo dpkg --add-architecture i386
sudo aptitude install libxv1:i386 libxss1:i386 libasound2:i386 libqt4-dbus:i386 libqtwebkit4:i386 libasound2-plugins:i386 libssl1.0.0:i386
sudo dpkg -i skype-debian_4.2.0.11-1_i386.deb
@jkraemer
jkraemer / gist:5995430
Created July 14, 2013 19:15
Linux on Lenovo X230 field notes
/etc/rc.local
# reduce swapping to a minimum
echo 0 > /proc/sys/vm/swappiness
/etc/fstab
use "noatime,nodiratime,discard" mount options for SSD
use tmpfs for tmp and friends:
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/spool tmpfs defaults,noatime,mode=1777 0 0
@jkraemer
jkraemer / bm.rb
Last active July 5, 2016 11:26
logging and string interpolation
require 'benchmark'
require 'logger'
iterations = 1000000
logger = Logger.new(STDOUT)