Skip to content

Instantly share code, notes, and snippets.

View tydavis's full-sized avatar

Tyler Davis tydavis

View GitHub Profile
$ grep bin /etc/shells | while read -r s; do hyperfine --warmup 3 "$s -i -c 'exit 0'"; done
Benchmark 1: /bin/bash -i -c 'exit 0'
Time (mean ± σ): 2.3 ms ± 0.1 ms [User: 0.5 ms, System: 1.2 ms]
Range (min … max): 2.0 ms … 2.6 ms 656 runs
Benchmark 1: /bin/csh -i -c 'exit 0'
Time (mean ± σ): 2.3 ms ± 0.1 ms [User: 0.6 ms, System: 1.0 ms]
Range (min … max): 2.0 ms … 3.8 ms 711 runs
@tydavis
tydavis / error output
Created July 28, 2023 13:30
cargo install -F vendored-openssl cargo-update --force
...
Compiling unicode-normalization v0.1.22 13:28:34 [40/81]
Compiling openssl-src v111.26.0+1.1.1u
Compiling unicode-bidi v0.3.13
Compiling openssl-sys v0.9.90
Compiling libz-sys v1.1.12
error: failed to run custom build command for `openssl-sys v0.9.90`
Caused by:
process didn't exit successfully: `/tmp/cargo-installCJeUv3/release/build/openssl-sys-cc788c7762b3c452/build-script-main` (exit status:
@tydavis
tydavis / applescript
Last active May 10, 2023 14:12
applescript-changeTerminal-autodarkmode
tell application "System Events" to tell appearance preferences to set whatMode to the (get dark mode)
if (whatMode = true) then
tell application "Terminal" to set default settings to settings set "gruvbox-dark"
tell application "Terminal"
set current settings of every window whose visible is true to settings set "gruvbox-dark"
end tell
else
tell application "Terminal" to set default settings to settings set "gruvbox-light"
tell application "Terminal"
artificial ignorance: how-to guide
Marcus J. Ranum mjr@nfr.net
Tue, 23 Sep 1997 23:06:06 +0000
Previous message: Here is my plan for firewall implementation
Next message: artificial ignorance: how-to guide
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
By request, here's a quick how-to on log scanning via
artificial ignorance. :) It assumes UNIX and the presence
@tydavis
tydavis / base16-default.dark.terminal
Created January 29, 2019 14:44
Terminal colors for Base16, default, dark
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
LjA5NDExNzY0NzEgMC4wOTQxMTc2NDcxIDAuMDk0MTE3NjQ3MQAQAYAC0hAREhNaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp
@tydavis
tydavis / git-completion.bash
Created January 28, 2019 23:19
Git Completion script for osx
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
# *) local and remote branch names
# *) local and remote tag names
@tydavis
tydavis / keybase.md
Created April 4, 2018 04:42
keybase.md

Keybase proof

I hereby claim:

  • I am tydavis on github.
  • I am tydavis (https://keybase.io/tydavis) on keybase.
  • I have a public key ASB9pZMeJbkM-zv9a_1NYlz2HucLzhpy8J3aP2Jp9xiALwo

To claim this, I am signing this object:

#!/bin/bash
mkdir -p ~/go/{src,bin,pkg}
mkdir -p ~/go/src/github.com/tydavis
mkdir -p ~/go/src/gitlab.com/tydavis
# Get latest go
sudo rm -rf /usr/local/go
wget https://storage.googleapis.com/golang/go1.8.3.linux-amd64.tar.gz
sudo tar -C /usr/local/ -xzf go1.8.3.linux-amd64.tar.gz
@tydavis
tydavis / getGoTools.sh
Last active July 24, 2018 17:27
Setup Go tools
#!/bin/sh
go get -u github.com/dougm/goflymake
go get -u github.com/acroca/go-symbols
go get -u github.com/alecthomas/gometalinter
go get -u github.com/cweill/gotests/...
go get -u github.com/davidrjenni/reftools/cmd/fillstruct
go get -u github.com/derekparker/delve/cmd/dlv
go get -u github.com/dominikh/go-tools/cmd/keyify
go get -u github.com/fatih/gomodifytags