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 python2 | |
# -*- coding: utf-8 -*- | |
import hashlib | |
import os | |
import re | |
import stat | |
import tempfile | |
import urllib2 |
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
[[ -r ~/.bashrc ]] && . ~/.bashrc |
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
# fix terminal-notifier hang issue under tmux (Mac only) | |
# set -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL -l" | |
# Set the prefix to ^A. | |
unbind C-b | |
set -g prefix C-A | |
bind a send-prefix | |
# Set status | |
set-option -g status-justify centre |
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 | |
DIR=${1:-gecko} | |
function setup() { | |
set -e | |
git init $1 && cd $1 | |
git config fetch.prune true |
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 python2 | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import subprocess | |
MAX_SIZE = 2000000 |
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
#include <windows.h> | |
void TurnOffMonitors(BOOL bLock = FALSE) | |
{ | |
::PostMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, 2); | |
if (bLock) ::LockWorkStation(); | |
} | |
template <BOOL bLock> | |
LRESULT CALLBACK HookProc(int nCode, WPARAM wParam, LPARAM lParam) |