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/bash | |
# Pre-commit hook that prevents debugging code and merge artifacts from being committed. | |
FILES_PATTERN='\.(php|ctp|ctpm|css|rb|erb|haml|js|coffee)(\..+)?$' | |
FORBIDDEN=( "binding\.pry" "save_and_open_page" "debugger" "it\.only" "describe\.only" ">>>>>>" "<<<<<<" "======" ) | |
# the exit code from `grep -E $FILES_PATTERN` gets swallowed unless the pipefail option is set | |
set -o pipefail |
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 | |
# Called by "git push" after it has checked the remote status, | |
# but before anything has been pushed. | |
# | |
# If this script exits with a non-zero status nothing will be pushed. | |
# | |
# Steps to install, from the root directory of your repo... | |
# 1. git config --global init.templatedir '~/.git-templates' | |
# 2. mkdir -p ~/.git-templates/hooks |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title></title> | |
<script type='text/javascript' src="http://mbostock.github.com/d3/d3.js"></script> | |
<style type='text/css'> | |
.cell{ | |
stroke: none; | |
} |
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
Name Stmts Miss Cover | |
-------------------------------------------------------------------------------------------------------------------------------- | |
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/__init__ 3 0 100% | |
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser 611 527 14% | |
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/relativedelta 221 192 13% | |
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/rrule 815 720 12% | |
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tz 575 476 17% | |
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tzwin 106 103 |
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
A Web log data set from The Web Server Workload Characterization project. ftp://ita.ee.lbl.gov/html/contrib/NASA-HTTP.html |
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
RESET="\[\017\]" | |
NORMAL="\[\033[0m\]" | |
RED="\[\033[31;1m\]" | |
GREEN="\[\033[32;1m\]" | |
SMILEY="${GREEN}:)${NORMAL}" | |
FROWNY="${RED}:(${NORMAL}" | |
EMOTE="if [ \$? = 0 ]; then echo \"${SMILEY}\"; else echo \"${FROWNY}\"; fi" | |
export PS1="${RESET}\n\`${EMOTE}\` \ | |
\u@\h \ |
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
perl -lwne 'BEGIN{$status=0; | |
print "tests running..."}; | |
print qq{$_:}; | |
$result = qx{curl -s -IL $_ | grep "200 OK"}; | |
if ($result eq ""){print "FAIL\n"; $status=1} else {print $result}; | |
END{if($status != 0){print "Some tests failed."} else {print "All done!"}; | |
exit $status}' test.config |
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
<iframe src="http://www.slideshare.net/slideshow/embed_code/11846374?rel=0" width="427" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="https://www.slideshare.net/noahsussman/software-entomology-or-where-do-bugs-come-from" title="Software Entomology or Where Do Bugs Come From?" target="_blank">Software Entomology or Where Do Bugs Come From?</a> </strong> from <strong><a href="http://www.slideshare.net/noahsussman" target="_blank">Noah Sussman</a></strong> </div> |
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
#!/usr/bin/env python | |
""" | |
Create SPC charts from data sets. Inspired by Simon Guilfoyle's | |
"Intelligent Policing" http://amzn.to/1dNNCfb | |
The algorithm described by Guilfoyle in the book is: | |
Given a list of data points sorted in chronological order, iterate | |
over the list starting at index 1 (that is, skip the last entry in | |
the list), subtracting each value from the previous value. The |