readme
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 | |
set -euo pipefail | |
LAST_EVENT="" | |
API_KEY="" | |
WEBHOOK_ENDPOINT="" | |
while true; do | |
OUTPUT=$(stripe --api-key $API_KEY events list --ending-before $LAST_EVENT --limit 100) | |
EVENTS=$(echo $OUTPUT | jq -r '.data[] | .id') |
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 | |
# Run command on current file with helix using zellij | |
# Requires https://github.com/helix-editor/helix/pull/6985 | |
# eg. echo current filename | |
# :sh he echo | |
set -euo pipefail | |
# run command | |
zellij action write-chars ':' | |
# write shell command | |
zellij action write-chars "sh $@ " |
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
# Git checkout latest on a different branch without moving your HEAD twice | |
gcol() { | |
if [ -z $1 ]; then | |
echo "Error: Please provide branch name" | |
return | |
fi | |
git fetch | |
git branch -f $1 origin/$1 | |
git checkout $1 | |
} |
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
{"lastUpload":"2020-03-11T06:16:27.511Z","extensionVersion":"v3.4.3"} |
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 re | |
debug = False | |
file = None | |
if debug: | |
file = open('test.txt', 'r') | |
else: | |
file = open('core10k.txt', 'r') |
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 re | |
debug = False | |
file = None | |
if debug: | |
file = open('test.txt', 'r') | |
else: | |
file = open('core10k.txt', 'r') |
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 | |
if [ $# -eq 0 ] | |
then | |
echo "Templater" | |
echo "Copies templates from one folder to another." | |
echo "Only replaces variables that exist in the environment" | |
echo "Usage: templater IN_FOLDER OUT_FOLDER" | |
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 | |
REGISTRY_IP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' registry) | |
for f in * | |
do | |
if [[ "$f" != *\.sh ]] | |
then | |
config=$(<$f); | |
config=${config//REGISTRY_IP/$REGISTRY_IP}; | |
printf '%s\n' "$config" >../sites-enabled/$f |
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
require 'mail' |
NewerOlder