Skip to content

Instantly share code, notes, and snippets.

@oerd
oerd / chart.impact.js
Created June 4, 2012 14:20 — forked from mehlah/chart.impact.js
d3 impact graph
// Inspired by http://dmitry.baranovskiy.com/work/github/
d3.chart.impact = function() {
var width = 1,
height = 1,
duration = 0,
domain = null,
values = Object,
key = d3_chart_impactKey,
value = d3_chart_impactValue,
sort = null,
@mariuswilms
mariuswilms / pre-commit
Last active May 19, 2022 09:36
Git pre-commit Hook
#!/bin/bash
#
# Language agnostic GIT pre commit hook.
#
# Copyright (c) 2013 Marius Wilms.
# All rights reserved.
#
# Distributed under the terms of the BSD 3-clause license. Redistributions
# of this file must retain the above copyright notice. For the full license
# text see: http://opensource.org/licenses/BSD-3-Clause.
@meirish
meirish / mbriggs.theme.bash
Created May 20, 2012 21:35
bash-it mbriggs change to add virtualenv
# ------------------------------------------------------------------#
# FILE: mbriggs.zsh-theme #
# BY: Matt Briggs ([email protected]) #
# BASED ON: smt by Stephen Tudor ([email protected]) #
# ------------------------------------------------------------------#
SCM_THEME_PROMPT_DIRTY="${red}⚡${reset_color}"
SCM_THEME_PROMPT_AHEAD="${red}!${reset_color}"
SCM_THEME_PROMPT_CLEAN="${green}✓${reset_color}"
SCM_THEME_PROMPT_PREFIX=" "
@jperras
jperras / deb-control.sh
Created May 14, 2012 18:17
For when you need to dive into a .deb and edit the control file.
#!/bin/bash
if [[ -z "$1" ]]; then
echo "Syntax: $0 debfile"
exit 1
fi
DEBFILE="$1"
TMPDIR=`mktemp -d /tmp/deb.XXXXXXXXXX` || exit 1
OUTPUT=`basename "$DEBFILE" .deb`.modified.deb
@nateabele
nateabele / routes.php
Last active June 16, 2017 13:05
Lithium continuation route examples
<?php
/**
* Continuation routing examples. Handles URLs in the following forms:
*
* /posts
* /en/posts
* /admin/posts
* /admin/en/posts
* /admin/en/posts.json
* /admin/en/posts/4ef16ccc7f8b9aa331000064.json
@defunkt
defunkt / gitio
Created September 11, 2011 08:11
Turn a github.com URL into a git.io URL.
#!/usr/bin/env ruby
# Usage: gitio URL [CODE]
#
# Turns a github.com URL
# into a git.io URL
#
# Copies the git.io URL to your clipboard.
url = ARGV[0]
code = ARGV[1]