Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am danieltome on github.
* I am danieltome (https://keybase.io/danieltome) on keybase.
* I have a public key ASAGkz88h-kWuc5hzX-hV0a-3V_vmi4Rh5AhZoi4givXiQo
To claim this, I am signing this object:
@danieltome
danieltome / gist:69433b198d54bff50932
Created October 22, 2015 03:55
The sprinkler video easter egg: "AJSPECIAL"
if ( window.addEventListener ) {
var kkeys = new Array(), konami = "65,74,83,80,69,67,73,65,76";
window.addEventListener("keydown", function(e){
kkeys.push( e.keyCode );
if ( kkeys.toString().indexOf( konami ) >= 0 ) {
$("#node-335 .detail-info").html('<iframe width="560" height="315" src="https://www.youtube.com/embed/bOtAzgw_yEA?autoplay=1" frameborder="0" allowfullscreen></iframe>');
}
}, true);
}
@danieltome
danieltome / split-text-into-lines.php
Created April 8, 2015 06:18
PHP to split text into lines without breaking the words
<pre>
<?php
$strings = array(
'I pay tribute to those who have carried the anzac spirit',
'I pay tribute to my friend capt first last',
'I pay tribute to my friend capt first name last name',
'I pay tribute to the anzacs',
'I pay tribute to my great grandmother capt. first last',
);