View settings.json
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
{ | |
"background": "#2D333B", | |
"black": "#2D333B", | |
"blue": "#6CB6FF", | |
"brightBlack": "#768390", | |
"brightBlue": "#6CB6FF", | |
"brightCyan": "#96D0FF", | |
"brightGreen": "#8DDB8C", | |
"brightPurple": "#DCBDFB", | |
"brightRed": "#F47067", |
View setdate.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
#!/bin/sh | |
# Set missing datetime tags | |
find "${1:-$PWD}" -not -name ".DS_Store" -type f | while read f | |
do | |
# Assumption that files came from Apple Photos export | |
# Organized: | |
# <month> <day>, <year> | |
d=$(basename "$(dirname "${f}")") | |
datestamp=$(echo "${d}" | sed -E 's/(^.+[,][[:space:]])?([[:alpha:]]+[[:space:]][[:digit:]]+[,][[:space:]][[:digit:]]+)/\2/g') |
View reorg.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
#!/bin/sh | |
# Rearrange exported originals to a yyyy/mm camera roll for OneDrive | |
# Set options | |
while getopts "is" arg; do | |
case "${arg}" in | |
i) INFO=1 ;; | |
s) SUMMARIZE=1 ;; | |
esac |
View requestlog_test.go
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 handlers | |
import ( | |
"bytes" | |
"fmt" | |
"log" | |
"net/http" | |
"net/http/httptest" | |
"regexp" | |
"strings" |
View requestlog.go
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 handlers | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"time" | |
) |
View docker.bash
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
# -*- mode: unix-shell-script; -*- | |
# Run command in container with local directory mounted | |
# Useful for scripting languages like Ruby, Python, and Node | |
# Usage: docker_cmd <image> <bin> <cmd> [args] | |
docker_cmd() { | |
local image=$1; shift | |
local bin=$1; shift | |
local cmd=$1; shift | |
local args=$* |
View docker-compose.yml
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
version: "3.7" | |
services: | |
prometheus: | |
image: prom/prometheus | |
ports: | |
- 9090:9090 | |
volumes: | |
- prometheus-storage:/prometheus | |
loki: |
View help.mk
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
HELP_FORMAT=" \033[36m%-25s\033[0m %s\n" | |
.PHONY: help | |
help: ## Display this usage information | |
@echo "Valid targets:" | |
@grep -E '^[^ ]+:.*?## .*$$' $(MAKEFILE_LIST) | \ | |
sort | \ | |
awk 'BEGIN {FS = ":.*?## "}; \ | |
{printf $(HELP_FORMAT), $$1, $$2}' | |
@echo "" | |
@echo "This host will build the following targets if 'make release' is invoked:" |
View darkmode.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
# macOS display mode | |
alias darkmode='osascript -e "tell application \"System Events\" to tell appearance preferences to set dark mode to true"' | |
alias lightmode='osascript -e "tell application \"System Events\" to tell appearance preferences to set dark mode to false"' | |
alias togglemode='osascript -e "tell application \"System Events\" to tell appearance preferences to set dark mode to not dark mode"' |
View dk
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/sh | |
# Run app via docker | |
dk() { | |
# Usage: dk <cmd> <app> [args] | |
local cmd=$1; shift | |
local app=$1; shift | |
local args=$* | |
local name_prefix="${USER}_" |
NewerOlder