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
$("<a href='http://www.google.com#hello'>gavin</a>")[0].hash //returns "#hello" | |
$("#mylink")[0].hash //jquery selector | |
document.getElementById("mylink").hash //no jquery |
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
SELECT date_add('2012-01-23', INTERVAL 7 DAY) -- returns 2012-01-30 |
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
h3 { | |
display: table; | |
width: 100%; | |
} | |
h3:before, | |
h3:after { | |
content: '\00a0'; | |
width: 20%; | |
display: table-cell; | |
background: url(../img/320/bullet.gif) repeat-x 1px; |
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
<p class='highlighted'> | |
<span>This is a line</span> | |
<span>This is a line</span> | |
<span>This is a line</span> | |
</p> |
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
<?php | |
//copy and paste me | |
error_reporting(E_ALL); | |
ini_set('display_errors', TRUE); | |
ini_set('display_startup_errors', TRUE); |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
Hello Gavin, the father. This is Past Gavin. I went ahead and renewed your licence sticker to 2013 since you probably have a lot on your mind already. Happy Birthday! | |
P.S. Next year you will have to renew the sticker AND your licence, so please pay it forward. |
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
setInterval(function(){ | |
$("#mybutton").click(); | |
}, 1000); | |
$("#mybutton").click(function(e){ | |
if(e.originalEvent === undefined) { |
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 ideas = [ | |
"Calculator", | |
"To-Do List", | |
"Address Book", | |
"Nickname Generator", | |
"Text-Based RPG", | |
"Password Generator", | |
]; |
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
// left: 37, up: 38, right: 39, down: 40, | |
// spacebar: 32, pageup: 33, pagedown: 34, end: 35, home: 36 | |
var keys = [37, 38, 39, 40]; | |
function preventDefault(e) { | |
e = e || window.event; | |
if (e.preventDefault) | |
e.preventDefault(); | |
e.returnValue = false; | |
} |