Skip to content

Instantly share code, notes, and snippets.

Jack Cushman jcushman

Block or report user

Report or block jcushman

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 gist:cd8a3ee75e27bbe64369c96249720330
### install pyenv for Mac with bash ###
# install pyenv
brew install pyenv
# install pyenv-virtualenv
git clone https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
# configure pyenv
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile
View minimal_eager_chord.py
"""Celery master is too aggressive about suppressing .get() in eager tasks.
test performs no synchronous operations, but fails in eager application::
python minimal_eager_chord.py shell --config=minimal_eager_chord
test.delay().get()
"""
import celery
from celery.canvas import chord
app = celery.Celery()
@jcushman
jcushman / Dockerfile
Last active Dec 7, 2017
Reproduction of celery bug #2682, autoscale causes billiard to raise WorkerLostError
View Dockerfile
FROM python:3.6-stretch
RUN pip install celery
RUN mkdir /app
WORKDIR /app
@jcushman
jcushman / example.sql
Created Feb 9, 2017
Store JSON history with the fast-json-patch library and Postgresql triggers
View example.sql
-- Enable pl/v8:
CREATE EXTENSION plv8;
-- Create json history table:
CREATE TABLE json_history (id BIGSERIAL PRIMARY KEY, tstamp timestamp DEFAULT now(), table_name text, column_name text, target_id bigint, transform json);
-- Create test table:
CREATE TABLE test_json (id BIGSERIAL PRIMARY KEY, data JSON);
-- Enable history tracking on test_json.data:
View keybase.md

Keybase proof

I hereby claim:

  • I am jcushman on github.
  • I am jcushman (https://keybase.io/jcushman) on keybase.
  • I have a public key whose fingerprint is C909 5602 B0A7 F2A5 1567 8A7D 3192 CCDC CD63 43A5

To claim this, I am signing this object:

You can’t perform that action at this time.