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
| (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( |
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
| ### | |
| # Because it's fun | |
| ### | |
| RANGE=54 | |
| number=$RANDOM | |
| let "number %= $RANGE" | |
| case $number in | |
| 0) | |
| cow="apt" |
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
| tp_inst.amNames = $.map(tp_inst._defaults.amNames, function(val) { if ($.type(val) === "string") { return val.toUpperCase(); } }); | |
| tp_inst.pmNames = $.map(tp_inst._defaults.pmNames, function(val) { if ($.type(val) === "string") { return val.toUpperCase(); } }); |
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
| define(["require", "exports"], function(require, exports) { | |
| var StringUtil = (function () { | |
| function StringUtil() { } | |
| StringUtil.truncate = function truncate(str, limit) { | |
| if(str.length > limit) { | |
| var r; | |
| var ret; | |
| r = new RegExp("^.{0," + limit + "}\\b"); | |
| ret = r.exec(str)[0]; |
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
| /* | |
| Copyright 2012 Google Inc. All Rights Reserved. | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software |
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
| /Users/semperos/opt/nvm/v0.8.7/lib/node_modules/mimosa/lib/util/file.coffee:82 | |
| if (stats1.mtime > stats2.mtime) { | |
| ^ | |
| TypeError: Cannot read property 'mtime' of undefined | |
| at FileUtils.isFirstFileNewer (/Users/semperos/opt/nvm/v0.8.7/lib/node_modules/mimosa/lib/util/file.coffee:82:23) | |
| at Object.oncomplete (fs.js:297:15) | |
| npm ERR! package-name@0.0.1 start: `mimosa watch --server` | |
| npm ERR! `sh "-c" "mimosa watch --server"` failed with 1 | |
| npm ERR! | |
| npm ERR! Failed at the package-name@0.0.1 start script. |
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
| # Define your class | |
| class Foo | |
| add: (a, b) -> | |
| a + b | |
| @upper: (s) -> | |
| s.toUpperCase() | |
| class Bar | |
| multiply: (a, b) -> | |
| a * b |
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
| @model.get('fooCollection').create({ | |
| unit: | |
| title: ui.item.label | |
| url: ui.item.url | |
| }) |
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
| ;; Functional programming | |
| (is (= "Item 'Foo' deleted successfully" | |
| (text "div.message"))) | |
| (is (some #{"Item 'Foo' deleted successfully"} | |
| (apply text (elements "div.message")))) | |
| (is (= (count (elements "div.message")) 1)) | |
| ;; Logic programming | |
| (s (run* [q] |