Skip to content

Instantly share code, notes, and snippets.

View enricofoltran's full-sized avatar

Enrico Foltran enricofoltran

View GitHub Profile
prettyirrelevant /
Last active July 4, 2023 00:55
Using Huey with Flask using application factory. For configuration, follow the djhuey format
# Due to the flexible nature of Flask. This might be
from .extensions import huey
def create_app():
app = Flask(__name__)
# add your configurations
# app.config.from_object("settings.local")
jbenet /
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

rduplain /
Last active February 7, 2019 15:40
Use Werkzeug's web-based interactive debugger with Tornado.

Interactive Debugging in any Python Web Project

Ron DuPlain - PyOhio 2013

Turn this:

stof / gist:3473109
Created August 26, 2012 02:03
BoxFile to deploy a Symfony 2.1 app on Pagodabox
- app/cache
- app/logs
- app/sessions
document_root: web
default_gateway: app.php
index_list: [app.php]
php_version: 5.3.10
enricofoltran / .bashrc
Created February 9, 2012 13:15
show current git branch on bash
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
export PS1="\[\033[01;34m\] \w\[\033[31m\]\$(parse_git_branch) \[\033[00m\]$\[\033[00m\] "
enricofoltran / Contact.php
Created December 19, 2011 07:54
Contact form with Zend Framework
/* /library/Square/Form/Contact.php */
class Square_Form_Contact extends Zend_Form
public function init()
<?php defined('SYSPATH') or die('No direct script access.');
* User to user communication wrapper. Uses Swift Mailer for email transport.
* @package Communicate
* @category Base
* @author Woody Gilk <>
* @copyright (c) 2010 Woody Gilk
* @license MIT
* Answer model is the class that represents single answer to the
* question. It handles all the operations with answer
* @package cevapbankasi
class Model_Answer extends Model_Abstract {
public static function initialize(Jelly_Meta $meta)
class Model_Category extends Model_Abstract {
protected static $_path;
public static function initialize(Jelly_Meta $meta)
->sorting(array('materialized_path' => 'asc'))
fiee /
Created July 29, 2009 13:55 — forked from anonymous/gist:156623
fabric for deployment of django apps on Debian servers
#!/usr/bin/env python
# -*- coding: utf-8 -*-
fabfile for Django
modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle)
several additions, corrections and customizations, too