git config --global merge.tool=vimdiff
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 | |
# Identify changes to a filesystem | |
fsdiff(){ | |
( | |
defaultdirs=(.) | |
localdirs=("$HOME") | |
systemdirs=(/etc /home /opt /root /usr /var) | |
if (( $# == 0 )); then |
For some reason, the network interfaces in ubuntu/wily64 fail to configure at boot. The interfaces are renamed during boot, with dmesg
reporting things like udev renamed network interface eth0 to enp1s0. This is apparently the result of a change in systemd. You can read about it here:
Starting with v197 systemd/udev will automatically assign predictable, stable network interface names for all local Ethernet, WLAN and WWAN interfaces. This is a departure from the traditional interface naming scheme ("eth0", "eth1", "wlan0", ...), but should fix real problems.
http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
I hereby claim:
- I am brbsix on github.
- I am brbsix (https://keybase.io/brbsix) on keybase.
- I have a public key whose fingerprint is 25B6 9A6A EB57 830F 5B25 E9C1 3B5B C114 80C7 62BC
To claim this, I am signing this object:
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 | |
# | |
# Create a pdf from HTML or URL | |
cleanup(){ | |
# check whether $TEMPDIR exists and is a subdir of /tmp | |
if [[ -d $TEMPDIR && $(dirname "$TEMPDIR") = /tmp ]]; then | |
rm -rf "$TEMPDIR" | |
fi |
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
# Create a temporary pyenv virtualenv | |
mktempenv(){ | |
[[ $1 =~ ^(-h|--help)$ ]] && { | |
echo "Usage: ${FUNCNAME[0]} [VERSION] [NAME]" | |
echo 'Create a temporary pyenv virtualenv' | |
return 0 | |
} | |
local pyenv_version=${1:-$(pyenv version-name)} | |
local venv_name=${2:-$(mktemp --dry-run -d "tmp-$pyenv_version-XXXXXX")} |
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
# [Git] | |
_completion_loader git | |
alias g="git" | |
__git_complete g _git | |
alias ga="git add" | |
__git_complete ga _git_add | |
alias gap="git add --patch" | |
__git_complete gap _git_add | |
alias gb="git branch" | |
__git_complete gb _git_branch |
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
# -*- coding: utf-8 -*- | |
"""Poll websites for new entries""" | |
# standard imports | |
import itertools | |
from collections import deque | |
# external imports | |
from pickleshare import PickleShareDB |
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
"""Render HTML for scraping""" | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
from contextlib import contextmanager | |
from multiprocessing import Pool | |
try: | |
TimeoutError |
OlderNewer