Skip to content

Instantly share code, notes, and snippets.

Rob Golding robgolding

Block or report user

Report or block robgolding

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View data.json
[{"id": 0}, {"id": 1}, {"id": 2}, {"id": 3}, {"id": 4}, {"id": 5}, {"id": 6}, {"id": 7}, {"id": 8}, {"id": 9}, {"id": 10}, {"id": 11}, {"id": 12}, {"id": 13}, {"id": 14}, {"id": 15}, {"id": 16}, {"id": 17}, {"id": 18}, {"id": 19}, {"id": 20}, {"id": 21}, {"id": 22}, {"id": 23}, {"id": 24}, {"id": 25}, {"id": 26}, {"id": 27}, {"id": 28}, {"id": 29}, {"id": 30}, {"id": 31}, {"id": 32}, {"id": 33}, {"id": 34}, {"id": 35}, {"id": 36}, {"id": 37}, {"id": 38}, {"id": 39}, {"id": 40}, {"id": 41}, {"id": 42}, {"id": 43}, {"id": 44}, {"id": 45}, {"id": 46}, {"id": 47}, {"id": 48}, {"id": 49}, {"id": 50}, {"id": 51}, {"id": 52}, {"id": 53}, {"id": 54}, {"id": 55}, {"id": 56}, {"id": 57}, {"id": 58}, {"id": 59}, {"id": 60}, {"id": 61}, {"id": 62}, {"id": 63}, {"id": 64}, {"id": 65}, {"id": 66}, {"id": 67}, {"id": 68}, {"id": 69}, {"id": 70}, {"id": 71}, {"id": 72}, {"id": 73}, {"id": 74}, {"id": 75}, {"id": 76}, {"id": 77}, {"id": 78}, {"id": 79}, {"id": 80}, {"id": 81}, {"id": 82}, {"id": 83}, {"id": 84}, {"id": 85}, {
View keybase.md

Keybase proof

I hereby claim:

  • I am robgolding on github.
  • I am robgolding (https://keybase.io/robgolding) on keybase.
  • I have a public key ASDMf0dMe-fP7O_Llmkwg0XESGmWiG3VCG3-K9AL8ieWNwo

To claim this, I am signing this object:

@robgolding
robgolding / lazy_loaded_list.py
Last active Feb 27, 2016
Python Collections ABC
View lazy_loaded_list.py
import collections
class LazyLoadedList(collections.Sequence):
def __init__(self, url):
self.url = url
self.page = 0
self.num_items = 0
self.store = []
View gist:f9bede606009cadceb57
import signal
import time
def shutdown():
client.stop()
sys.exit(0)
signal.signal(signal.SIGINT, shutdown)
try:
View keybase.md

Keybase proof

I hereby claim:

  • I am robgolding63 on github.
  • I am robgolding (https://keybase.io/robgolding) on keybase.
  • I have a public key whose fingerprint is 521E AD24 5315 B7F9 0B10 8C40 847C 44D3 13A6 D5DA

To claim this, I am signing this object:

@robgolding
robgolding / filtering.py
Created Nov 17, 2012
Django Class-Based View Mixins: Part 2
View filtering.py
class FilterMixin(object):
"""
View mixin which provides filtering for ListView.
"""
filter_url_kwarg = 'filter'
default_filter_param = None
def get_default_filter_param(self):
if self.default_filter_param is None:
raise ImproperlyConfigured(
@robgolding
robgolding / dog.sh
Created Jul 18, 2012
A simple watchdog script in Python
View dog.sh
#!/usr/bin/env python
import os
import sys
import re
import time
from watchdog.observers import Observer
from watchdog.events import PatternMatchingEventHandler
ignore = (
@robgolding
robgolding / login_required.py
Created Jul 11, 2012
Django Class-Based View Mixins: Part 1
View login_required.py
class LoginRequiredMixin(object):
"""
View mixin which requires that the user is authenticated.
"""
@method_decorator(login_required)
def dispatch(self, request, *args, **kwargs):
return super(LoginRequiredMixin, self).dispatch(
self, request, *args, **kwargs)
@robgolding
robgolding / models.py
Created Jun 24, 2011
Custom Fields proposed implementation
View models.py
from django.db import models
from django.contrib.contenttypes.models import ContentType
CUSTOMFIELD_TYPE_CHOICES = (
('bool', 'boolean'),
('char', 'text'),
('int', 'integer'),
('float', 'decimal'),
)
@robgolding
robgolding / G52CFJ Makefile
Created Mar 15, 2011
A simple Makefile for the G52CFJ coursework
View G52CFJ Makefile
CXX = g++
CXXFLAGS = -g $$(sdl-config --cflags --libs) -lSDL_image -lSDL_ttf
SOURCES = \
BaseEngine.cpp \
BouncingBall.cpp \
BouncingBallMain.cpp \
DisplayableObject.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=game
You can’t perform that action at this time.