Skip to content

Instantly share code, notes, and snippets.

testtest
$(function(){
$("#about-button").css({
opacity: 0.3
});
$("#contact-button").css({
opacity: 0.3
});
$("#page-wrap div.button")
/*
* jQuery DropNice Plugin
* http://github.com/shadowhand/jquery-dropnice
*
* Copyright (c) 2010 Woody Gilk <woody@wingsc.com>
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
// simple jquery tinymce lazyload
// - using $.getScript alone will not work
// - it's important to set the tinymce basepath, and set the domLoaded attribute
window.tinyMCEPreInit = {
base: '/js/tiny_mce/',
suffix : '',
query : ''
};
$(function(){
/**
* $Id: jquery.uri.js 453 2008-10-14 12:24:41Z spocke $
*
* @author Moxiecode
* @copyright Copyright � 2004-2008, Moxiecode Systems AB, All rights reserved.
*/
(function($) {
var lazyLoading, delayedInits = [];
// ripped from http://is.gd/bK13R
$.fn._init = $.fn.init;
$.getLastSelector = function() {
return $.getLastSelector.lastSelector;
};
$.fn.init = function(selector, context) {
if (typeof selector === 'string') $.getLastSelector.lastSelector = selector;
// simple jQuery templating: replace placeholders in textnodes
// placeholder format: ${a-z}
// usage $(elem).render({ dataKey: dataValue });
// demo: http://badsyntax.github.com/jquery-templating.html
$.fn.render = function(data){
data = data || {};
function walkTextNodes(textNodeCallback){
#!/usr/bin/env bash
authors=$(svn log -q | grep -e '^r' | awk 'BEGIN { FS = "|" } ; { print $2 }' | sort | uniq)
for author in ${authors}; do
echo "${author} = NAME <USER@DOMAIN>";
done
#!/bin/bash
#
# example commit-msg hook to prevent commit messages with less than 20 characters
message=`cat $1`
message_length=`echo ${#message}`
if [ $message_length -lt 20 ]; then
echo "Commit failed. The commit message is less than 20 characters. (length is $message_length)"
exit 1
# An example iTunes rsync over SSH. I use this to sync my iTunes library with my media server
# Excludes hidden files
rsync -avz --delete -e ssh --exclude=".*" /Users/username/Music/iTunes/iTunes\ Music sshusername@hostname:/media/music