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 python3 | |
""" | |
Usage: $0 myapp.modulewithmain [ARGV..] | |
""" | |
import ipdb | |
import runpy | |
import sys | |
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 | |
usage() { | |
cat <<-'EOF' | |
# Container exec | |
A method for exporting commands for transparent docker-compose usage from your shell, | |
letting you forget that you're even using commands across different containers. |
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 python3 | |
""" | |
_____________ | |
tabs-to-repos -- Quickly gnt all of the github repos that you have open in firefox tabs. | |
Pipe the output to your shell to actually clone them, otherwise it just prints the commands and some comments ;) | |
@trevorj 12/2017 | |
https://gist.github.com/akatrevorjay/3fb5bc753edd42b2abd0accb4dde4cdc | |
""" |
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 python | |
""" | |
json2yaml -- what it says. | |
Features: | |
- Preserves order of original document, which makes diffing much easier. | |
- Symlink it to `j2y`, `y2j`, 'yaml2json` and it'll do what you expect. | |
https://gist.github.com/akatrevorjay/918755c8eb2c66a48566d77fb578630c | |
""" |
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 zsh | |
## | |
## "You know, for sanity." | |
## | |
## ES clusters can determine that your shards are permanently missing at times, marking them forever unassigned. | |
## You go and look, but the shards are right there. What? | |
## What this script does is kick ES to make it actually take a look. | |
## For some reason telling ES to move the shard makes it realize it does in fact exist. Don't ask me, man. | |
## | |
set -eo pipefail |
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
# | |
# refind.conf | |
# Configuration file for the rEFInd boot menu | |
# | |
# Timeout in seconds for the main menu screen. Setting the timeout to 0 | |
# disables automatic booting (i.e., no timeout). Setting it to -1 causes | |
# an immediate boot to the default OS *UNLESS* a keypress is in the buffer | |
# when rEFInd launches, in which case that keypress is interpreted as a | |
# shortcut key. If no matching shortcut is found, rEFInd displays its |
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 six | |
import sys | |
import pygments | |
from pprint import pformat | |
STYLE = pygments.styles.get_style_by_name('monokai') | |
FORMATTER = pygments.formatters.get_formatter_by_name('console16m', style=STYLE) | |
LEXER_PYTHON = pygments.lexers.get_lexer_by_name('python{}'.format(six.PY3 and '3' or '')) | |
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
from thespian.actors import * | |
from datetime import datetime, timedelta | |
from logging import getLogger, basicConfig, DEBUG | |
from random import randint | |
basicConfig(level=DEBUG) | |
log = getLogger(__name__) | |
class Postman(Actor): |
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 python | |
from __future__ import print_function, absolute_import | |
import itertools | |
import logging | |
import logging.config | |
import sys | |
import argparse | |
import io |
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 | |
reset="\e[0m" | |
red="\033[0;31m" | |
green="\033[0;32m" | |
for url in "$@"; do | |
if curl -sSLfo /dev/null "$url" >/dev/null 2>&1; then | |
echo -e "${green}GOOD" "$url" "${reset}" |
NewerOlder