This file contains hidden or 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
| Element.implement({ | |
| matchFromRoot: function(selector){ | |
| return document.getElements(selector, true).contains(this); | |
| } | |
| }); | |
| myElement.match('div') // true | |
| myElement.match('body div') // false | |
| myElement.matchFromRoot('div') // true |
This file contains hidden or 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 hidden or 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
| escape - completion of words in the current document | |
| ⌘/ - comment selection/line with line comments | |
| ⌘⌥/ - comment selection/line with block comment | |
| command option . - close current HTML/XML tag | |
| command-shift-l - select current line | |
| command-option-a - edit all selected rows | |
| command-option-return - insert terminator at end of line | |
| command-shift-t - select file by name / focus project search | |
| command-ctrl-t - select command/snippet by name |
This file contains hidden or 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
| From d954fbce5fbfc5d6070d796afacf998036c0cd51 Mon Sep 17 00:00:00 2001 | |
| From: subtleGradient <oblivious+github@subtleGradient.com> | |
| Date: Thu, 20 Nov 2008 08:51:07 -0700 | |
| Subject: [PATCH] Move observe into a method so that it can be observed | |
| --- | |
| Autocompleter.js | 15 ++++++++++----- | |
| 1 files changed, 10 insertions(+), 5 deletions(-) | |
| diff --git a/Autocompleter.js b/Autocompleter.js |
This file contains hidden or 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 SubtleBenchmarker = new new Class({ | |
| benchmarks:{}, | |
| start : function(key){ | |
| this.benchmarks[key] = this.benchmarks[key] || []; | |
| this.benchmarks[key].push({ start:new Date() }); | |
| }, | |
| end : function(key){ | |
| this.benchmarks[key][this.benchmarks[key].length-1].end = new Date(); |
This file contains hidden or 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
| /*Style*/ | |
| .curtain{ | |
| color: rgb(32,32,32); | |
| background-color: rgb(32,32,32); | |
| -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; | |
| filter: alpha(opacity=80); | |
| -moz-opacity: 0.8; | |
| opacity: 0.8; | |
| } | |
| /*Positioning*/ |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| # convert CSV to JSON hash of hashes | |
| # uses the first column as the ID column, must be unique per row | |
| # takes the CSV filepath as first argument | |
| # fallsback to STDIN when there are no arguments | |
| require 'rubygems' | |
| require 'csv' | |
| require 'json' | |
This file contains hidden or 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
| /* | |
| * Mootools excanvas wrapper, because ibolmo moocanvas doesn't support image rotate well. | |
| * | |
| * MIT Licenced - Daniel Steigerwald (daniel.steigerwald.cz) | |
| * | |
| */ | |
| var Canvas = new Class({ | |
| initialize: function() { | |
| var params = Array.link(arguments, { document: Document.type, properties: Object.type }); |
This file contains hidden or 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
| function chained(){ console.log(arguments); return arguments.callee; }; | |
| chained(1) | |
| (2) | |
| (3) | |
| (4) | |
| (5) | |
| (6) | |
| (7) | |
| (8) | |
| (9) |
This file contains hidden or 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
| { scopeName = 'source.ruby.experimental'; | |
| foldingStartMarker = '(?x)^ | |
| (\s*+ | |
| (module|class|def | |
| |unless|if | |
| |case | |
| |begin | |
| |for|while|until | |
| |^=begin | |
| |( "(\\.|[^"])*+" # eat a double quoted string |