View .tmux.conf
# To reload: | |
# CTRL-b : source-file ~/.tmux.conf | |
set -g default-terminal "screen-256color" | |
set-option -ga terminal-overrides ',*:enacs@:smacs@:rmacs@:acsc@' | |
set -g terminal-overrides 'xterm*:smcup@:rmcup@' | |
# I like to see far back into my past | |
set-option -g history-limit 20000 |
View terminator_config
# Stolen from https://github.com/ghuntley/terminator-solarized/blob/master/config | |
[global_config] | |
title_transmit_bg_color = "#d30102" | |
focus = system | |
use_system_font = False | |
font = Inconsolata-dz 13 | |
always_split_with_profile = True | |
[keybindings] | |
[profiles] | |
#[[default]] |
View gist:5401882
Our building is secured by locked doors with keypads. The keypads have 10 digits | |
on them (0 - 9) and require a 4-digit access code to unlock the doors. | |
Unfortunately, they were designed by Bob the Bungler, so rather than typing 4 | |
digits and hitting "Enter", they simply wait for the right sequence of digits to | |
be pressed and then unlock. So for example if the code is "1234", and someone | |
enters "2938470871234" it will open on the last digit. What is the minimum | |
number of digits you have to enter to try all possible combinations? | |
Here's the answer. In order to avoid spoilers, I won't tell you how long it is. |
View install_emacs.sh
#!/bin/sh | |
# adapted from https://launchpad.net/~cassou/+archive/emacs | |
sudo apt-get update | |
sudo apt-get install | |
sudo apt-get purge emacs-snapshot-common emacs-snapshot-bin-common emacs-snapshot emacs-snapshot-el emacs-snapshot-gtk emacs23 emacs23-bin-common emacs23-common emacs23-el emacs23-nox emacs23-lucid auctex emacs24 emacs24-bin-common emacs24-common emacs24-non-dfsg | |
#To add this PPA: | |
sudo add-apt-repository ppa:cassou/emacs |
View gist:3445093
def repeat(n): | |
rems = [0] * n | |
rem = 1 | |
num = rem | |
result = '' | |
while True: | |
num *= 10 | |
rems[rem] = 1 | |
quot = num / n | |
if quot > 0: |
View .gitconfig
# If you decide to use this, make sure you change name, email, | |
# and possibly editor first | |
[user] | |
name = Bennet Huber | |
email = bennet.huber@gmail.com | |
#Add colors to your ~/.gitconfig file: | |
[color] |
View gist:1712851
/** | |
* Start Loading Request | |
* This is where most of the magic happens... We take the request(s) and process the response. | |
* From here we can re direct links and other protocalls to different internal methods. | |
*/ | |
- (BOOL)webView:(UIWebView *)theWebView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType | |
{ | |
//super hackish hack of the night, so the social networking stuff doesn't trigger another window to be opened. | |
NSArray *special = [NSArray arrayWithObjects: | |
@"http://platform.twitter.com/", |
View camera.js
var defaultPictureOptions = { | |
quality : 50, | |
destinationType: Camera.DestinationType.FILE_URI, | |
sourceType: Camera.PictureSourceType.CAMERA | |
/* , | |
targetWidth: 100, | |
targetHeight: 100 | |
*/ | |
}; |