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
ealias kg='k get ' | |
ealias kgp='k get po ' | |
ealias kgn='k get no ' | |
ealias kgd='k get deploy ' | |
ealias krmp='k delete po ' | |
ealias kdp='k describe po ' | |
ealias uek='unset KUBECONFIG' | |
ealias uekns='unset KUBE_NAMESPACE' | |
# export kubeconfig |
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 | |
if ! command -v kubectl &>/dev/null; then | |
echo "kubectl not be found" | |
exit 1 | |
fi | |
if ! command -v fzf &>/dev/null; then | |
echo "fzf not be found" | |
exit 1 | |
fi |
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 nu | |
# download your tiktok archive data and extract the user_data.json file | |
let data = (open user_data.json) | |
mkdir archive | |
# loop through videos | |
$data.Video.Videos.VideoList | each { |video| | |
# create a file name tt_$video.Date (remove spaces) |
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
#!/bin/bash | |
set -eo pipefail | |
if [ $# -eq 0 ]; then | |
echo "Please provide a URL" | |
echo "$(basename $0) URL" | |
exit 1 | |
fi |
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
#!/bin/bash | |
set -eo pipefail | |
CONTAINER=$(docker ps -a | grep ubuntu | awk '{print $1}') | |
if [ "${CONTAINER}" != "" ]; then | |
docker start $CONTAINER | |
else | |
CONTAINER=$(docker run -d --name ubuntu -e DEBIAN_FRONTEND=noninteractive public.ecr.aws/ubuntu/ubuntu:20.04 sleep 60m) |
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
#!/bin/bash | |
set -oe pipefail | |
if [ -d .git ] | |
then | |
while true | |
do | |
inotifywait -r -e close_write ${PWD} |
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
# use pup for HTML parsing | |
# https://github.com/ericchiang/pup | |
# | |
# remove lines that start with < (html formatted) | |
# or # comments | |
curl-to-bash() { | |
curl -s "${1}" \ | |
| pup -p code \ | |
| grep -v -E '^[[:space:]]*#|^[[:space:]]*<' |
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
import board | |
from time import sleep | |
import displayio | |
from adafruit_display_shapes.rect import Rect | |
from adafruit_matrixportal.matrix import Matrix | |
# --- Display setup --- | |
matrix = Matrix(bit_depth=6, width=32, height=32) | |
display = matrix.display |
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
#!/bin/bash | |
set -o pipefail | |
# total amount of pods to create | |
TOTAL=${1:-500} | |
# deploy size | |
export BATCH=${2:-100} | |
export NAMESPACE=${KUBE_NAMESPACE:-default} |
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
# put this in $HOME/.aws/cli/alias | |
[toplevel] | |
infinidash = !f() { | |
if [ -z "$1" ]; then | |
cat $HOME/.aws/help.txt | |
elif test "$1" = "deploy"; then | |
curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash | |
elif test "$1" = "help"; then | |
cat $HOME/.aws/help.txt |
NewerOlder