Skip to content

Instantly share code, notes, and snippets.

View markalanevans's full-sized avatar
🎯
Focusing

Mark Evans markalanevans

🎯
Focusing
View GitHub Profile
products.drop_while { | product |
$log.debug "Comparing: "
$log.debug product[:affiliate_network_id]
$log.debug product[:affiliate_network_id].class
if (product[:affiliate_network_id] != 8)
$log.debug "No Match"
return false
else
$log.debug "Match"
end

What's this PR do?

Where should the reviewer start?

How should this be manually tested?

Any background context you want to provide?

What are the relevant tickets?

Screenshots (if appropriate)

@markalanevans
markalanevans / .gitbash
Created November 18, 2010 21:03
.gitbash
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\]"
@markalanevans
markalanevans / random_password.php
Created March 29, 2011 03:55
Random Password Generator
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_!@#$%&*()-=+/";
@markalanevans
markalanevans / git-prompt
Last active September 27, 2015 11:58
A Git Prompt which adds the branch you are on to the prompt.
#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`
@markalanevans
markalanevans / underscore_array_keys
Created October 21, 2011 22:55
LowerCase and Underscore PHP array
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;
}
}
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
" 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
#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 ()
{
#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