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
» cat ~/bin/gocover | |
#!/usr/bin/env bash | |
set -e | |
coverprofile="cover.out" | |
pkgs=${@-.} | |
function _cleanup { | |
rm -f $coverprofile |
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 -euo pipefail | |
url="https://github.com/MediaBrowser/Emby.Releases/raw/master/tizen/tizen.zip" | |
usbstick="/dev/disk/by-id/usb-JetFlash_Transcend_8GB_AA6H19F78R2DV2FP-0:0-part1" | |
tmpdir=$(mktemp -d) | |
usbdir="$tmpdir/usb" | |
usbpkg="$usbdir/tizen.zip" |
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
import ( | |
"bytes" | |
"fmt" | |
"os" | |
"os/exec" | |
"strings" | |
"syscall" | |
) | |
type ErrorHandler func(cmdLine string, exitCode int, output string) |
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 -eu | |
NONE='\033[0m' # default coloring | |
K='\033[0;30;1m' # black | |
R='\033[0;31;1m' # red | |
G='\033[0;32;1m' # green | |
Y='\033[0;33;1m' # yellow | |
B='\033[0;34;1m' # blue |
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 -eu | |
active_branch=$(git branch | awk '/^\* / { print $2 }') | |
case "$active_branch" in | |
prod|master) | |
;; | |
*) |
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 -eu | |
NONE='\033[0m' # default coloring | |
K='\033[0;30;1m' # black | |
R='\033[0;31;1m' # red | |
G='\033[0;32;1m' # green | |
Y='\033[0;33;1m' # yellow | |
B='\033[0;34;1m' # blue |
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
dig +short myip.opendns.com @resolver1.opendns.com |
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
smartctl 6.4 2014-10-07 r4002 [x86_64-linux-3.16.0-4-amd64] (local build) | |
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org | |
=== START OF INFORMATION SECTION === | |
Vendor: HITACHI | |
Product: HUC106060CSS600 | |
Revision: A360 | |
Compliance: SPC-4 | |
User Capacity: 600,127,266,816 bytes [600 GB] | |
Logical block size: 512 bytes |