This file contains 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 results = {}; | |
var stations = prompt("Stations:", "").split(","); | |
function requestThumbs(i, index) { | |
var id = stations[i]; | |
if (!id) { console.log(results); return; } | |
console.log(id, index); | |
$.get( | |
"http://www.pandora.com/content/station_track_thumbs?stationId=" + id + "&page=true&posFeedbackStartIndex=" + index + "&posSortAsc=false&posSortBy=date&cachebuster%3A=" + new Date().getTime(), | |
function(data) { | |
var page = $("<div>" + data + "</div>"); |
This file contains 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; | |
} |
This file contains 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
P = [0x886a3f24,0xd38a385,0x2e8a1913,0x4473703,0x22389a4,0xd0319f29,0x98fa2e8,0x896c4eec,0xe6212845,0x7713d038,0xcf6654be,0x6cce934,0xb729acc0,0xdd507cc9,0xb5d5843f,0x17947b5,0xd9d51692,0x1bfb7989] | |
S1 = [0xa6b31d1,0xacb5df98,0xdb72fd2f,0xb7df1ad0,0xedafe1b8,0x967e266a,0x45907cba,0x997f2cf1,0x4799a124,0xf76c91b3,0xe2f218,0x16fc8e85,0xd8206963,0x694e5771,0xa3fe58a4,0x7e3d93f4,0x8f7495d,0x58b68e72,0x58cd8b71,0xee4a1582,0x1da4547b,0xb5595ac2,0x39d5309c,0x1360f22a,0x23b0d1c5,0xf0856028,0x187941ca,0xef38dbb8,0xb0dc798e,0xe183a60,0x8be9e6c,0x3e8a1eb0,0xc17715d7,0x274b31bd,0xda2faf78,0x605c6055,0xf32555e6,0x94ab55aa,0x62984857,0x4014e863,0x6a39ca55,0xb610ab2a,0x345cccb4,0xcee84111,0xaf8654a1,0x93e9727c,0x1114eeb3,0x2abc6f63,0x5dc5a92b,0xf6311874,0x163e5cce,0x1e93879b,0x33bad6af,0x5ccf246c,0x8153327a,0x77869528,0x98488f3b,0xafb94b6b,0x1be8bfc4,0x93212866,0xcc9d861,0x91a921fb,0x60ac7c48,0x3280ec5d,0x5d5d84ef,0xb17585e9,0x22326dc,0x881b65eb,0x813e8923,0xc5ac96d3,0xf36f6df,0x3942f483,0x8244b2e,0x42084a4,0x4af0c869,0x5e9b |
This file contains 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
//[[[UIAlertView alloc] initWithTitle:@"Alert title" message:msg delegate:self //cancelButtonTitle:@"Don't remember" otherButtonTitles:@"OK" , @"remember later", nil] //autorelease];[alert show]; | |
var $ = require('./NodObjC'); | |
$.import('Foundation'); | |
$.import('UIKit'); | |
var pool = $.NSAutoreleasePool('alloc')('init'); | |
var alert = $.UIAlertView('alloc'); |
This file contains 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
#/bin/bash | |
printf "Enter IP of device:" | |
read IP | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
FILES=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks/* | |
for f in $FILES | |
do |
This file contains 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
curl http://www.newegg.com/Product/Product.aspx?Item=N82E16834157863 2>/dev/null | grep 'CrossSellItem(this,' | cut -d "," -f 2 | head -1 | cut -d "'" -f 2 |
This file contains 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 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
#!/bin/bash | |
working=$(mktemp -d); | |
mkdir -p "$working/usr/lib" | |
cp -R "$1/usr/lib/" "$working/usr/lib" | |
mkdir -p "$working/usr/include" | |
cp -R "$1/usr/include/" "$working/usr/include" | |
mkdir -p "$working/System/Library/PrivateFrameworks" | |
cp -R "$1/System/Library/PrivateFrameworks/" "$working/System/Library/PrivateFrameworks" |
This file contains 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 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'); | |
$.import('CoreFoundation') | |
function callback (info, foo) { | |
console.log('inside callback!') | |
} |
OlderNewer