Skip to content

Instantly share code, notes, and snippets.

View robhardwick's full-sized avatar

Rob Hardwick robhardwick

View GitHub Profile
from django.db import models
from django.conf import settings
class AuditMixin:
"""Standard created/modified audit fields."""
created_at = models.DateTimeField(auto_now_add=True)
created_by = models.ForeignKey(settings.AUTH_USER_MODEL)
modified_at = models.DateTimeField(auto_now=True)
modified_by = models.ForeignKey(settings.AUTH_USER_MODEL)
#!/usr/bin/env python3
import time
import curses
def main(stdscr):
MESSAGE = 'TROLE '
INTERVAL = 0.1
start = time.time()
while True:
Verifying that +robhardwick is my blockchain ID. https://onename.com/robhardwick

Keybase proof

I hereby claim:

  • I am robhardwick on github.
  • I am robhardwick (https://keybase.io/robhardwick) on keybase.
  • I have a public key ASA5ab9-yIidpfRZmfXqRUQHBsWFHxxQqQ3UbWiEkO7iNwo

To claim this, I am signing this object:

@robhardwick
robhardwick / mysql-install.sh
Last active April 27, 2016 17:41
Script to download, compile and install a standalone version of MySQL 5.5 on OS X (requires Xcode, cmake and pv)
#!/usr/bin/env bash
set -e
# Check arguments (the install directory)
if [ "$#" -lt 1 ]; then
echo "Usage: $0 <path>";
exit;
fi
# Install path
$ ./convert
In or outfile missing
usage: ./convert -i input_file -o outfile [-r] [-w outfile_weight]
read the graph and convert it to binary format.
-r nodes are renumbered from 0 to nb_nodes-1 (the order is kept).
-w filename read the graph as a weighted one and writes the weights in a separate file.
-h show this usage message.