Skip to content

Instantly share code, notes, and snippets.

# Hey coops..
#
# Imagine yourself on the other side of the table: two job openings, hundreds of resumes,
# _all of which_ look friggin' identical. Yeah, the HR departments at your MegaCorp XYZ are using
# automated tools to scan for keywords, and the coop department at your school is trying to beat
# you into submission to follow some "predefined template".. But, unless what you're aspiring to
# is to be an automaton at MegaCorp XYZ, relegated to writing test harnesses for code that will
# never see the light of day.. please do yourself a favor, and _be different_! Be bold, dammit.
#
# (Frankly, I'm falling asleep while reading your resumes.. Wake me up! Srsly.)
@divad12
divad12 / Makefile
Created January 12, 2012 06:47 — forked from zmanji/Makefile
Uwaterloo CS349 A1 Makefile
# This ensures that all of our shell commands are run with bash and not any other shell.
SHELL := /bin/bash
# This is the name of the compiler. If you have `clang` installed you can use that instead.
CXX = g++
# These are flags that are always sent to the compiler.
# -g generates debugging symbols for use in gdb and valgrind. This improves the
# output of those tools.
#
@divad12
divad12 / log_handler.py
Created October 13, 2012 07:26
Django log handler for sending messages to HipChat
"""Custom log handler for posting log messages to HipChat.
Adapted from https://gist.github.com/3176710
The API documentation is available at
https://www.hipchat.com/docs/api/method/rooms/message
The room id can be found by going to
https://{{your-account}}.hipchat.com/rooms/ids
body {
background-color: #ffffff !important;
}
tbody tr td {
background-color: #ebebeb;
padding-top: 3px;
padding-bottom: 3px;
padding-left: 5px;
}
@divad12
divad12 / notify.sh
Created December 6, 2013 03:13
Announces and displays exit code of last run command. Try `sleep 5; notify`
# Announces and displays exit code of last run command.
# eg. `sleep 5; notify`
function notify {
status=$?
if [ $status -eq 0 ]; then
echo -e "\033[1;32m[ DONE ]\033[0m"
( say -v Cellos `printf "%0.s done" {1..26}` & )
elif [ $status -ne 130 ]; then # Ignore exit with Ctrl-C
echo -e "\033[1;31m[ ERROR $status ]\033[0m"
( say "Oh noes, exit code $status" & )
import rmc.models as m
import rmc.test.lib as testlib
def gen_professor(**kwargs):
attrs = dict({
'id': 'meredith_swift', # I'm a cat meow meow!!!!
'first_name': 'Meredith',
'last_name': 'Swift',
}, **kwargs)