Skip to content

Instantly share code, notes, and snippets.

View moneal's full-sized avatar

Morgan O'Neal moneal

View GitHub Profile
@moneal
moneal / remove_svn.sh
Created January 8, 2010 00:10
remove .svn folders
#!/bin/sh
echo "recursively removing .svn folders from"
pwd
rm -rf `find . -type d -name .svn`
rm `find ./ -regex ".*~.*"`
rm `find ./ -regex ".*swp$"`
@moneal
moneal / custom.js
Created January 7, 2010 18:52
little jQuery snippets that I use on most sites.
$(document).ready(function () {
$('a.new-window, a[rel=external]').live("click", function(){
window.open(this.href);
return false;
});
jQuery.fn.center = function (onTopOf) {
this.css("position","absolute");
// Attempt to make a drop-and-forget bunch of scripts that mimick some missing html5 goodies automatically
// Example:
// $(document).ready(function() {
// ProvideHtml5.autofocus()
// ProvideHtml5.datepicker()
// ProvideHtml5.forcenumber()
// })
var ProvideHtml5 = {
autofocus = function() {