I hereby claim:
- I am craigmccoy on github.
- I am craigmccoy (https://keybase.io/craigmccoy) on keybase.
- I have a public key whose fingerprint is E8D1 A381 FCBC EAFE 5948 491B F8BB AAC1 65E7 6E75
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#! /bin/sh | |
# Installation | |
# - Move this to /etc/init.d/myservice | |
# - chmod +x this | |
# | |
# Starting and stopping | |
# - Start: `service myservice start` or `/etc/init.d/myservice start` | |
# - Stop: `service myservice stop` or `/etc/init.d/myservice stop` |
/** | |
* Example HTML markup: <a class="ajax-dialog" href="/path/to/ajax/page" rel="#dialog">Click to open</a> | |
*/ | |
$(function() { | |
$('a.ajax-dialog').click(function(evt) { | |
evt.preventDefault(); | |
var link = $(evt.target); | |
var contentUrl = link.attr('href'); | |
var targetDialog = $(link.attr('rel')); |
(function($) { | |
$.placeholder = function() { | |
if(typeof document.createElement('input').placeholder == 'undefined') { | |
$('[placeholder]').focus(function() { | |
var input = $(this); | |
if(input.val() == input.attr('placeholder')) { | |
input.val('').removeClass('placeholder'); | |
} | |
}).blur(function() { | |
var input = $(this); |
/* | |
* twitter-entities.js | |
* This function converts a tweet with "entity" metadata | |
* from plain text to linkified HTML. | |
* | |
* See the documentation here: http://dev.twitter.com/pages/tweet_entities | |
* Basically, add ?include_entities=true to your timeline call | |
* | |
* Copyright 2010, Wade Simmons | |
* Licensed under the MIT license |
(function($) { | |
$.log = function(context, message/*, ...*/) { | |
if(context.is('textarea')) { | |
if(arguments.length > 2) { | |
for(var i = 2; i < arguments.length; i++) { | |
message += ', ' + arguments[i]; | |
} | |
} | |
var contents = context.val(); | |
context.attr('readonly', 'readonly').val(contents + "\n" + message); |
(function($){ | |
$.fn.suppressTooltips = function() { | |
return this.each(function() { | |
var elem = $(this); | |
var title = elem.attr('title'); | |
var alt = elem.attr('alt'); | |
elem.hover(function() { | |
elem.attr('title', '').removeAttr('alt'); | |
}, function() { |
function isCapslock(e) { | |
e = (e) ? e : window.event; | |
var charCode = false; | |
if (e.which) { | |
charCode = e.which; | |
} else if (e.keyCode) { | |
charCode = e.keyCode; | |
} |