Skip to content

Instantly share code, notes, and snippets.

View neonstalwart's full-sized avatar

Ben Hockey neonstalwart

  • google.com
  • Boulder, CO
View GitHub Profile
@neonstalwart
neonstalwart / dojo.build.js
Created December 7, 2010 18:52
building dojo with require.js
({
// base url, relative to appDir
baseUrl: './',
// output directory, relative to this file
dir: './build',
// closure, closure.keepLines, none
optimize: 'closure',
@neonstalwart
neonstalwart / issue132.diff
Created December 3, 2010 19:55
fix for less.js issue 132
diff --git a/lib/less/tree/url.js b/lib/less/tree/url.js
index 33b05b9..f53f1ea 100644
--- a/lib/less/tree/url.js
+++ b/lib/less/tree/url.js
@@ -14,8 +14,15 @@ tree.URL = function (val, paths) {
};
tree.URL.prototype = {
toCSS: function () {
- return "url(" + (this.attrs ? 'data:' + this.attrs.mime + this.attrs.charset + this.attrs.base64 + this.attrs.data
- : this.value.toCSS()) + ")";
@neonstalwart
neonstalwart / foo.js
Created December 1, 2010 16:19
requirejs build error - ReferenceError: "foo" is not defined.
(function () {
var foo = {
bar: 'baz'
}
define('foo', [], foo);
}());
@neonstalwart
neonstalwart / imported.less
Created October 15, 2010 17:54
testing less importing
/* empty */
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html dir="ltr">
<head>
<style type="text/css">
body, html { font-family:helvetica,arial,sans-serif; font-size:90%; }
</style>
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js"
djConfig="parseOnLoad: true">
</script>
@neonstalwart
neonstalwart / gist:497000
Created July 29, 2010 02:01
dojo-docs-debug
<script>
var djConfig = {
modulePaths: {
docs: '../../../docs',
CodeGlass: '../../../CodeGlass'
}
}
</script>
<script src="../../_addon/dojo_build/tmp/dojo-release-1.5.0-src/dojo/dojo.js"></script>
var start = Date.now(),
i = 1e5,
a = [0,1,2,3,4,5,6,7,8,9],
total, l, j;
while(i--){
total = 0;
// uncomment the line you want to test
l = a.length; while(l--){ total = total + a[l]; }
//for(j = 0, l=a.length; j < l; j++){ total = total + a[j]; }
var start = Date.now(),
i = 1e5;
while(i--){
//'abc'.search(/a/);
//'abc'.match(/a/);
/a/.test('abc');
///a/.exec('abc');
}
console.log(Date.now() - start);
@neonstalwart
neonstalwart / test_Dialog.html
Created June 24, 2010 19:13
#11369 test case
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Dialog Widget Dojo Tests</title>
<style type="text/css">
@import "../../dojo/resources/dojo.css";
@import "css/dijitTests.css";
<!DOCTYPE HTML>
<html>
<head>
<title>#10705 Test</title>
<link rel='stylesheet' href='../dojo/resources/dojo.css'>
<link rel='stylesheet' href='../dijit/themes/dijit.css'>
<link rel='stylesheet' href='../dijit/themes/tundra/tundra.css'>
<script type='text/javascript'>