Skip to content

Instantly share code, notes, and snippets.

View bored-engineer's full-sized avatar

Luke Young bored-engineer

View GitHub Profile
#!/usr/bin/ruby
#
# This tool is only used to "decrypt" the github enterprise source code.
#
# Run in the /data directory of the instance.
require "zlib"
KEY = "This obfuscation is intended to discourage GitHub Enterprise customers "+
"from making modifications to the VM. We know this 'encryption' is easily broken. "
@bored-engineer
bored-engineer / Run.js
Created September 28, 2011 01:14 — forked from TooTallNate/Run.js
MobileDevice NodObjC basic example.
var $ = require('NodObjC')
$.import('MobileDevice');
$.import('CoreFoundation')
// Callback function that's invoked when a device is plugged in
function callback (i, foo) {
try {
console.log('inside callback!')
var info = new $.am_device_notification_callback_info(i)
@bored-engineer
bored-engineer / mobiledevice.js
Created September 23, 2011 01:24 — forked from TooTallNate/mobiledevice.js
half-attempt at using the MobileDevice framework with NodObjC
var $ = require('NodObjC')
, ffi = require('node-ffi')
$.import('MobileDevice')
function callback (info, foo) {
console.log('inside callback!')
}
// Get a function pointer to the callback function above
@bored-engineer
bored-engineer / jqm-simple-dynamic-page.js
Created August 23, 2011 02:17 — forked from scottjehl/jqm-simple-dynamic-page.js
jQuery Mobile: Simple dynamic page creation
/* Dynamically create a page and navigate to it.
(and include the page in browser history ) */
//create markup
var newPage = $("<div data-role=page data-url=yay><div data-role=header><h1>YAY!!!!</h1></div><div data-role=content><img src=http://bukk.it/yay.gif /></div></div>");
//append it to the page container
newPage.appendTo( $.mobile.pageContainer );
//go to it
@bored-engineer
bored-engineer / vib.c
Created June 4, 2011 04:38 — forked from TooTallNate/vib.c
Attempt at using the iOS private `GSEventVibrateForDuration` function... this doesn't seem to work...
// To compile:
// gcc -o vib vib.c -F/System/Library/PrivateFrameworks -framework GraphicsServices
#import <GraphicsServices/GSEvent.h>
int main() {
GSEventVibrateForDuration(3.5f);
sleep(3500);
return 0;
}