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/zsh | |
# git-fshow - git commit browser | |
# | |
# https://gist.github.com/akatrevorjay/9fc061e8371529c4007689a696d33c62 | |
# https://asciinema.org/a/101366 | |
# | |
git-fshow() { | |
local g=( | |
git log |
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 | |
# | |
# loc: mlocate + fzf integration | |
# | |
# https://gist.github.com/06dc1238b2fcbfb6c10bbad05ad79bc1 | |
# https://asciinema.org/a/102006 | |
# | |
# ~ trevorj <github@trevor.joynson.io> | |
# | |
setopt pipe_fail err_return err_exit |
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 -e | |
# Blocksize to truncate to and buffer by | |
BS=${BS:-4096} | |
SELF="`basename $0`" | |
death() { echo "$SELF:" "$@" >&2; exit 1; } | |
[ $# -eq 2 ] || death "Usage: $SELF original copy" | |
SRC="$1"; DST="$2" |
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 | |
# | |
# Given standard docker line variables, parses and waits for them to respond to SYNs in parallel with timeout. | |
# Works with tcp, udp, and unix sockets. | |
# | |
# @deps bash>=4 netcat | |
# @url https://github.com/akatrevorjay/wait-for-linked-services | |
# @author trevorj | |
# | |
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
#!/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
import glob | |
import itertools | |
import os | |
# This is getting ridiculous | |
try: | |
from pip._internal.req import parse_requirements | |
from pip._internal.network.session import PipSession | |
except ImportError: | |
try: |
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
#!/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 | |
""" | |
Originally from: https://www.stavros.io/posts/python-fuse-filesystem/ | |
All credit goes to the author, not me. | |
""" | |
from __future__ import with_statement | |
import os | |
import sys |
NewerOlder