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 | |
# | |
# rtunnel-auto: (C) Copyright 2014-2015 A.B. Carroll <[email protected]> | |
# | |
# On the remote server | |
# AllowTcpForwarding must be configured in order for tunneling to work. | |
# If LOCAL_HOST is an IP address that is local to the server this script | |
# is running on, it can be set to either 'yes' or 'local'. |
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 | |
// A.B. Carroll, <[email protected]> | |
// "Do whatever the fuck you want license" | |
// Generates a 'statistics chunk' for use in pronounceable word generation | |
// It's a one-time generation, so it doesn't need to be fast. | |
$file = file('/usr/share/dict/american-english'); | |
$patterns = []; |
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
countsheep(){ | |
hr=$1 | |
min=$2 | |
sec=$3 | |
if [ -z "$4" ] | |
then | |
prefix="" | |
else | |
prefix="$4" |
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 | |
# Written by A.B. Carroll <[email protected]> | |
# Use as: | |
# sleepcountdown HOUR MIN SEC "Optional Prefix" | |
# Example: | |
# sleepcountdown 00 00 10 "Time until next run: " | |
# echo "Done with first countdown!" | |
# sleepcountdown 01 00 05 "Time until next run: " | |
# echo "Done with second countdown!" |
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 | |
/* | |
* (C) Copyright 2015 A.B. Carroll <[email protected]>. MIT or BSD License - your choice. | |
*/ | |
class Utility { | |
/** | |
* Converts either a array of integers or string of comma-separated integers to a natural english range, such as "1,2,3,5" to "1-3, 5". It also supports |
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 | |
/** | |
* Class Bootstrap | |
*/ | |
class Bootstrapper { | |
/** | |
* Whether or not to directly 'echo' debugging information. This is so close to the start procedures, logging facilities are not yet created. | |
* @const bool VERBOSE | |
*/ |
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 | |
class test { | |
public function __construct(Array $dependants) { | |
array_walk($dependants, function ($dVal, $dKey) { | |
$this->$dKey = $dVal; | |
}); | |
$this->init(); | |
$this->run(); |
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 | |
// Just showing you: say nonexistent had defined a variable called $foo that is a boolean, we can hint that too | |
include 'nonexistent.php'; | |
/** @var bool $foo */ | |
if($foo) { // this won't say undefined variable in the editor! | |
echo "foo was true in nonexistent.php"; | |
} |
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
# ~/.tmux.conf | |
########################################################################### | |
# Change prefix from default (C-b) to C-g | |
# C-g doesn't interfere with emacs-style editing keys | |
#unbind -n C-b | |
#unbind -n C-a | |
#set -g prefix C-a |