$ http-ping -c 5 -u google.com
Found google.com, assuming you mean http://google.com/
HTTP-PING google.com (62.253.3.89): GET request
11K bytes from www.google.co.uk: http_seq=0 status=200 time=301.44 ms
11K bytes from www.google.co.uk: http_seq=1 status=200 time=186.29 ms
12K bytes from www.google.co.uk: http_seq=2 status=200 time=185.33 ms
12K bytes from www.google.co.uk: http_seq=3 status=200 time=288.65 ms
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/sh | |
die () { | |
echo $1 | |
exit $2 | |
} | |
red () { | |
if [ -x $(which tput) ]; then | |
tput setaf 1 |
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
# Tested on Ubuntu 12.04 | |
# | |
# Prints full commands, with environment, with wrapping | |
ps -efww ef | |
# Prints all commands with CPU and memory usage, sorted by memory in ascending order | |
ps -eo cmd,%cpu,%mem --sort +%mem | |
# Same with descending order | |
ps -eo cmd,%cpu,%mem --sort -%mem |
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
#!/usr/bin/env bash | |
set -e | |
FILES_TO_PRUNE="path_to_large_file_from_root_of_repo" | |
catch_error () { | |
local cmd_name=$1 | |
local ret_code=$2 | |
if [ $ret_code -ne 0 ]; then |
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
#!/usr/bin/env ruby | |
# qpasswd - password generator from quantum RNG | |
require 'open-uri' | |
rng = 'https://qrng.anu.edu.au/wp-content/plugins/colours-plugin/get_block_alpha.php' | |
ARGV.size < 1 ? pw_size = 16 : pw_size = ARGV[0].to_i | |
data = open(rng).read.strip.split('') | |
output = data.sample(pw_size) |
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
-- 1. Place in ~/Library/Scripts and enable the Applescript menu via the Applescript Editor | |
-- 2. Substitute "vpn.example.com" and "redacted" for your VPN server and password | |
-- 3. Open Security & Privacy System Preferences, go to Privacy, Accessibility | |
-- 4. Enable Applescript Editor and System UI Server | |
-- 5. Trigger script from the menu | |
-- 6. Enjoy being connected | |
tell application "Cisco AnyConnect Secure Mobility Client" | |
activate | |
end tell |
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
#!/usr/bin/env python | |
print(""" | |
α Α = alpha | |
β Β = beta | |
γ Γ = gamma | |
δ Δ = delta | |
ε Ε = epsilon | |
ζ Ζ = zeta | |
η Η = eta |
I hereby claim:
- I am andrewh on github.
- I am andrewh (https://keybase.io/andrewh) on keybase.
- I have a public key ASC8teA31aZ0PyFgd7wQIJwy-g3yPmhCtttEZE0eW1nhAwo
To claim this, I am signing this object: