Skip to content

Instantly share code, notes, and snippets.

View mstroeck's full-sized avatar

Michael G. Ströck mstroeck

View GitHub Profile
@mstroeck
mstroeck / .vimrc
Created August 31, 2011 16:52
.vimrc Settings
set nocompatible
set number
set ruler
syntax on
" Set encoding
set encoding=utf-8
" Whitespace stuff
@mstroeck
mstroeck / .bash_profile
Created August 31, 2011 16:53
.bash_profile Settings
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/share/python:$PATH
export PYTHONPATH=/usr/local/lib/python:$PYTHONPATH
export EDITOR=mvim
alias ls="ls -G"
export LSCOLORS=dxfxcxdxbxegedabagacad
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1="\w\$(parse_git_branch) $ "
@mstroeck
mstroeck / .gitignore
Created September 6, 2011 13:34 — forked from pcardune/.gitignore
Facebook command-line client helper
.fb_access_token
.fbconsole.py
; START:ns
(ns examples.exploring
(:use examples.utils clojure.contrib.str-utils)
(:import (java.io File)))
; END:ns
; START:date
(defn date [person-1 person-2 & chaperones]
(println person-1 "and" person-2
"went out with" (count chaperones) "chaperones."))
set nocompatible
set number
set ruler
syntax on
" Set encoding
set encoding=utf-8
#!/usr/bin/perl
#
# Un-MIME regular message from stdin.
# Non-text version saved in directory ~/mail/MIME and proper indication is
# left in the dumped message. Text is otherwise dumped and deleted from there.
#
# Intended to be used with mailagent thanks to the following incantation rule:
#
# Mime-Version: /^\d/ { SAVE +mime; FEED ~/mail/unmime; RESYNC; REJECT };
#
#!/bin/sh
# eps2svg: EPS to SVG vector command line image converter
# David Griffith <davidgriffith@acm.org>
# Created March 30, 2009 and released into the public domain
# The programs pstoedit and skencil are required.
EXT="svg"
USAGE="usage: eps2svg [-v] input.eps [output.svg]\n -v verbose mode"
@mstroeck
mstroeck / hack.sh
Created April 1, 2012 18:40 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@mstroeck
mstroeck / rds_backup.sh
Created June 9, 2012 09:30 — forked from jlbelmonte/rds_backup.sh
RDS Backup Script
#!/bin/bash
SNAPID="SNAP"
BACKUPDBID="TEMPDB"
#config groups
SECURITYGROUP="Mysecgrup"
PARAMSGROUP="Myparamsgrup"
#rds verifying commands
<?php
// This is a sample PHP script that demonstrates accepting a POST from the
// Unbounce form submission webhook, and then sending an email notification.
function stripslashes_deep($value) {
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
return $value;
}