Skip to content

Instantly share code, notes, and snippets.

@javan
javan / gist:1168475
Created August 24, 2011 16:32
Fix iPhone home button
Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/
1.) Open any application
2.) Press and hold the power button until the slide to shutdown swipe bar appears.
3.) Release Power button
4.) Press and hold Home button Lightly
until screen returns to icon screen
JavaScript Value JavaScript Type Java Type Is Scriptable Is Function
{a:1, b:['x','y']} object org.mozilla.javascript.NativeObject + -
[1,2,3] object org.mozilla.javascript.NativeArray + -
1 number java.lang.Double - -
1.2345 number java.lang.Double - -
NaN number java.lang.Double - -
Infinity number java.lang.Double - -
-Infinity number java.lang.Double - -
true boolean java.lang.Boolean -
-
@cwholt
cwholt / gist:1032827
Created June 18, 2011 05:14
turntable.fm download current playing song (adds to mouseover "Add song to:")
javascript:var cwh;for(i in turntable)cwh||(cwh=i);$('#songboard_add').append($('<div>',{'class':'btn disk'}).css({'background-image':'url(http://s3.firstrule.net/cwh/cwh_ttfm_disk_dark.png)'}).click(function(x){window.open(location.protocol+"//"+location.host+"/getfile/?roomid="+turntable[cwh]['roomId']+"&rand="+Math.random()+"&fileid="+turntable[cwh]['currentSong']['_id']+"&downloadKey="+$.sha1(turntable[cwh]['currentSong']['_id']+turntable[cwh]['roomId']))}))
@isaacs
isaacs / comma-first-var.js
Created April 6, 2010 19:24
A better coding convention for lists and object literals in JavaScript
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",