Skip to content

Instantly share code, notes, and snippets.

View ghostsquad's full-sized avatar

Wes McNamee ghostsquad

View GitHub Profile
@ghostsquad
ghostsquad / ping-with-timestamp.ps1
Last active October 17, 2022 05:36
powershell-ping-timestamp
ping.exe -t 172.217.14.238 | Foreach{"{0} - {1}" -f (Get-Date),$_} | Tee-Object -Append -FilePath internet-test.log
@ghostsquad
ghostsquad / prompt_perf.sh
Created February 28, 2019 15:20
Measure Prompt Performance
#! /usr/bin/env bash
for i in $(seq 1 10); do
start=$(($(date +%s%N)/1000000))
print -P $PS1 $RPS1;
end=$(($(date +%s%N)/1000000))
echo Execution time was `expr $end - $start` ms.
done
@ghostsquad
ghostsquad / setup.sh
Last active June 9, 2023 18:32
terminal/home setup
# https://github.com/wagoodman/dive
# https://github.com/hadolint/hadolint
# https://www.shellcheck.net/
# https://github.com/johanhaleby/kubetail
# https://github.com/wercker/stern
# https://httpie.org/
# https://github.com/Versent/saml2aws#osx
# https://asdf-vm.com/#/core-manage-asdf-vm
brew tap \
@ghostsquad
ghostsquad / keybase.md
Created January 4, 2018 18:55
keybase identity proof

Keybase proof

I hereby claim:

  • I am ghostsquad on github.
  • I am ghostsquad (https://keybase.io/ghostsquad) on keybase.
  • I have a public key whose fingerprint is 60B0 DC04 C579 39BF 8AC6 0688 1C08 DB44 DEC7 CAFC

To claim this, I am signing this object:

@ghostsquad
ghostsquad / help_generate.go
Last active January 3, 2018 00:42
VFSGen with Custom FS
// +build ignore
package main
import (
"log"
"github.com/shurcooL/vfsgen"
"go/build"
"net/http"
"os"
@ghostsquad
ghostsquad / dominion_links.md
Last active April 28, 2017 17:56
Dominion Storage Links
@ghostsquad
ghostsquad / error_handing_best_practices.md
Last active March 30, 2017 21:59
How to define and handle error conditions

Exception/Error Handling and Logging

Log Levels

First, let's define various error levels (log levels).

Fatal/Critical: The application composition root should look something like this:

def main(*args)