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
<?php | |
/** | |
* This script is used to process the output of a PHPUnit test run | |
* that uses --log-junit for the purposes of timing each executed | |
* test method. It outputs test methods with their respective | |
* runtimes in order from largest to smallest. Times are in | |
* seconds. The script accepts paths to any number of files in the | |
* JUnit log format. | |
* | |
* Ex: php phpunit-log-junit.php /path/to/junit-log1.xml /path/to/junit-log2.xml ... |
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
; These aliases are only useful if you work from a directory containing multiple repos. | |
; mem stores the current branch or commit checked out per repo to a specified file. | |
; rec reads a specified file in this format and restores the repos to their respective branches or commits. | |
; This is useful if you're working on or testing multiple branches together and/or simultaneously. | |
; | |
; Example: | |
; git mem /path/to/file | |
; [change repo configurations, do work, etc.] | |
; git rec /path/to/file | |
; [repos are now back in the configuration they were in when git mem was run] |
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
#!/usr/bin/env python | |
import sys | |
import socket | |
import itertools | |
def filter_tlds(x): return x.startswith(".") | |
tlds = set(filter(filter_tlds, sys.argv[1:])) | |
non_tlds = set(sys.argv[1:]).difference(tlds) |
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
<?php | |
require_once 'Slim/Slim.php'; | |
class Custom_Route extends Slim_Route { | |
public function dispatch() { | |
$this->setCallable(require $this->getCallable()); | |
return parent::dispatch(); | |
} | |
} |
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
<?php | |
/** | |
* Iterator to generate sequential passwords within a given length range. | |
*/ | |
class PasswordIterator implements Iterator | |
{ | |
/** | |
* Length of the next password to be generated | |
* @var int | |
*/ |
NewerOlder