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
# ~/.osx — http://mths.be/osx | |
############################################################################### | |
# General UI/UX # | |
############################################################################### | |
# Set computer name (as done via System Preferences → Sharing) | |
scutil --set ComputerName "MacBookPro" | |
scutil --set HostName "MacBookPro" | |
scutil --set LocalHostName "MacBookPro" |
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 | |
# https://gist.github.com/2371406 | |
# version 0.1 - Not much error handling yet. | |
# version 0.2 - Added --edit command | |
# | |
# Add to ~/bin/pw and chmod +x it. | |
# See bottom of file for usage. | |
PASSWORD_FILE=~/Documents/.passwords.csv |
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 csv | |
import re | |
import sys | |
from subprocess import Popen, PIPE | |
LSREGISTER = ('/System/Library/Frameworks/CoreServices.framework/Versions/A' |
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/sh | |
set -eu | |
status () { | |
echo "---> ${@}" >&2 | |
} | |
abort () { | |
echo "$@" >&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
Vagrant.configure("2") do |config| | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise64.box" | |
config.vm.provider :vmware_fusion do |f, override| | |
override.vm.box = "precise64_vmware_fusion" | |
override.vm.box_url = "http://files.vagrantup.com/precise64_vmware_fusion.box" | |
end |
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/sh | |
# | |
# gpgedit: edit an encrypted file with an associated list of recipients | |
# | |
# $ gpgedit secrets.gpg [gpg args] | |
# | |
# gpgedit needs the companion file "secrets.rcp" to exist, and contains a list | |
# of intended recipients, one per line. The recipient file can contain end-of- | |
# line comments, starting with the "#" character. |
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
""" | |
Will either compute a passwordmaker style key from `sha256(mp + site + | |
username)` or open a symmetrically keyed gpg file and lookup a specific | |
site-key for the username and password. The keyfile must follow the following | |
format:: | |
foobar.com: | |
username: johnuser | |
password: megaleet |
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
# Dynamically load virtualenvwrapper functions to reduce shell startup | |
# time. | |
# | |
# Copyright 2012 Aron Griffis <[email protected]> | |
# Released under the GNU GPL v3 | |
####################################################################### | |
# Python virtualenvwrapper loads really slowly, so load it on demand. | |
if [[ $(type -t workon) != function ]]; then | |
virtualenv_funcs=( workon deactivate mkvirtualenv ) |
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/sh | |
# | |
# gpgedit: edit an encrypted file with an associated list of recipients | |
# | |
# $ gpgedit secrets.gpg [gpg args] | |
# | |
# gpgedit needs the companion file "secrets.rcp" to exist, and contains a list | |
# of intended recipients, one per line. The recipient file can contain end-of- | |
# line comments, starting with the "#" character. |
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
function tabname { | |
# Will use current dir name if called without arg. | |
printf "\e]1;${1-$(basename `pwd`)}\a" | |
} | |
function winname { | |
# Will use current dir name if called without arg. | |
printf "\e]2;${1-$(basename `pwd`)}\a" | |
} | |
function tab { | |
# Will cd into current dir if called without arg. |