Skip to content

Instantly share code, notes, and snippets.

View timnovinger's full-sized avatar

Tim Novinger timnovinger

View GitHub Profile
#!bash
#
# bash completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
// ===========================================================================================================
// NAME
//
// DESCRIPTION GOES HERE
//
// Example
// Mootools style: var *name* = new *NAME*('.tooltip', {'options':'hash', 'syntax':'example'});
// jQuery style: $(element).*name*({'options':'hash', 'syntax':'example'});
//
// Options
@timnovinger
timnovinger / Tweet Caching.rb
Created April 22, 2010 17:00
Twitter Caching
class Tweet < ActiveRecord::Base
def self.fetch_new
# attempt to connect and authenticate to Twitter
httpauth = Twitter::HTTPAuth.new(ENV['TWITTER_USR'], ENV['TWITTER_PWD'])
client = Twitter::Base.new(httpauth)
# fetch a new tweet, cache it to the database, and then return it
Tweet.create :text => client.user_timeline.first.text
client.user_timeline.first.text
@timnovinger
timnovinger / proxy.pac
Created May 10, 2010 04:19
Proxy PAC file for watching UK telly outside of the UK
// ========================================================
// Route traffic through UK based proxy
// ========================================================
function FindProxyForURL(url, host) {
// --------------------------------------------------------
// No longer work still it seems
// --------------------------------------------------------
// 92.52.125.20:80
@timnovinger
timnovinger / jsl.textmate.conf
Created August 2, 2010 18:15
JS Lint Configuration Settings
#
# Configuration File for JavaScript Lint 0.2.6
# Developed by Matthias Miller (http://www.JavaScriptLint.com)
#
# This configuration file can be used to lint a collection of scripts, or to enable
# or disable warnings for scripts that are linted via the command line.
#
#### NOTE TO TEXTMATE BUNDLE USERS:
#### Feel free to experiment with enabling/disabling individual warnings to
@timnovinger
timnovinger / post-commit.sh
Created October 6, 2010 20:59
My personal post-commit Git hook
#!/bin/sh
#
# An example hook script that is called after a successful
# commit is made.
#
# To enable this hook, rename this file to "post-commit".
: Nothing
afplay ~/.git/happykids.wav > /dev/null 2>&1 &
@timnovinger
timnovinger / .irbrc
Last active September 26, 2015 19:47 — forked from tjh/.irbrc
# *****************************************
# .irbrc
#
# Tim Harvey - Literacy5
# http://literacy5.com/
#
# Includes tons of visual sugar, based on the
# work of:
#
# UnixMonkey - http://gist.github.com/254551
@timnovinger
timnovinger / scrobble.py
Created August 31, 2011 18:13 — forked from jonpierce/scrobble.py
Last.fm scrobbling for Pianobar, the command-line Pandora client.
#!/usr/bin/env python
"""
Last.fm scrobbling for Pianobar, the command-line Pandora client. Requires Pianobar, Python, pyLast and Last.fm API credentials.
https://github.com/PromyLOPh/pianobar/
http://code.google.com/p/pylast/
http://www.last.fm/api/account
Installation:
1) Copy this script and pylast.py to the Pianobar config directory, ~/.config/pianobar/, and make sure this script is executable
@timnovinger
timnovinger / lobster.css
Created October 17, 2011 23:09
Lobster font-face
@font-face {
font-family: 'Lobster';
font-style: normal;
font-weight: normal;
src: local('Lobster'), url('http://themes.googleusercontent.com/static/fonts/lobster/v4/NIaFDq6p6eLpSvtV2DTNDQLUuEpTyoUstqEm5AMlJo4.woff') format('woff');
}
@timnovinger
timnovinger / jquery.modernizr.placeholder.js
Last active September 27, 2015 16:48
ColorJar: Add HTML5 input placeholder support to older browsers only when HTML5 not supported
// ------------------------------
// Form Input Placeholder
// ------------------------------
if (!Modernizr.input.placeholder)
{
$('input[placeholder], textarea[placeholder]').each(function(i, input){
var $input = $(input);
// Initially load the placeholder value
if ($input.val() === '') { $input.val($input.attr('placeholder')); }