Skip to content

Instantly share code, notes, and snippets.

View FL33TW00D's full-sized avatar
🎯
Focusing

Christopher Fleetwood FL33TW00D

🎯
Focusing
View GitHub Profile
@FL33TW00D
FL33TW00D / onnx
Created July 22, 2022 07:45
All ONNX Ops - 22/07/22
Abs
Acos
Acosh
Add
And
ArgMax
ArgMin
Asin
Asinh
Atan
@FL33TW00D
FL33TW00D / tail_logs.sh
Created April 23, 2022 20:47
Bunyan format logs from Digital Ocean
#!/bin/bash
deployment_id=`doctl apps list | grep -m 1 -Eo '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}' | head -1`
curdate=`gdate +%s`
logs=`doctl apps logs ${deployment_id} --tail 10000 > logs/$PROJECT_NAME-${curdate}.log`
sed -i '' 's/$PROJECT_NAME .*{/{/g' logs/$PROJECT_NAME-${curdate}.log
cat logs/$PROJECT_NAME-${curdate}.log | bunyan
if [ $? -eq 0 ]; then
echo Successfully retrieved and tailed logs for ${deployment_id}
else
echo Failed to tail logs
@FL33TW00D
FL33TW00D / .zshrc
Created April 11, 2022 13:53
zshrc
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH