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
# Disk Usage per folder | |
ls -1 | while read name; do sudo du -sh "$name"; done | sort -h | |
# DNS lookups - handy when generating white list for proxy | |
sudo tcpdump -i any udp port 53 -vv -l | grep 'q: A' --line-buffered > ~/dns-lookups | |
cat ~/dns-lookups | awk '{ print \$10}' | sort | uniq | |
# Bash random string | |
date +%s%N | md5sum | head -c 7 |
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
#!/bin/bash | |
usage() { | |
msg=$1 | |
if [[ $msg ]]; then | |
logMsg "$msg" | |
fi | |
echo "gitconfig-client -t dev-webapps1 |
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
{ | |
"name": "Graphite Panel Example", | |
"tick": 60, | |
"size": "autoHeight span12", | |
"php": "Hoborg/Widget/Graphite/Graph/Panel.php", | |
"conf": { | |
"from": "60min", | |
"graphiteUrl": "http://graphs.mycompany.net/", | |
"height": 136, | |
"width": 600, |
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
alias git-st='for i in `ls .`; do echo; echo; echo "- - - - - - - -"; echo " FOLDER: "$i; echo; git --git-dir=$i/.git --work-tree=$i st; done;' |
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
{ | |
"name": "hoborg/vendors", | |
"config": { | |
"vendor-dir": "." | |
}, | |
"authors": [ | |
{ | |
"name": "Wojtek Oledzki", | |
"email": "wojtek@hoborglabs.com", | |
"homepage": "http://hoborglabs.com" |
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
; | |
; Behat vendors | |
; http://behat.org | |
[gherkin] | |
git=https://github.com/Behat/Gherkin.git | |
target=/behat/gherkin | |
[behat] | |
git=https://github.com/Behat/Behat.git | |
target=/behat/behat |
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 | |
class SimpleTest extends \PHPUnit_Framework_TestCase { | |
protected function assertIsSubset(array $expected, $actual, $selector = '') { | |
$this->assertInternalType('array', $actual); | |
foreach ($expected as $key => $value) { | |
if(is_numeric($key) && !is_array($value)) { | |
// basic mode - for when $expected is a list of elements we expect to find in $actual | |
$this->assertTrue(in_array($value, $actual), |
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 | |
$rootPath = getenv('DASHBOARD_ROOT') ? getenv('DASHBOARD_ROOT') : __DIR__ . '/..'; | |
require_once "{$rootPath}/dashboard.phar"; | |
$kernel = new \Hoborg\Dashboard\Kernel($rootPath); | |
$kernel->setDefaultParam('conf', 'demo'); | |
$kernel->handle(array_merge($_GET, $_POST)); |