This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; | |
} |