Skip to content

Instantly share code, notes, and snippets.

View inferiorhumanorgans's full-sized avatar

inferiorhumanorgans

  • San Francisco, CA
View GitHub Profile
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>
@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')
;; 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)))
#!/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 = {}
$ make
gcc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.5 -headerpad_max_install_names -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -I. -I. -I/Library/PostgreSQL/9.2/include/postgresql/server -I/Library/PostgreSQL/9.2/include/postgresql/internal -I/usr/local/include/libxml2 -I/usr/local/include/libxml2 -I/usr/local/include -c -o ip4r_module.o ip4r_module.c
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk'
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk'
clang: warning: argument unused during compilation: '-headerpad_max_install_names'
In file included from ip4r_module.c:3:
./ipr.h:3:10: fatal err
@inferiorhumanorgans
inferiorhumanorgans / qt-coretext.diff
Created May 7, 2014 03:49
Backport of QTBUG-10094
diff --git a/src/gui/text/qfontdatabase_mac.cpp b/src/gui/text/qfontdatabase_mac.cpp
index ea16846..35cb03d 100644
--- a/src/gui/text/qfontdatabase_mac.cpp
+++ b/src/gui/text/qfontdatabase_mac.cpp
@@ -146,7 +146,9 @@ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) {
CTFontDescriptorRef font = (CTFontDescriptorRef)CFArrayGetValueAtIndex(fonts, i);
QCFString family_name = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(font, kCTFontFamilyNameAttribute, NULL);
QCFString style_name = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(font, kCTFontStyleNameAttribute, NULL);
- QtFontFamily *family = db->family(family_name, true);
+ QCFString ps_name = (CFStringRef)CTFontDescriptorCopyLocalizedAttribute(font, kCTFontNameAttribute, NULL);
$ bundle exec ./main.rb ~/Downloads/Snap-2_0_0_2.bar
>>> Initial login request
<<< Response: {"RimTabletResponse"=>{"AuthChallenge"=>{"Status"=>"PasswdChallenge", "Challenge"=>"What's the airspeed velocity of an unladen swallow?U4057364cD2oH9B7V43VPa02p3E6", "Algorithm"=>"2", "Salt"=>"955398CDDECA0F0D", "ICount"=>"5463", "FailedAttempts"=>"0", "RetriesRemaining"=>"5"}}}
*** Challenge
*** V2 Login
<<< Response: {"RimTabletResponse"=>{"Auth"=>{"Status"=>"Success", "Smb"=>{"Credentials"=>{"User"=>"dtm", "Password"=>"[REDACTED]"}, "User"=>"dtm", "Pwd"=>"[REDACTED]", "Workgroup"=>"WORKGROUP", "NetBios"=>"%h"}}}}
*** Success
>>> Query: {"command"=>"Install", "dev_mode"=>"on", "file"=>#<UploadIO:0x007f9a73083850 @content_type="application/zip", @original_filename="Snap-2_0_0_2.bar", @local_path="/Users/alex/Downloads/Snap-2_0_0_2.bar", @io=#<File:/Users/alex/Downloads/Snap-2_0_0_2.bar>, @opts={}>}
$ ./ds2-dump --port /dev/cu.PL2303-00001014 --probe-all
Family Name Part Number Manufacturer Notes
-------------------------------------------------------------------------------------------------------------------------------
ZKE Central Body Electronics v5 6907663 Delphi PHI faults=1
DME Siemens MS 42.0 7500255 000011 SW mismatch, vin=WBA......YKC.....
EWS Electronic Immobiliser v3.3 6905670 UTA faults=3
DSC ATE Dynamic Stability Control III Mk20 6753598 Temic SW mismatch
LWS Steering Angle Sensor v5.1b 1096943 Kostal
IHKA E46 Auto Climate Control 4106930 Hella
@inferiorhumanorgans
inferiorhumanorgans / main.tf
Created May 28, 2015 23:18
Terraform discreet state files w/ interpolation
variable "unique" {}
variable "cidr" {}
provider "aws" {
region="us-east-1"
secret_key=""
access_key=""
}
resource "aws_security_group" "default" {
Input = Output
============================
00 00 = 0 = 00 00 00 00
00 01 = 196893 = 00 03 01 1d
00 02 = 98446 = 00 01 80 8e
00 03 = 65631 = 00 01 00 5F
00 11 = 11581 = 00 00 2D 3D
01 00 = 769
90 0F = 5 = 00 00 00 05
90 FF = 5 = 00 00 00 05