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
/* | |
DOT-format Graph visualization of @wnd_* twitter accounts. | |
Choose Your Own Adventure by @edent. | |
Graph by @shello. | |
PNG render: http://imgur.com/O6hMqqb | |
Note: I'm a noob at graphviz/DOT. Excuse some obvious derp. | |
*/ |
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 | |
// via https://twitter.com/joswr1ght/status/544548300033363971 | |
var_dump(md5('240610708')); | |
// string(32) "0e462097431906509019562988736854" | |
var_dump(md5('QNKCDZO')); | |
// string(32) "0e830400451993494058024219903391" | |
var_dump(md5('240610708') == md5('QNKCDZO')); |
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
#!/usr/bin/env python3 | |
from itertools import accumulate | |
from bisect import bisect | |
from random import randrange | |
from unicodedata import name as unicode_name | |
# Set the unicode version. | |
# Your system may not support Unicode 7.0 charecters just yet! So hipster. | |
UNICODE_VERSION = 6 |
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
#!/bin/bash | |
# | |
# Watch current directory (recursively) for file changes, and execute a command | |
# when a file or directory is created, modified or deleted. | |
# | |
# Modified from the original by: Senko Rasic <[email protected]> | |
# https://gist.github.com/senko/1154509 | |
# | |
# Requires: | |
# bash |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
// Adapted from http://stackoverflow.com/a/1320259 | |
function array_flatten($array) | |
{ | |
return iterator_to_array( | |
new RecursiveIteratorIterator( | |
new RecursiveArrayIterator($array) | |
), | |
false |
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
#!/usr/bin/env sh | |
# Retrieves a remote file to a temporary local file, and prints its path | |
remotetmp() { | |
REMOTE_TMPFILE=`mktemp` | |
scp -q $1 $REMOTE_TMPFILE | |
if [[ $? == 0 ]]; then | |
print $REMOTE_TMPFILE; | |
fi | |
} |
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 | |
public function testSerializeAndDecryptWithStringExpires() | |
{ | |
$value = 'bar'; | |
$headers = new \Slim\Http\Headers(); | |
$settings = array( | |
'cookies.encrypt' => true, |