This file contains 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
package main | |
import ( | |
"io" | |
"os" | |
"strings" | |
) | |
// pathdedupe | |
// - kayos |
This file contains 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 | |
function newFile() { | |
_resfile="dns_results.$(date +%s).csv" | |
echo "hostname,ips" >>"$_resfile" | |
echo "$_resfile" | |
} | |
resfile="$(newFile)" | |
export resfile |
This file contains 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
package main | |
import ( | |
"database/sql" | |
"flag" | |
"os" | |
"regexp" | |
"runtime" | |
"strings" |
This file contains 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
package main | |
import ( | |
"bufio" | |
"bytes" | |
"encoding/base64" | |
"encoding/hex" | |
"io" | |
"os" | |
"path/filepath" |
This file contains 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 | |
function _getExt() { | |
echo "$@" | awk -F '.' '{print $NF}' | |
} | |
function _getArchiveName() { | |
_ext="$(_getExt "$@")" | |
_name="${*/.$_ext//}" | |
_name="${_name//\//}" |
This file contains 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 | |
# snag: colorize, bat, apt-file, apt-fast, toilet | |
alias aget='sudo apt-get install' | |
alias qaget='sudo apt-fast -y install' | |
alias aremove='sudo apt-get remove' | |
alias apurge='sudo apt-get purge' | |
alias ashow="_ashow" |
This file contains 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 | |
# example output: | |
# cleaning duplicate netfilter rules... | |
# updating netfilter rules... | |
# updating iptables... | |
# latest: SHA256 (-) = e32144dcf88d333d2ecfbce61fc2392045c462b3370093b70bd5429c3ae9e922 | |
# current: SHA256 (-) = e32144dcf88d333d2ecfbce61fc2392045c462b3370093b70bd5429c3ae9e922 | |
# backing up old rules... |
This file contains 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
package main | |
// ▄─▄ ▄ ▄ ▄ ──▄ ▄─▄ ▄─▄ | |
// ▓─ ▓ ▓ ▓ ▓ ▓ ▀─▄ ▀─▄ | |
// ▀ ▀─▀─▀ ──▀ ▀─▀ ▀─▀ | |
// f w d --> 5 5 | |
// | |
// simple rfc1928 proxy server | |
// | |
// |
This file contains 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
package main | |
import ( | |
"errors" | |
"fmt" | |
"git.tcp.direct/kayos/common/entropy" | |
"git.tcp.direct/kayos/common/squish" | |
"github.com/manifoldco/promptui" | |
"os" | |
"strconv" |
This file contains 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 | |
# included shebang for completeness but likely you'd wanna tack this onto a profile or bashrc, something that gets sourced by your shell | |
function isDir() { | |
if [ -d "$1" ]; then return 0; else | |
echo "$1 is not a directory, bail" | |
return 1 | |
fi | |
} | |
NewerOlder