Here is a checklist to follow if you want maximum battery life -- for instance if you're about to get on a long plane flight.
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
set nocompatible " No vi support | |
set nobackup " Don't create backups | |
set mouse=a " Enable mouse support | |
set confirm " Fuck if I know | |
set ruler " Show cursor position | |
set number " Show line numbers | |
set showcmd " Show (partial) command in status line | |
set wildmenu " Show wild menu | |
set wildmode=list:longest |
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
set nocompatible | |
set number | |
set ruler | |
syntax on | |
" Set encoding | |
set encoding=utf-8 | |
" Whitespace stuff |
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
#### requires vcprompt ---- http://vc.gerg.ca/hg/vcprompt/archive/tip.tar.gz ##### | |
#### PS1 customization #### | |
twolevelprompt='$([ "$PWD" != "${PWD%/*/*/*}" ] && echo "...${PWD##${PWD%/*/*}}" || echo "$PWD")' | |
NONE="\[\033[0m\]" # unsets color to term fg color | |
# regular colors | |
K="\[\033[0;30m\]" # black | |
R="\[\033[0;31m\]" # red | |
G="\[\033[0;32m\]" # green |
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
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab | |
set history=1000 | |
set foldmethod=marker | |
set hidden | |
set backspace=indent,eol,start " Allow backspacing over everything in insert mode | |
set showcmd " Show (partial) command in status line | |
set autowrite " Automatically save before commands like :next and :make |
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
def challenge(number): | |
begin, end = divmod(number, 100) | |
middle = (number % 1000) / 10 | |
return (begin + end) == middle | |
for x in xrange(1000, 9999): | |
if challenge(x): | |
print x |
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
/** | |
* Any anals should be done here. | |
* | |
*/ | |
$(function() { | |
(function(anal) { | |
$('.follow').on('click', function(e) { | |
anal.push(['_trackEvent', 'Rightrail', 'follow_' + $(this).data('type') + '_link', $(this).data('id')]); | |
}); |
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
# bindings | |
unbind C-b | |
unbind % | |
set -g prefix C-a | |
bind-key C-a last-window | |
bind-key R source-file ~/.tmux.conf | |
# pane bindings | |
bind \ split-window -h | |
bind - split-window -v |
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
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
# bindings | |
unbind C-b | |
unbind % | |
set -g prefix C-a | |
bind-key C-a last-window | |
bind-key R source-file ~/.tmux.conf | |
# pane bindings |
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
'''Searches wikipedia and returns first sentence of article | |
Scaevolus 2009''' | |
import re | |
from util import hook, http | |
api_prefix = "http://wiki.guildwars2.com/api.php" | |
search_url = api_prefix + "?action=opensearch&format=xml" |
OlderNewer