Skip to content

Instantly share code, notes, and snippets.

View wwalker's full-sized avatar

Wayne Walker wwalker

View GitHub Profile
@matthewmccullough
matthewmccullough / gist:47267
Created January 15, 2009 05:15 — forked from halbtuerke/gist:31934
Show Git dirty status in your Unix bash prompt (symbols not compatible with CygWin)
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\]"
@wwalker
wwalker / gist:480511
Created July 18, 2010 16:09
file based dedupe producer
#!/bin/sh
#
# Simple file based dedupe producer.
# Idea is to run this on a directory(s) and the result is a tuple
# of md5sum and filenames that are potentially duplicate (need to
# finish by using cmp to make sure).
# Copyright 2010 Sterling Commerce, Inc.
# Copyright 2010 Christopher Jay Cox
#
# http://endlessnow.com/ten/Source/dedupe-sh.txt
@HowlingMind
HowlingMind / gist:996093
Created May 27, 2011 20:24 — forked from matthewmccullough/gist:47267
Git status Prompt including dirty and number of commits ahead/behind
# Colors
# ######
DULL=0
BRIGHT=1
NORMAL_COLOR="\[$ESC[m\]"
##
# Shortcuts for Colored Text ( Bright and FG Only )
##
@jordansissel
jordansissel / README.md
Created July 6, 2011 05:04
Sorting windows in tmux by hostname.

For this to work, it requires my tmux fork that includes what I use as the hostname in the window list.

At any rate, it'll sort my tmux sessions alphabetically by the host I'm using.

my tmux fork: https://github.com/jordansissel/tmux

Starts with:

(0) -    nightfall: zsh - /home/jls/projects/tmux/trunk                                                            

(1) carrera: screen -x irc

@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@mattriley
mattriley / post_xml.rb
Created January 25, 2012 22:39
Ruby HTTP POST request containing XML content
require 'net/http'
def post_xml url_string, xml_string
uri = URI.parse url_string
request = Net::HTTP::Post.new uri.path
request.body = xml_string
request.content_type = 'text/xml'
response = Net::HTTP.new(uri.host, uri.port).start { |http| http.request request }
response.body
end
@taylor
taylor / 98_command_prompt
Created March 15, 2012 21:01 — forked from matthewmccullough/gist:47267
command prompt tweaks -- git and last command status (smiley) + title bar updates for bashrc
# vim:ft=sh:
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\]"
DARK_GRAY="\[\033[0;90m\]"
@taylor
taylor / git-ignore
Created March 23, 2012 04:56
Git script for creating and modifying .gitignore files
#!/bin/bash
## REPO -- https://github.com/github/gitignore
## DOWNLOADS
DL_IGNORE_URL="https://raw.github.com/github/gitignore/master/"
IGNORE_TREE_URL="https://api.github.com/repos/github/gitignore/git/trees/master"
CACHE_IGNORE_LIST="$HOME/.cache/gitignore_list"
CACHE_IGNORE_NAMES="$HOME/.cache/gitignore_list_names"
@sturadnidge
sturadnidge / tmux-1.8-on-CentOS-6.x.txt
Last active May 10, 2021 18:31
Install tmux 1.8 on CentOS 6.x minimal (64bit)
# download latest libevent2 and tmux sources, and extract them somewhere
# (thx bluejedi for tip on latest tmux URL)
#
# at the time of writing:
# https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
# http://sourceforge.net/projects/tmux/files/latest/download?source=files
#
# install deps
yum install gcc kernel-devel make ncurses-devel
@taylor
taylor / basename_dereference_sourced.sh
Created December 14, 2012 21:07
Find the name of the shell script, de-reference symlinks, handle both SOURCED scripts and executed versions.
#!/bin/bash
[[ "$0" = "-bash" ]] && N="$BASH_SOURCE" || N="$0"
me=$(basename `readlink --canonicalize --no-newline $N`)