How To get haproxy status via socket using cli

Author: , October 6th, 2017

echo “show stat” | nc -U /var/lib/haproxy/stats | cut -d “,” -f 1,2,5-11,18,24,27,30,36,50,37,56,57,62 | column -s, -t

How To Install a .pkg file from the Command Line on MacOSX

Author: , August 12th, 2016

sudo /usr/sbin/installer -pkg /path/to/yourFile.pkg -target /

How To Eject a Volume from the Terminal Command Line in MacOSX

Author: , December 8th, 2015

As always, YMMV… 1 2 3 4 5 6 7 8 9 #!/bin/bash # Usage: eject [fullpath to mount point] DISK="${1:-/Volumes/YourUSBFlashDriveName/}" df -h "$DISK" > /dev/null 2>&1 if [ $? -eq 0 ]; then    diskutil unmountDIsk `diskutil list "$DISK" | grep ^/dev/` else    echo Volume $DISK is not mounted…skipping. fi #!/bin/bash # Usage: […]

How To Convert UNIX Timestamps to Date using PHP CLI

Author: , August 15th, 2015

For a quick visual check to see what the human-readable date is based on a UNIX timestamp integer: php -r ‘print date(“r”,1483228799);’ php -r ‘print strtotime(“1 Jan 2015″) – 1;’

How To Show All Files in MacOSX Yosemite via Terminal

Author: , October 29th, 2014

SET THE DEFAULT TO SHOW Run this command in a Terminal window: defaults write AppleShowAllFiles YES Relaunch Finder: Hold down the Option/ALT key on your keyboard, then right-click the Finder icon in the dock and select Relaunch. SET THE DEFAULT TO HIDE defaults write AppleShowAllFiles NO then relaunch finder as above.