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 iPadLabels = function () { | |
function fix() { | |
var labels = document.getElementsByTagName('label'), | |
label; | |
for (var i = 0; label = labels[i]; i++) { | |
if (label.getAttribute('for')) { | |
label.onclick = labelClick; | |
} | |
} |
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
javascript:%20(function(){var%20a=document.getElementsByTagName('script'),i,l,result,rurl=/^http:\/\/use\.typekit\.com\/([0-9A-Za-z]+)\.js/;for(i=0,l=a.length-1;i<l;i++){if(result=rurl.exec(a[i].getAttribute('src'))){window.location.assign('http://typekit.com/colophons/'+result[1]);break;}}%20if(!result){alert('This%20site%20doesn\'t%20use%20Typekit!');}})(); |
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
find ~/path/to/site/ -type f -name '*.htm*' -exec chmod +x {} \; |
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
---------- | |
/ \ | |
/ REST \ | |
/ IN \ | |
/ PEACE \ | |
/ \ | |
| Judge Dredd | | |
| 0 Au | | |
| killed by | | |
| incompatible RAM | |
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
if (node.attributes.length) { | |
// Get the known-existent list of attributes and iterate over them | |
var attrs = node.attributes; | |
for (var length = attrs.length, i = 0; i < length; i++) { | |
// IE 5-8 (all currently shipping versions) always list all possible attributes, specified or not. | |
// The "specified" member of each attribute indicates whether it was existent in the HTML and is required for the purpose here. | |
// IE will also report the unique jQuery identifiers as well as jQuery's sizzle engine cache attributes, so parse those out entirely. | |
if (attrs[i].specified | |
&& attrs[i].nodeName.indexOf('jQuery') == -1 | |
&& attrs[i].nodeName.indexOf('sizcache') == -1 |
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
javascript:void%28s%3Dprompt%28%27Find%20text%3A%27%2C%27%27%29%29%3Bs%3D%27%28%27+s+%27%29%27%3Bx%3Dnew%20RegExp%28s%2C%27gi%27%29%3Brn%3DMath.floor%28Math.random%28%29*100%29%3Brid%3D%27z%27%20+%20rn%3Bb%20%3D%20document.body.innerHTML%3Bb%3Db.replace%28x%2C%27%3Cspan%20name%3D%27%20+%20rid%20+%20%27%20id%3D%27%20+%20rid%20+%20%27%20style%3D%5C%27color%3A%23000%3Bbackground-color%3Ayellow%3B%20font-weight%3Abold%3B%5C%27%3E%241%3C/span%3E%27%29%3Bvoid%28document.body.innerHTML%3Db%29%3Balert%28%27Found%20%27%20+%20document.getElementsByName%28rid%29.length%20+%20%27%20matches.%27%29%3Bwindow.scrollTo%280%2Cdocument.getElementsByName%28rid%29%5B0%5D.offsetTop%29%3B |
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
$('h1').bind('click', function() { | |
this.log('clicked!'); | |
}, console); | |
$('h2').bind('click', {msg: 'clicked!'}, function(e) { | |
this.log(e.data.msg); | |
}, console); |
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
function insertCommas(n, delim) { | |
var n = ''+n, l = n.length, | |
delim = delim || ','; | |
return (l > 3) ? insertCommas(n.substr(0, l-3)) + delim + n.substr(l-3) : n; | |
} |
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 NUMBERZ = function(min, max) { | |
var sum = 0, i; | |
min *= 1000, max *= 1000; | |
for (i = min; i < max; i++) { | |
sum += +(i / 1000).toFixed(2); | |
} | |
return +sum.toFixed(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
cat ~/.ssh/id_dsa.pub | ssh user@server 'touch .ssh/authorized_keys && cat >> .ssh/authorized_keys' |
OlderNewer