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 number | |
set ts=2 | |
set expandtab | |
nnoremap <tab> % | |
vnoremap <tab> % | |
nnoremap ; : | |
let mapleader = "," | |
nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR> |
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
(setq make-backup-files nil) | |
(setq-default indent-tabs-mode nil) | |
(setq-default tab-width 4) | |
(setq standard-indent 4) | |
(setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80)) | |
(setq c-basic-offset 4) | |
(autoload 'paredit-mode "paredit" | |
"Minor mode for pseudo-structurally editing Lisp code." t) |
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
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
ServerName drupal | |
DocumentRoot /var/www/drupal | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
LogLevel warn | |
CustomLog ${APACHE_LOG_DIR}/access.log combined |
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
find <directory> -type f -name '*php' -print0 | xargs -0 -n1 -P10 php -l |
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
# swap tabs for spaces | |
s/\t/ /g | |
# ensure spaces around => | |
s/([^ ])=>([^ ])/\1 => \2/g | |
# remove trailing whitespace | |
s/ +$//g | |
# ensure spaces around . |
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 | |
# | |
# Hook script to check the changed files with php lint | |
# Called by "git commit" with no arguments. | |
# | |
# To enable this hook, rename this file to "pre-commit". | |
if git rev-parse --verify HEAD >/dev/null 2>&1 | |
then | |
against=HEAD |
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/bash | |
# Bash script to pull document titles from | |
# Project Gutenberg ebooks. | |
# Invoke using command like: | |
# find ./ -type f -name "*.txt" | xargs -n 1 ./process.sh ~/Documents/ | |
# pull the first line of the file | |
FIRST_LINE=`head -n 1 $2` |
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
safeHead :: [a] -> [a] | |
safeHead x = take 1 x | |
safeTail :: [a] -> [a] | |
safeTail x = drop 1 x | |
safeInit :: [a] -> [a] | |
safeInit x = take ((length x) - 1) x | |
safeLast :: [a] -> [a] |
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
import Html exposing (Html, text, div) | |
import Html.App as App | |
import Mouse exposing (..) | |
main = App.program { init = init, | |
view = view, update = update, subscriptions = subscriptions } | |
-- Model | |
type alias Model = { x: Int, y: Int } |
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
import Html exposing (Html, text, div) | |
import Html.App as App | |
import Mouse exposing (..) | |
main = App.program { init = init, | |
view = view, update = update, subscriptions = subscriptions } | |
-- Model | |
type alias Model = { count: Int } |
OlderNewer