Skip to content

Instantly share code, notes, and snippets.

View wo0dyn's full-sized avatar

Nicolas Dubois wo0dyn

View GitHub Profile
@jbenet
jbenet / simple-git-branching-model.md
Last active April 17, 2025 09:30
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.

import os
import re
import requests
import feedgenerator
from dateutil.parser import parse
from raven import Client
REPO = 'django/django'
@n1k0
n1k0 / casper-google-suggest.md
Last active February 22, 2020 17:50
A simple CasperJS script to fetch google suggestions from a partial search

CasperJS Google Suggest

The script:

/*global casper:true*/
var casper = require('casper').create({
    pageSettings: {
        userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Firefox/31.0"
 }
install: --no-rdoc --no-ri
update: --no-rdoc --no-ri
@magopian
magopian / rfpy3.py
Last active April 26, 2018 22:20
rfpy3.py : Ready For Python3? Simple script to be executed locally (in a virtualenv?) to check which of the local packages have the Py3 trove classifier, if they don't, if the newest version on PyPI has.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Ready For Python3?
Checks the locally installed distribution for the py3 trove classifier, and if
it's not found, check on PyPI if there's a newer version of this distribution.
This was done with some help from Matrixise.
@brunobord
brunobord / Usage.md
Last active December 14, 2015 23:58
JQuery FNU

Usage:

  • open any website using jQuery.
  • in the URL type
    javascript:$('*').each(function() { $(this).css({background: "#"+((1<<24)*Math.random()|0).toString(16)});});

Yes! it's ugly!

@rtt
rtt / gist:5029885
Last active January 15, 2022 19:50
python / jinja2 bytecode cache for Redis
from jinja2 import BytecodeCache
class RedisTemplateBytecodeCache(BytecodeCache):
'''Implements a Jinja2 bytecode cache on top of a pyredis.StrictRedis
connection
See: http://jinja.pocoo.org/docs/2.10/api/#bytecode-cache
'''
def __init__(self, redis_cnx, template_cache_key_prefix=None, ttl=86400):
@brunobord
brunobord / kill.js
Created January 30, 2013 23:21
Casper Script: restart Alwaysdata processes.
/**
* Casper script to restart Alwaysdata processes.
*
* Usage:
* $ casperjs kill.js [email protected] mysecretpassword
*/
var casper = require('casper').create();
casper.start("https://admin.alwaysdata.com/login/");
@n1k0
n1k0 / shortcuts.md
Last active December 10, 2015 07:28 — forked from lucasfais/gist:1207002

Sublime Text 2 - Useful Shortcuts (Mac OS X)

Forked from here, but let's use Markdown.

General

  • ⌘T go to file
  • βŒ˜βŒƒP go to project
  • ⌘R go to methods
  • βŒƒG go to line
@naholyr
naholyr / _service.md
Created December 13, 2012 09:39
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)