Skip to content

Instantly share code, notes, and snippets.

@hwine
hwine / install_hg_bash_completion
Created October 12, 2015 23:52
Install matching bash completion script for current hg version.
#!/bin/bash
set -eu
hg_version=$(hg --version | grep version | sed 's,^.*(version ,,; s,).*,,')
hg_base_url=https://selenic.com/hg/rawfile/${hg_version}/contrib/bash_completion
tmp_file=/tmp/hg_completion.bash
cur_file=/usr/local/etc/bash_completion.d/hg
@hwine
hwine / decode_hosts.py
Created July 31, 2015 02:48
decode hashed known_hosts
#!/usr/bin/env python
"""
Find host - decode hashed known_hosts files
Using an unhashed known_hosts file as reference, compare by host
key.
"""
import logging