This file contains hidden or 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
--- | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: docker-wyze-bridge-credentials | |
data: | |
API_ID: <> | |
API_KEY: <> | |
WYZE_EMAIL: <> | |
WYZE_PASSWORD: <> |
This file contains hidden or 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 zsh | |
# set -x | |
# Putting this in the user's $HOME, since that seems more secure. Probably nobody else will run this, | |
# so the risk is really just mine. | |
token_file=~/.reddit_token | |
user_agent_file=/tmp/user-agent | |
echoerr () { printf '%s\n' "$@" 1>&2; } | |
die () { |
This file contains hidden or 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 python3 | |
# Remember to either chmod +x this file and call it like this: | |
# */15 * * * * /path/to/foo.py >/dev/null 2>&1 | |
# Or invoke with python3 like this: | |
# */15 * * * * python3 /path/to/foo.py >/dev/null 2>&1 | |
from subprocess import run | |
username = 'User' | |
password = 'Pass' |
This file contains hidden or 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/python | |
import re | |
import subprocess | |
class MemoryBank(object): | |
def __repr__(self): | |
if self.is_populated: | |
return_string = """Bank Location: {0} | |
Location: {8} |
This file contains hidden or 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
sudo winusb --format INSERT_WINDOWS_ISO_NAME /dev/INSERT_DRIVE |
This file contains hidden or 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
# SI units, 1000 base | |
def sizeof_fmt_si(num, suffix='B'): | |
for unit in ['', 'K', 'M', 'G', 'T', 'P', 'E', 'Z']: | |
if abs(num) < 1000.0: | |
return "%3.1f%s%s" % (num, unit, suffix) | |
num /= 1000.0 | |
return "%.1f%s%s" % (num, 'Yi', suffix) | |
# Binary prefix, 1024 base |
This file contains hidden or 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
############ | |
# Completion | |
############ | |
autoload -U compinit promptinit | |
compinit | |
promptinit | |
############ | |
# Shell opts |
This file contains hidden or 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
" Requires ansible-lint to be installed. | |
let g:neomake_ansible_ansiblelint_maker = { | |
\ 'exe': 'ansible-lint', | |
\ 'args': ['-p'], | |
\ 'errorformat': '%E%f:%l: [ANSIBLE%n] %m,%W%f:%l: [ANSIBLE%n] %m', | |
\ } | |
let g:neomake_ansible_enabled_makers = ['ansiblelint'] |
This file contains hidden or 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
func delete_empty(s []string) []string { | |
var r []string | |
for _, str := range s { | |
if str != "" { | |
r = append(r, str) | |
} | |
} | |
return r | |
} |