Skip to content

Instantly share code, notes, and snippets.

View digitaldavenyc's full-sized avatar

Dave Padovano digitaldavenyc

View GitHub Profile
#!/bin/bash
#
# Script to setup a Elastic Beanstalk AMI with geospatial libraries and postGIS
#
# sh aws_ami_prep.sh > aws_ami_prep.log 2>&1 &
# Go to ec2-user home directory
cd /home/ec2-user
# yum libraries
@amatellanes
amatellanes / celery.sh
Last active April 28, 2025 03:31
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
@alejandrobernardis
alejandrobernardis / auth.py
Last active May 23, 2022 06:13
Tornado, Class Role, Permission, Identity (+mixin) and AuthContext
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2013 Asumi Kamikaze Inc.
# Copyright (c) 2013 The Octopus Apps Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
# Author: Alejandro M. Bernardis
# Email: alejandro.bernardis at gmail.com
# Created: 04/Oct/2013 09:37
import urllib
@JesterXL
JesterXL / Backbone Error Handling Bad vs. Good
Created August 24, 2012 19:53
Shows how TO and how NOT to do Backbone Error handling.
/*
Bad
- Wrong function signature, no logging, no indication what went wrong, no indication where.
- Developers go WTF
- QA goes WTF
- PM's go WTF
- Firebug/Safari/Chrome tell you "404", but not on which file was asking for it, nor why.
*/
SomeBackboneCollection.prototype.onError = function(resp) {};