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 | |
set -e | |
if [[ -z "$DD_APP_KEY" ]]; then | |
echo "I expect the Datadog app key in DD_APP_KEY" | |
exit | |
fi | |
if [[ -z "$DD_API_KEY" ]]; then | |
echo "I expect the Datadog API key in DD_API_KEY" | |
exit |
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 | |
""" | |
Count lines in python functions | |
""" | |
import re | |
def funcs_lengths(lines): | |
""" | |
Loop through lines and yield (function name, line length) |
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
export SHELL := /bin/bash | |
.PHONY: default pdf html view clean | |
SRC = $(wildcard *.txt) | |
PDFS=$(SRC:.txt=.pdf) | |
HTML=$(SRC:.txt=.html) | |
default: pdf html | |
pdf: $(PDFS) | |
%.pdf : %.txt |
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 | |
[ -t 1 ] | |
ISTTY=$? | |
notify-send -i ~/Pictures/jake.png MAKE "$( (make $@ && echo "Good.") 2>&1 | ( if [[ $ISTTY -eq 0 ]]; then tee /dev/tty; else cat; fi ) )" |
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
{ | |
"title": "Httpd Requests", | |
"services": { | |
"query": { | |
"list": { | |
"0": { | |
"id": 0, | |
"type": "topN", | |
"query": "*", | |
"alias": "", |
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
$ git diff HEAD^ | |
diff --git a/vimrc b/vimrc | |
index cada33f..18f0b56 100644 | |
--- a/vimrc | |
+++ b/vimrc | |
@@ -275,15 +275,15 @@ endfunction | |
" Find all files in all non-dot directories starting in the working directory. | |
" Fuzzy select one of those. Open the selected file with :e. | |
-nnoremap <leader>f :call SelectaCommand("find * -type f \| lsort", "", ":e")<cr> |
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
<?php | |
class Dumb { | |
protected $prop; | |
function __get($p) { | |
if ($p === 'prop') { | |
$this->prop = new Dumber($this); | |
return $this->prop; | |
} | |
} | |
} |
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 | |
# Get a random PR checker | |
# Loops through everyone before showing the same name twice | |
ME=rhoward | |
# Takes optional argument for commit group if you want not from "ALL" | |
COMMIT_GROUP="ALL" | |
if [ $# -gt 0 ]; then | |
COMMIT_GROUP="$1" |
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 | |
usage() { | |
echo "Interactively show slides from a file" | |
echo | |
echo "Usage:" | |
echo "$0 FILE LINES" | |
echo | |
echo "FILE is the file containing the slides." | |
echo "In the file, each slide is indicated with a simple 'slide' by itself" |
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 | |
LOG=/tmp/sync.log | |
SELF=$(basename "$0") | |
usage() { | |
echo | |
echo "Usage: $SELF LOCALDIR REMOTEDIR" | |
echo "Syncs files in LOCALDIR to REMOTEDIR" | |
echo "Daemonize this yourself with & or nohup" |
NewerOlder