Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael G. Ströck mstroeck

View GitHub Profile
@mstroeck
mstroeck / .vimrc
Created Aug 31, 2011
.vimrc Settings
View .vimrc
set nocompatible
set number
set ruler
syntax on
" Set encoding
set encoding=utf-8
" Whitespace stuff
@mstroeck
mstroeck / .bash_profile
Created Aug 31, 2011
.bash_profile Settings
View .bash_profile
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 Sep 6, 2011 — forked from pcardune/.gitignore
Facebook command-line client helper
View .gitignore
.fb_access_token
.fbconsole.py
View exploring.clj
; 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."))
View .vimrc
set nocompatible
set number
set ruler
syntax on
" Set encoding
set encoding=utf-8
View gist:1282410
#!/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 };
#
View gist:1700096
#!/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 Apr 1, 2012 — forked from erikh/hack.sh
OSX For Hackers
View hack.sh
#!/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 Jun 9, 2012 — forked from jlbelmonte/rds_backup.sh
RDS Backup Script
View rds_backup.sh
#!/bin/bash
SNAPID="SNAP"
BACKUPDBID="TEMPDB"
#config groups
SECURITYGROUP="Mysecgrup"
PARAMSGROUP="Myparamsgrup"
#rds verifying commands
View unbounce-webhook-email.php
<?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;
}