View delete_all_kindle_documents.js
//load jquery in console separately first | |
var jq = document.createElement('script'); | |
jq.src = "http://code.jquery.com/jquery-latest.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
jQuery.noConflict(); | |
//delete ALL entries currently listed in Manage Your Kindle screen | |
idsToDelete = [] | |
$('form[name="fionaDL"] input[name="contentName"]').each(function () { idsToDelete.push(this.value); }) | |
$(idsToDelete).each(function() {Fion.deleteItem('deleteItem_' + this);}) |
View gist:3823502
static void outputApplier(void* info, const CGPathElement* element) | |
{ | |
NSMutableArray* a = (NSMutableArray*) info; | |
int nPoints; | |
NSString * pathElementType = nil; | |
switch (element->type) | |
{ | |
case kCGPathElementMoveToPoint: |
View geojson_us.js
{ | |
"type": "MultiPolygon", | |
"coordinates": | |
[ | |
[ | |
[ | |
[ -123.123779, 48.227039 ], // contig. u.s. | |
[ -123.318787, 49.000042 ], | |
[ -121.742592, 49.000267 ], | |
[ -95.157394, 49.000493 ], |
View Apple_mobile_device_types.txt
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
View gist:2698506
[[self webView] stringByEvaluatingJavaScriptFromString:@"\ | |
var css = document.createElement(\"style\");\ | |
css.type = \"text/css\";\ | |
css.innerHTML = \"body { -webkit-touch-callout: none; }\";\ | |
document.body.appendChild(css);"]; |
View Remap.c
// | |
// Remap.m | |
// | |
// Created by Adam Wolf on 5/24/10. | |
// | |
#import "Remap.h" | |
@interface Remap () | |
@property (nonatomic, retain) NSMutableDictionary * _data; |