Skip to content

Instantly share code, notes, and snippets.


Dave Hulbert dave1010

View GitHub Profile
CHH / .gitignore
Created Aug 2, 2011
PHP Templating Engine with bindable $this support in 53 LOC
View .gitignore
subtleGradient / git-jira
Created Dec 17, 2010
Jira CLI with git config support! + stuff
View git-jira
#!/usr/bin/env bash
# Author: Thomas Aylott <>
# Usage:|
# git-jira getIssue
# git-jira getComments
# Notes:|
# This expects you to use branch names like "thomas/HUE-123-Make-Things-Awesomer" or "tom-HUE-321-code-stuff"
BRANCH_NAME="$(git symbolic-ref HEAD|sed 's/refs\/heads\///')"
TICKET_ID="$(echo "$BRANCH_NAME"|sed -E 's/^.*[/-]([A-Z]+-[0-9]+).*$/\1/')"
ryanb / github_tree_slider.js
Created Dec 6, 2010
This is how GitHub's new AJAX file browser works.
View github_tree_slider.js
GitHub.TreeSlider = function () {
if (window.history && window.history.pushState) {
function a() {
if (e.sliding) {
e.sliding = false;
if (!($("#slider").length == 0 || !GitHub.shouldSlide)) if (!navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {
View jQuery.twtShrt.js
* Make a form field shorten text as you type
* Made for keeping tweets < 140 chrs
* Usage: $('textarea').twtShrt();
* @author dave1010
jQuery.fn.twtShrt = function() {
var o = [
"seriously","have to", "what is", "done", "oh my god", "oh my gosh", "face to face", "for the win", "for the loss", "in real life", "your mileage may vary", "best regards", "joint venture", "let me know", "not safe for work", "are you ok", "tomorrow", "as soon as possible", "be right back", "be back later", "be back soon", "at the moment", "by the way", "in my honest opinion", "tata for now", "as known as", "also known as", "see you later", "see you", "for your information", "in my opinion", "too good to be true", "best friends forever", "best friend forever", "best friends", "best friend", "definitely", "been", "hello", "i am", "night", "when", "some", "to", "speak", "you", "your", "for", "friend", "people", "see", "be", "and", "&", "anyone", "because", "are", "bate", "date", "fate", "great", "hate", "late", "mate",
View jira_post_receive.rb
#!/usr/bin/env ruby
# Update JIRA with git commit messages
# == Usage ==
# To update a JIRA issue, prepend the first line of your git commit message
# with the issue key and a colon:
# $ git commit -m "GIT-1: Updates something"