Skip to content

Instantly share code, notes, and snippets.

View javabrett's full-sized avatar

Brett Randall javabrett

View GitHub Profile
@javabrett
javabrett / celery_tasks_error_handling.py
Created July 10, 2018 06:27 — forked from darklow/celery_tasks_error_handling.py
Celery tasks error handling example
from celery import Task
from celery.task import task
from my_app.models import FailedTask
from django.db import models
@task(base=LogErrorsTask)
def some task():
return result
class LogErrorsTask(Task):
@javabrett
javabrett / p4merge4git.md
Created November 23, 2017 05:14 — forked from tony4d/p4merge4git.md
Setup p4merge as a visual diff and merge tool for git
@javabrett
javabrett / pickleViewer.py
Last active September 22, 2017 06:12 — forked from valeriyvan/pickleViewer.py
Viewer for arbitrary pickle files
#!/usr/bin/python
import pickle
from collections import defaultdict
from collections import OrderedDict
import sys
def checkDict(inputData):
return (type(inputData) == dict or type(inputData) == defaultdict\
or type(inputData) == OrderedDict)
@javabrett
javabrett / .gtkrc-eclipse
Created September 21, 2017 03:13 — forked from andrioli/.gtkrc-eclipse
Config to make Eclipse Juno icons and tabs look small and nice in Linux
# Create a new file in your home directory called .gtkrc-eclipse
# call eclipse with this command:
# Gtk2 forced:
# export SWT_GTK3=0
# env GTK2_RC_FILES=/usr/share/themes/<YourTheme>/gtk-2.0/gtkrc:/home/<YourUser>/.gtkrc-eclipse '/path_to_eclipse/eclipse'
# In your Eclipse directory find the file 'e4_default_gtk.css'
# In this file there's a CSS class:
#!/bin/sh
set -e
PWD=`pwd`
TMUX_SRC_DIR=$PWD/tmux-2.3
LIBEVENT_SRC_DIR=$PWD/libevent-2.0.22-stable
NCURSES_SRC_DIR=$PWD/ncurses-6.0
PROTOBUF_SRC_DIR=$PWD/protobuf-2.6.1
MOSH_SRC_DIR=$PWD/mosh-1.2.6