This file contains hidden or 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 <stdio.h> | |
#include <memory.h> | |
#define MAX 1000 /* max input line length + 1 */ | |
static char line0[MAX]; /* the 2nd to last line of input */ | |
static char line1[MAX]; /* the last line of input */ | |
static int mark0[MAX]; /* markings for line0 */ | |
static int mark1[MAX]; /* markings for line1 */ |
This file contains hidden or 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
import sys | |
try: | |
N = int(sys.argv[1]) # number of characters, the only input! | |
assert N >= 1 | |
except: | |
N = 16 | |
print "Defaulting to", N, "characters." | |
print "You could also supply a different number as argument 1." |
This file contains hidden or 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
GITBRANCH='' | |
if [ -f /etc/bash_completion.d/git ]; then | |
. /etc/bash_completion.d/git | |
GITBRANCH='$(__git_ps1)'; | |
fi | |
# You can change the colors to what you want, especially if you have a 256 color terminal. | |
# Here's a color chart: http://upload.wikimedia.org/wikipedia/en/1/15/Xterm_256color_chart.svg | |
# Change the numbers in this column | | |
# | |
This file contains hidden or 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
" .vimrc | |
syntax on " Use syntax hilighting | |
set nocompatible " Use Vim defaults, as opposed to Vi defaults | |
set bs=indent,eol,start " Allow backspacing over everything in insert mode | |
set viminfo='20,<5000 " Store ' filesworth of marks and < lines in each register in the .viminfo file | |
set history=5000 " Keep this many lines of command line history | |
set ruler " Show the cursor position all the time, bottom right corner of the screen | |
set nowrap " Do not wrap lines | |
set shiftwidth=2 " Number of spaces to use for each autoindent, by default |