I hereby claim:
- I am mobz on github.
- I am mobz (https://keybase.io/mobz) on keybase.
- I have a public key whose fingerprint is 2EBE 8869 018A 03E6 7E59 034F D6A4 BEF4 A2AF B241
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
String.prototype.pad = function(n, str) { return (new Array(n - this.length)).join(str || "0"); }; |
(cls\s*:\s*|(class|cssClass|size)=)(['"])([\w\s]*\s)?CLASSNAMEHERE\b |
// i18n string format method | |
// usage: messageFormat("hello {0}, welcome {1}", "James", "Home"); | |
function messageFormat(str) { | |
var args = arguments; | |
return str.replace(/{(\d)}/g, function(r, n) { return args[+n+1];}); | |
} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>MelbJS</title> | |
<style> | |
.melbjs-logo { | |
width: 300px; | |
height: 300px; |
// The following is sugar for writing out in full a view constructor function, its prototype, and the boilerplate | |
// for inheriting from maria.ElementView. This sugar uses naming conventions to wire together | |
// the view with its model, controller, and their methods. | |
// | |
// A checkit.TodoView will observe a checkit.TodoModel. When the model changes, the update method below is called. | |
// When a user clicks on the todo element, the handling is delegated to the checkit.TodoController's | |
// handleRootClick method. | |
// | |
maria.ElementView.declareConstructor(checkit, 'TodoView', { | |
template: '<li><span class="todo-content"></span></li>', // the template can live elsewhere, of course |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Standalone JSTestRunner</title> | |
<!-- source scripts --> | |
<script src="../../main/webapp/www/core/jquery.js"></script> | |
<script src="../../main/webapp/www/core/core.js"></script> | |
<script src="../../main/webapp/www/core/widgets.js"></script> | |
move to repo mobz/domj
this.api = (function() { | |
var key = localStorage.getItem("_key") || 0; | |
return { | |
put: function( o, cb ) { | |
localStorage.setItem("_key", key++ ); | |
localStorage.setItem( "squares:" + key, JSON.stringify( o ) ); | |
setTimeout( function() { | |
cb(key); | |
}, 250 ); | |
}, |
#!/bin/sh | |
# don't commit jasmine specs containing a ddescribe or iit | |
if git diff --cached --name-only | xargs egrep --include "*Spec.js" "\b(iit|ddescribe)\b" | |
then | |
echo "found Spec with iit or ddescribe" | |
exit 1 | |
fi |