Skip to content

Instantly share code, notes, and snippets.


Pierre Bertet bpierre

View GitHub Profile
mahemoff /
Created Dec 17, 2015
Aliases to support semantically-versioned git tags
# First install
# With this script, you can run "vminor add more cowbell" or just "vminor"
function vbump() {
semver inc $level
git tag -a $(semver tag) -m "${*:-bump}"
git tag -n9 | grep `git describe` # show annotated
indexzero /
Last active Dec 22, 2015
Top 30 Episodes of Futurama

The Top 30 Futurama Episodes of ALL-TIME

30. (S10E12) Murder on the Planet Express

" Wait, wait, wait, wait, you can't give everybody guns!"

29. (S02E16) The Deep South

creationix / ideas.markdown
Last active Dec 27, 2015
Streams proposals
View ideas.markdown



I'll use the word "promise" to refer to some async action that will happen once at a later date. It's a non-blocking way to wait for a value. It will eventually resolve with either an error or a value.

Don't get caught up in terminology. If you prefer continuables over node-style callbacks, pretend in your mind that all code samples are using them. If you prefer callback, imagine that.

// Node style callback syntax
bpierre / Makefile
Created Nov 5, 2011
A Makefile to concatenate / minify my JS Scripts and convert/compress my Stylus (CSS preprocessor) files
View Makefile
# JS files
JS_FINAL = js/project-name-all.js
JS_TARGETS = js/file1.js \
js/file2.js \
# CSS files
CSS_FINAL = css/project-name-all.css
STYLUS_TARGETS = css/file1.styl \
View git-semver-tags
# Usage: git semver-tags [-p|--pre]
# Lists semver tags in the repository in order from newest to oldest.
# Useful for e.g. programmatically finding the latest release tag:
# `git semver-tags | head -n 1`.
# Tag names must be valid according to the SemVer 1.0.0 specification

Guide to loading/error events and substates

In addition to the techniques described in the Asynchronous Routing Guide, the Ember Router provides powerful yet overridable conventions for customizing asynchronous transitions between routes by making use of error and loading substates.

loading substates

brendo /
Created Apr 4, 2011
Symphony Events: A Detailed Look

Forms have been an integral part of any interactive site since the dawn of time, they promote interactivity and are usually the most common way users interact with a site. It's commonplace that when a form is submitted, the website will take 'action' and do something with the data and then provide a user with the result. Symphony provides this logic layer via Events.

This tutorial assumes you have a basic understanding of how Events work in Symphony (if not, this may be a good introduction) and are semi comfortable writing some PHP code. I'll be showing you some of the lesser known features of Symphony Events, including event priority, event chaining and a brief demonstration of how to write a custom Event. The difficulty level progresses as we go through, but with any luck you'll be able to learn a thing or two :)

Getting Started

The Scenario

Our client requires a form that allows a user to submit some details about their new car purchase. Th

mattdesl / animated-grid.js
Created Jul 27, 2018
animated grid lines
View animated-grid.js
const canvasSketch = require('canvas-sketch');
const { lerp } = require('./util/math');
const settings = {
animate: true,
duration: 3,
dimensions: [ 640, 640 ],
scaleToView: true,
playbackRate: 'throttle',
fps: 24
View gist:156623
This fabric file makes setting up and deploying a django application much
easier, but it does make a few assumptions. Namely that you're using Git,
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have
Django installed on your local machine and SSH installed on both the local
machine and any servers you want to deploy to.
_note that I've used the name project_name throughout this example. Replace
this with whatever your project is called._