Skip to content

Instantly share code, notes, and snippets.

View torrancew's full-sized avatar

Tray torrancew

  • San Francisco, CA
View GitHub Profile
require 'rubygems'
require 'spoon'
Spoon.spawnp 'jruby', *ARGV
@jordansissel
jordansissel / Better Usage.md
Created December 20, 2010 12:07
Strip package scripts from .deb packages (postinst, postrm, preinst, prerm)

The best way to use this tool is to hook apt's use of dpkg to run it before doing any package installs.

In your apt.conf, put this:

DPkg::Pre-Install-Pkgs {"xargs -rL1 bash /path/to/stripdeb.sh 2>&1 | logger -t stripdeb"}

Then, a demo:

% sudo apt-get install mysql-server-5.1

#!/usr/bin/env ruby
require "rubygems"
require "rest_client"
require "json"
require "uri"
require "logger"
require "pry"
class Resource