Skip to content

Instantly share code, notes, and snippets.

View inferiorhumanorgans's full-sized avatar

inferiorhumanorgans

  • San Francisco, CA
View GitHub Profile
#!/usr/bin/env ruby
require 'json'
require 'net/http'
require 'optparse'
require 'ostruct'
CHANNEL_URL = 'http://web.mobilerider.com/clients/hsb/api/media/?filter={"channel":{},"query":""}'
STREAMS = {}
;; Routine scales images based on the two parameters
;; if x-factor > 0 then image width is scaled to that width (if y-factor==0 then keep aspect ratio)
;; if x-factor < 0 then image width is scaled by magnitude of that amount (y-factor==0 means flip horizontally)
;; if y-factor > 0 then image height is scaled to that height (if x-factor==0 then keep aspect ratio)
;; if y-factor < 0 then image height is scaled by magnitude of that amount (x-factor==0 means flip vertically)
;; if x-factor AND y-factor = 0 then rotate image 90 deg CCW
(define (batch-scale-image pattern x-factor y-factor suffix)
(let* (
(filelist (cadr (file-glob pattern 1)))
@inferiorhumanorgans
inferiorhumanorgans / bootstrap_svg_fix.diff
Created June 7, 2012 04:42
Fix popover positioning on SVG elements
diff --git a/vendor/assets/javascripts/twitter/bootstrap.js b/vendor/assets/javascripts/twitter/bootstrap.js
index 6479673..9497ed4 100644
--- a/vendor/assets/javascripts/twitter/bootstrap.js
+++ b/vendor/assets/javascripts/twitter/bootstrap.js
@@ -961,6 +961,14 @@
actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight
+ if ((typeof(pos.height) == 'undefined') || (pos.height == 0)) {
+ pos.height = this.$element.attr('height')
From 57ec3068f381223fdae2aedb40c0aaecd4a01bf4 Mon Sep 17 00:00:00 2001
From: Alex Zepeda <alex@inferiorhumanorgans.com>
Date: Thu, 8 Mar 2012 11:57:47 -0800
Subject: [PATCH] verify-tag: Parse GPG configuration options.
Modify verify-tag to load relevant GPG variables from the git
configuratio file. This allows git tag -v to use an alternative
GPG binary in the same way that git tag -s does.
Signed-off-by: Alex Zepeda <alex@inferiorhumanorgans.com>