Skip to content

Instantly share code, notes, and snippets.

@happyboredom
happyboredom / gist:3a280174954e500f934a2ec99799aca9
Created September 23, 2017 04:26
Install imagemagick with pango support enabled using brew on Mac OSX
brew reinstall imagemagick --with-jp2 --with-librsvg --with-quantum-depth-16 --with-pango
@happyboredom
happyboredom / gist:bdccb2fb581968014a9d2ee1401c1df0
Created September 23, 2017 04:26
Install imagemagick with pango support enabled using brew on Mac OSX
brew reinstall imagemagick --with-jp2 --with-librsvg --with-quantum-depth-16 --with-pango
@happyboredom
happyboredom / gist:1561564
Created January 4, 2012 19:21
bonzo - convert .data() from a DOM element into URL encoded string (as with ".param()" in jQuery)
/*
Takes data elements from an HTML tag and converts to a URL encoded string.
*/
bonzo.aug({
param: function () {
var str = [];
obj = this.data();
for(var p in obj)
str.push(p + "=" + encodeURIComponent(obj[p]));
@happyboredom
happyboredom / gist:1561512
Created January 4, 2012 19:10
Prevent jQueryUI dialog from setting focus on links or form fields
$(selector).dialog({
open: function (evt, ui) {
$(':focus', this).blur();
},
width:400,
height:250,
modal:true,
title:'Help'
});
@happyboredom
happyboredom / ZbarPhoneGap.h
Created December 13, 2010 19:42
Use Zbar barcode reader with PhoneGap on iPhone
//
// ZbarPlug.h
// Phun
//
// Created by Jeff Lee on 12/12/10.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>