most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
javascript:var re = new RegExp('(?:dp/)([0-9A-Z]+)'); var match = re.exec(location.href); if (match.length > 1) { var id = match[1]; var url = 'http://amzn.com/' + id; alert(url); } |
### Trash ### | |
# Trash anything from LinkedIn | |
# (Because LinkedIn is trash) | |
if address :all :is ["to", "cc", "resent-to", "x-delivered-to"] "linkedin@matthewhochler.fastmail.fm" { | |
fileinto "INBOX.Trash"; | |
stop; | |
} | |
# Trash Sony PSN 'Funds added' emails |
"""Run PEP8 on all Python files in this directory and subdirectories as part of the tests.""" | |
__author__ = 'Christopher Swenson' | |
__email__ = 'chris@caswenson.com' | |
__license__ = 'CC0 http://creativecommons.org/publicdomain/zero/1.0/' | |
import os | |
import os.path | |
import unittest |
# Adapted from: http://www.lucainvernizzi.net/blog/2015/02/12/extracting-urls-from-network-traffic-in-just-9-python-lines-with-scapy-http/ | |
# | |
# requirements | |
# scapy==2.3.1 | |
# scapy-http==1.6 | |
from scapy.all import IP, sniff | |
from scapy.layers import http | |
def process_tcp_packet(packet): |
name | default_version | installed_version | comment | |
------------------------+-----------------+-------------------+--------------------------------------------------------------------- | |
pg_buffercache | 1.0 | | examine the shared buffer cache | |
earthdistance | 1.0 | | calculate great-circle distances on the surface of the Earth | |
pg_freespacemap | 1.0 | | examine the free space map (FSM) | |
intagg | 1.0 | | integer aggregator and enumerator (obsolete) | |
plperl | 1.0 | | PL/Perl procedural language | |
sslinfo | 1.0 | | information about SSL certificates | |
btree_gist | 1.0 | | support for indexing common datatypes in GiST | |
fuzzystrmatch | 1.0 |
#/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
#!/bin/bash | |
# | |
# When you are working on your macbook sitting in cafe and you have to go pee, | |
# you need some way to guard you machine. | |
# | |
# Start this script, remove any earphones, and go do the job. | |
# The assumption is the thief will close the lid of the laptop before taking it away. | |
# This script detects the closing of the lid and plays some loud audio that will | |
# likely distract the thief and/or grab attention of nearby people, making the |
#!/bin/bash | |
# Requires OS X with Homebrew | |
## Configuration ## | |
FROM_NAME="" | |
FROM_EMAIL="" | |
KINDLE_EMAIL="" | |
SMTP_HOST="" | |
SMTP_PORT="587" |