Skip to content

Instantly share code, notes, and snippets.


Greg Taylor gtaylor

Block or report user

Report or block gtaylor

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
gtaylor / bt-182p3.diff
Created Mar 13, 2014
PennMUSH 1.8.2p3 diff to incorporate liberated btech from BattletechMUX
View bt-182p3.diff
diff -ur -x btech -x .svn -x '*.o' -x data pennmush/game/mushcnf.dst btpenn/game/mushcnf.dst
--- pennmush/game/mushcnf.dst 2007-04-22 09:00:06.000000000 -0700
+++ btpenn/game/mushcnf.dst 2007-02-04 20:58:41.000000000 -0800
@@ -840,3 +840,7 @@
include restrict.cnf
+### BattleTech options are in btech.cnf
View gist:9aec5dda57f5ae019435
libconn = librato.connect(settings.LIBRATO_USERNAME, settings.LIBRATO_API_KEY)
metric_name, count, type='gauge', source=_METRIC_SOURCE, period=300, measure_time=epoch)
File "/home/gtaylor/workspace/coursebook/pathwright/apps/pwstats/src/", line 35, in send_counter_metric
File "/home/gtaylor/.virtualenvs/coursebook/lib/python2.7/site-packages/librato/", line 182, in submit
self._mexe("metrics", method="POST", query_props=payload)
File "/home/gtaylor/.virtualenvs/coursebook/lib/python2.7/site-packages/librato/", line 148, in _mexe
resp_data, success, backoff = self._process_response(resp, backoff)
View gist:d7e78505c5eaed70ecde
DROP FUNCTION modify_player_inventory(
player_id integer, mod_amount integer, item_name text
CREATE OR REPLACE FUNCTION modify_player_inventory(
player_id integer, mod_amount integer, item_name text
) RETURNS integer AS
-- first try to update the key
View gist:e3926a90fe108d52a4c8
id, discussion_id, body, num_votes, last_edited_time,
class_section_id, created_time, modified_time,
author_id, reply_parent_id, num_inappropriate_flags,
path, depth
) AS (
SELECT, discussion_response.discussion_id,
discussion_response.body, discussion_response.num_votes,
View gist:9064a5f325b9fc7b4ba2
"school": {
"url": "https://get.pathwright.local/",
"image": "",
"id": 17,
"name": "PathwrightU"
"class_section": {
"url": "https://get.pathwright.local/course/pw101/571/",
"id": 571,
View gist:c9fdf67aa83cd58f74af
"school": {
"url": "https://get.pathwright.local/",
"image": "",
"id": 17,
"name": "PathwrightU"
"class_section": {
"url": "https://get.pathwright.local/course/pw101/571/",
"id": 571,
View gist:912caae15e70cdcf4d4e
[2014-10-14 01:30:13,857: WARNING/MainProcess] consumer: Connection to broker lost. Trying to re-establish the connection...
Traceback (most recent call last):
File "/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/celery/worker/", line 278, in start
File "/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/celery/", line 123, in start
File "/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/celery/worker/", line 821, in start
File "/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/celery/worker/", line 70, in asynloop
View gist:25c635badd05ae3527a4
[2014-10-14 11:47:28,336: INFO/MainProcess] Connected to redis://:**
[2014-10-14 11:47:28,372: INFO/MainProcess] mingle: searching for neighbors
[2014-10-14 11:47:29,430: INFO/MainProcess] mingle: sync with 2 nodes
[2014-10-14 11:47:29,431: INFO/MainProcess] mingle: sync complete
[2014-10-14 11:47:29,493: WARNING/MainProcess] celery@syncing.celery-i-4c2bb361 ready.
[2014-10-14 11:47:29,980: INFO/MainProcess] Events of group {task} enabled by remote.
View gist:f232db1e3302272552d0
<match graylog2.**>
type copy
type gelf
host {{ graylog2_server_host }}
port {{ graylog2_server_port }}
heartbeat_type tcp
flush_interval 5s
gtaylor / gist:1635814
Created Jan 18, 2012
jQuery form validation mixin
View gist:1635814
class FrontendFormErrorHandlingMixin(object):
Provides some convenience methods for handling errors on the front end.
See :meth:`get_errors`.
def get_errors(self):
Returns a list of form validation erros
in a dictionary format. More JSON friendly. Less stupid.
You can’t perform that action at this time.