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
| Windows Registry Editor Version 5.00 | |
| [HKEY_CURRENT_USER\Software\Microsoft\Command Processor] | |
| "CompletionChar"=dword:00000009 | |
| "DefaultColor"=dword:00000000 | |
| "EnableExtensions"=dword:00000001 | |
| "PathCompletionChar"=dword:00000009 | |
| "AutoRun"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,\ | |
| 4c,00,45,00,25,00,5c,00,70,00,72,00,6f,00,66,00,69,00,6c,00,65,00,2e,00,62,\ | |
| 00,61,00,74,00,00,00 |
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
| (defn comment? [s] | |
| (.startsWith s "#")) | |
| (defn not-comment? [s] | |
| (not (comment? s))) | |
| (defn remove-comments [line] | |
| (filter not-comment? line)) | |
| (defn nil-if-hyphen [s] |
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
| (defmacro with-ns | |
| "Evaluates body in another namespace. ns is either a namespace | |
| object or a symbol. This makes it possible to define functions in | |
| namespaces other than the current one." | |
| [ns & body] | |
| `(binding [*ns* (the-ns ~ns)] | |
| ~@(map (fn [form] `(eval '~form)) body))) | |
| (with-ns 'clojure.pprint (def ^:dynamic *print-right-margin* 140)) |
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
| (defn super-shake [item value] | |
| (start (apply bind item (mapcat (fn [dist] [{:effect :slide, :left dist, :time 375} | |
| {:effect :slide, :left (- dist), :time 375}]) | |
| (range 500 0 -100))))) |
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 expected = [ | |
| [ | |
| {item:"aa", hasDup:"false", isDup:"false"} | |
| ], | |
| [ | |
| {item:"b1", hasDup:"true", isDup:"false"}, | |
| {item:"b2", hasDup:"true", isDup:"true"} | |
| ], | |
| [ | |
| {item:"cc", hasDup:"false", isDup:"false"} |
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
| /** | |
| * Underscore mixin to merge objects; last item takes precedence (uses _.extend not _.default) | |
| **/ | |
| _.mixin({ | |
| merge : function() { | |
| return _.reduce(arguments, function(list, obj){ | |
| return _.extend(list, obj); | |
| }, {}); | |
| } |
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
| // Some common IE shims... indexOf, startsWith, trim | |
| /* | |
| Really? IE8 Doesn't have .indexOf | |
| */ | |
| if (!Array.prototype.indexOf) { | |
| Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) { | |
| "use strict"; | |
| if (this === null) { | |
| throw new TypeError(); |
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
| //Be safe out there; Check for undefined, null and 'null' and return an empty string | |
| _.mixin({ | |
| safeString : function(value) { | |
| return (typeof value !== 'undefined' && value !== null && value !== "null") ? value : ""; | |
| } | |
| }); |
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
| ; (:require | |
| ; [goog.dom :as dom] | |
| ; [goog.events :as events]) | |
| (defn log [msg] | |
| (js/console.log msg)) | |
| (defn listen [el type f] | |
| (let [e (dom/getElement el)] | |
| (events/listen e type (partial f)))) |
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
| . |