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
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
BLUE="\[\033[0;34m\]" | |
LIGHT_RED="\[\033[1;31m\]" | |
LIGHT_GREEN="\[\033[1;32m\]" | |
WHITE="\[\033[1;37m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
COLOR_NONE="\[\e[0m\]" |
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
function generatePassword($length=6,$level=2){ | |
list($usec, $sec) = explode(' ', microtime()); | |
srand((float) $sec + ((float) $usec * 100000)); | |
$validchars[1] = "0123456789abcdfghjkmnpqrstvwxyz"; | |
$validchars[2] = "0123456789abcdfghjkmnpqrstvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
$validchars[3] = "0123456789_!@#$%&*()-=+/abcdfghjkmnpqrstvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_!@#$%&*()-=+/"; |
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
[user] | |
name = Mark Evans | |
email = my@emailaddress.com | |
[color] | |
branch = auto | |
diff = auto | |
interactive = auto | |
status = auto | |
ui = auto | |
[color "branch"] |
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
#Description: OSX Git Prompt - make your git repo prompts look pretty | |
#Installation: In your .bash_profile, add a line: source .gitprompt | |
#FileName: .gitprompt | |
#Owner: Mark Evans: | |
#Stolen From: http://asemanfar.com/Current-Git-Branch-in-Bash-Prompt | |
#also install git complet: brew install git bash-completion | |
c_cyan=`tput setaf 6` | |
c_red=`tput setaf 1` | |
c_green=`tput setaf 2` | |
c_sgr0=`tput sgr0` |
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
function underscore_array_keys($data){ | |
foreach ($data as $n => $v){ | |
$newKey = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $n)); | |
unset($data[$n]); | |
if (is_array($v)){ | |
$data[$newKey] = underscore_array_keys($v); | |
}else{ | |
$data[$newKey] = $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
#!/bin/sh | |
# | |
# redis Startup script for Redis Server | |
# | |
# chkconfig: - 90 10 | |
# description: Redis is an open source, advanced key-value store. | |
# | |
# processname: redis-server | |
# config: /etc/redis.conf | |
# pidfile: /var/run/redis.pid |
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-shell /bin/zsh | |
set -g prefix C-a | |
bind C-a send-prefix | |
unbind C-b | |
set -sg escape-time 1 | |
set -g base-index 1 | |
setw -g pane-base-index 1 | |
bind r source-file ~/.tmux.conf \; display "Reloaded!" | |
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
" Pathogen | |
runtime bundle/vim-pathogen/autoload/pathogen.vim | |
call pathogen#infect() | |
call pathogen#helptags() | |
" Disable vi-compatibility | |
set nocompatible | |
" Remember more history | |
set history=1000 |
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
#Description: OSX Git Prompt - make your git repo prompts look pretty | |
#Owner: Mark Evans: | |
c_cyan=`tput setaf 6` | |
c_red=`tput setaf 1` | |
c_green=`tput setaf 2` | |
c_sgr0=`tput sgr0` | |
parse_git_branch () | |
{ |
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
#Install Brew | |
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" | |
#Command Line Tools | |
brew install tmux | |
brew install macvim --override-system-vim | |
brew linkapps | |
OlderNewer