Skip to content

Instantly share code, notes, and snippets.

View christianchristensen's full-sized avatar

Chris Christensen christianchristensen

View GitHub Profile

(Some research on the ash shell "fast, small, POSIX-compatible Unix shell")

Noted from FreeBSD (and used in BusyBox)

HISTORY

 A sh command, the Thompson shell, appeared in Version 1 AT&T UNIX.  It
 was superseded in Version 7 AT&T UNIX by the Bourne shell, which inher-
 ited the name sh.

Output:

$ ./cpu-load-hist.get.sh 
Zabbix.org: Processor load
▂▄▇█▄▆▄▃▂▂▁▁▁▁▂▄▂▃▂▂▂▁▁▁▂▂▁▂▁▁▂▁▃▂▃▃▂▁▁▁▂▂▆▅▄▂▂▂▂▂▂▂▁▁▁▄▄▄▃▁

Zabbix.org: Processor load

SSH

ssh -R 9000:localhost:9000 remote_host

Ubuntu

$ sudo apt-get install php5-xdebug
$ cat /etc/php5/conf.d/xdebug.ini
@christianchristensen
christianchristensen / apache2.example.conf
Last active December 24, 2015 07:29
Log additional request info into apache logs.
...
LogFormat "\"%r\" \"%{x-meh}o\"" test_123
CustomLog ${APACHE_LOG_DIR}/access.log test_123
...
@christianchristensen
christianchristensen / error.php
Created August 9, 2013 04:56
Error handling with PHP example.
<?php
// Setup
set_time_limit(3);
// http://php.net/manual/en/function.register-shutdown-function.php
function shutdown() {
global $start;
$elapsed=microtime(true) - $start;
echo "SHUTDOWN. Time: ${elapsed}";