Skip to content

Instantly share code, notes, and snippets.

View thisgeek's full-sized avatar

Christopher Joslyn thisgeek

View GitHub Profile
@thisgeek
thisgeek / Growl iChat.scpt
Created January 19, 2012 17:12
Growl iChat
# From http://scriptingosx.com/2010/11/ichat-notification-with-growl/
property growlAppName : "Growl iChat"
property notificationNames : {"Buddy Became Available", ¬
"Buddy Became Unavailable", ¬
"Message Received", ¬
"Completed File Transfer"}
property defaultNotificationNames : {"Buddy Became Available", ¬
"Buddy Became Unavailable", ¬
"Message Received", ¬
@thisgeek
thisgeek / cookie.js
Created January 11, 2012 19:04
AMD Cookie.js
jQuery.fn.hideOnClickOutside = function () {
target = jQuery(this);
jQuery(document).one('click', function() {
target.hide();
});
target.click( function(event) {
event.stopPropagation();
});
return target;
}
jQuery.fn.resizeWithWindow = function(options) {
var settings = $.extend($.fn.resizeWithWindow.defaults, options),
element = $(this);
adjustSize(element);
$(window).resize(function() {
adjustSize(element);
});
function adjustSize(targets) {
class Pig {
function oink() {
print "Oink";
}
}
abstract class Decorator {
protected $obj;
function __construct($object) {
$this->obj = $object;