Skip to content

Instantly share code, notes, and snippets.

Timestamp Container Name Pod Name Message
2021-03-03 17:38:00 destination linkerd-destination-77d95c4b9-mx54s time="2021-03-03T17:38:00Z" level=info msg="Stopping watch on endpoint [default/nextcloud-cache:6379]" addr=":8086" component=endpoints-watcher
2021-03-03 17:38:00 destination linkerd-destination-77d95c4b9-mx54s time="2021-03-03T17:38:00Z" level=info msg="Stopping watch on profile default/nextcloud-cache.default.svc.cluster.local" addr=":8086" compo
tyzbit /
Last active Jul 13, 2021
# Install Docker
sudo apt-get update
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
tyzbit /
Last active Mar 11, 2021
Download a video from a URL in clipboard automatically (bind to keyboard shortcut) (Mac/Linux)
opts="--add-metadata --no-mtime"
if [ -f /usr/local/bin/youtube-dl ]; then
youtube_dl="$(which youtube-dl)"
tyzbit / twitcher.cgi
Created Sep 29, 2020
A CGI script to show the top chat messages from IRC logs
View twitcher.cgi
alllogs=$(echo $twitchroot"*")
echo -e "Content-type: text/html; charset=utf-8\n"
echo "<html><head>"
echo "<meta charset=utf-8>"
echo "<link rel=\"stylesheet\" href=\"style.css\" />"
echo "</head><body>"
#initialize what we have to work with
tyzbit / rprompt.zsh
Last active May 27, 2021
zsh RPROMPT with execution time and current time on the right hand side
View rprompt.zsh
# refreshes the prompt every $TMOUT seconds
function preexec() {
timer=$(($(date +%s%0N)/1000000))
function precmd() {
if [ $timer ]; then
now=$(($(date +%s%0N)/1000000))
View colorify.zsh
function colorify() {
#number=$(bc <<< "$(echo ${1} | od -An -vtu1 -w100000000 | tr -d ' ') % 28 + 1")
#number=$(bc <<< "ibase=16; $(echo ${1} | md5sum | awk '{print $1}'|tr '[[:lower:]]' '[[:upper:]]')" 2> /dev/null)
# md5sum is acceptable here because we don't need a strong hashing algo at all
# we just want the property of hashing algos that a given input always means the same output
hex=$(echo ${1} | md5sum | awk '{print $1}'|tr '[[:lower:]]' '[[:upper:]]')
# removing characters is done because zsh complains about the size of the number
# even though we do this, there's still more than enough 'randomness'
# doing this also ensures the value is positive which is cool
## Use this script to configure kubectl for an EKS cluster using a role ARN.
function usage() {
echo "Usage: $0 [Amazon Role ARN]"
if [[ -z $1 ]]; then
exit 1
tyzbit /
Created Jan 23, 2020
Cache EKS tokens for kubectl
function usage() {
echo "Usage: $0 [region] [cluster name] [role arn]"
echo "If you're not using a role, [region] and [role arn] are optional"
echo "If you just use cluster name, you need aws-iam-authenticator installed"
if [ -z $1 ]; then
exit 1
tyzbit / zoom-mute-status.scpt
Created Sep 14, 2019
Get Zoom Mute/Unmute Status
View zoom-mute-status.scpt
property btnTitle : "Mute audio"
tell application "System Events" to tell application process ""
if exists (menu item btnTitle of menu 1 of menu bar item "Meeting" of menu bar 1) then
do shell script "echo Unmuted"
do shell script "echo Muted"
end if
end tell