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 | |
import argparse | |
import datetime | |
import os | |
import os.path | |
import subprocess | |
import time | |
def log_message(message): |
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 bash | |
set -Eeuo pipefail | |
function main() { | |
local input_file="$1" | |
cat <<EOF | |
from __future__ import print_function | |
import bz2 |
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
# The following is very useful for keeping track of ongoing work in dependent branches, e.g., before rebasing. | |
git log --graph --oneline --decorate --all --ancestry-path --not master $(git merge-base master HEAD) |
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 bash | |
git submodule foreach 'git fetch origin && git checkout $(git symbolic-ref refs/remotes/origin/HEAD)' |
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 bash | |
# Show the upstream tracking branch for HEAD | |
git rev-parse --abbrev-ref --symbolic-full-name '@{u}' | |
# Show the upstream tracking branch for `my-branch` | |
git rev-parse --abbrev-ref --symbolic-full-name 'my-branch@{u}' | |
# List each local branch along with its upstream tracking branch | |
git for-each-ref --format='%(refname:short) <- %(upstream:short)' refs/heads |
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 | |
import argparse | |
import secrets | |
import string | |
def generate_diceware_password(length, word_file): | |
with open(word_file) as file: | |
lines = [line.rstrip() for line in file] |
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
MIT License | |
Copyright (c) 2018 Benjamin Sidhom | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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 | |
import argparse | |
import io | |
import os.path | |
import re | |
import subprocess | |
import tempfile | |
def merge_videos(inputs, output): |
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 bash | |
set -euo pipefail | |
function main() { | |
if [[ "$#" != 1 ]] ; then | |
printf "usage: %s <input file>\n" "$0" >&2 | |
return 2 | |
fi | |
local file="$1" |
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 bash | |
# Usage: ffcat <output> <input> [input ...] | |
set -euo pipefail | |
# Prints the contents of a concat file for ffmpeg. | |
function catfile() { | |
local inputs=($@) | |
local input |