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
444 for me! |
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
tell application "Google Chrome" | |
activate | |
set theUrl to "http://tycho.usno.navy.mil/cgi-bin/timer.pl" | |
if (count every window) = 0 then | |
make new window | |
end if | |
set found to false | |
set theTabIndex to -1 |
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
var $ = require('NodObjC'); | |
module.exports = function(props){ | |
var NSUserNotificationCenterDelegate = $.NSObject.extend('NSUserNotificationCenterDelegate'); | |
NSUserNotificationCenterDelegate.addMethod('init', { retval: '@', args: ['@', ':'] }, function(self) { | |
$.NSUserNotificationCenter('defaultUserNotificationCenter')('setDelegate', self); | |
return self; | |
}); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>beforeRunningCommand</key> | |
<string>nop</string> | |
<key>bundleUUID</key> | |
<string>2E6B9F06-DDB6-4707-A2BB-8751CF1722A0</string> | |
<key>command</key> | |
<string>cat|gist -a "$TM_FILENAME" |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
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
// basic usage: | |
$('myParentElement').relayEvents({ | |
'a.menuitem':{ | |
'click': function(e){} | |
}, | |
'input[name=phone]':{ | |
'keydown': function(e){}, |
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
var Dictionary = new Native({ | |
name: 'Dictionary', | |
initialize: function(){ | |
this.keys = []; | |
this.values = []; | |
} | |
}); |
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
// inspired by jQuery watch: http://plugins.jquery.com/files/jquery-watch.js.txt | |
(function(){ | |
var watch = Object.prototype.watch, | |
unwatch = Object.prototype.unwatch, | |
watched = [], | |
timer; | |
Object.watch = function(obj, prop, fn){ |
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
var btn = new Element('button',{html:'Run'}).addEvent('click', Context('dynamic').handleWith('handleClick')); | |
Ccontext(1).addHandler('handleClick', function(){alert(1);}); | |
Ccontext(2).addHandler('handleClick', function(){alert(2);}); | |
Context.set(1); | |
Context('dynamic') === Context(1); | |
btn.fireEvent('click'); // alert(1) | |
Context.set(2); |
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
// # -- sequential speccing | |
var group1 = spec.group('description'); | |
group1.add('some description', fn); | |
group1.add('some other description', fn); | |
var group2 = spec.group('description2'); | |
group2.add('some description', fn); | |
group2.add('some other description', fn); |
OlderNewer