This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php | |
$('[placeholder]').focus(function() { | |
var input = $(this); | |
if (input.val() == input.attr('placeholder')) { | |
input.val(''); | |
input.removeClass('placeholder'); | |
} | |
}).blur(function() { | |
var input = $(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'rubygems' | |
require 'steam' | |
require 'net/http' | |
require 'resolv' | |
require 'mail' | |
class DnsUpdateBot | |
def initialize |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Aside from removing Ruby on Rails specific code this is taken verbatim from | |
# mislav's git-deploy (http://github.com/mislav/git-deploy) and it's awesome | |
# - Ryan Florence (http://ryanflorence.com) | |
# | |
# Install this hook to a remote repository with a working tree, when you push | |
# to it, this hook will reset the head so the files are updated | |
if ENV['GIT_DIR'] == '.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# mkv2m4v inputfile.mkv | |
# | |
# Given an MKV container with H.264 video and AC3 audio, converts | |
# quickly to an iPad-compatible MP4 container without re-encoding the | |
# video (so it must already be in an iPad-compatible resolution); the | |
# audio is downmixed to stereo with Dynamic Range Compression. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (!defined('BASEPATH')) exit('No direct script access allowed.'); | |
/* MY_Model | |
* Reorganizes the $DB::result() object passed to it so joined | |
* tables are child-objects of the result object, rather than | |
* first-class variables. Pretty strict on the way it works. | |
* | |
* Example: | |
* protected $relationships = array( | |
* 'has_one' => array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
--- | |
name: guilloche | |
script: guilloche.js | |
description: guilloche | |
provides: [Guilloche] | |
... | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# USAGE: sudo ./init.rb project_name path/to/web/root | |
# NOTE: This file must be run with root privileges (sudo). | |
# You must also give it exec permissions: chmod +x init.rb | |
# This should include the trailing slash | |
DEFAULT_ROOT = '/Users/dan/Sites/' | |
VHOST_FOLDER = '/etc/apache2/sites/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Your Name | |
email = [email protected] | |
[core] | |
autocrlf = input | |
[color] | |
status = auto | |
diff = auto | |
branch = auto | |
[alias] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---------------------- | |
// NO <?php TAG! | |
// ---------------------- | |
// ---------------------- | |
// SIGNIFICANT WHITESPACE ELIMINATES THE NEED | |
// FOR CURLY BRACES (YAY) | |
// ---------------------- | |
class Sessions extends MY_Controller |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
/* | |
* Takes a list of files and runs them through JSHint | |
* | |
* Usage: | |
* check.js file1 file2 file3 | |
*/ | |
var fs = require('fs'), |
OlderNewer