Skip to content

Instantly share code, notes, and snippets.

View froots's full-sized avatar

Jim Newbery froots

View GitHub Profile
@froots
froots / app.js
Created February 23, 2011 11:00
Simple test case demonstrating issue 228 for documentcloud/backbone
var AppView = Backbone.View.extend({
display: function(text) {
$('#app').text(text);
}
});
var AppController = Backbone.Controller.extend({
@froots
froots / with-jasmine-sinon.js
Created February 14, 2011 17:13
An example Jasmine spec using jasmine-sinon to provide nicer matchers
it("should call the callback", function() {
var spy = sinon.spy();
doSomethingThenCallback(spy);
expect(spy).toHaveBeenCalled();
});
@froots
froots / without-jasmine-sinon.js
Created February 14, 2011 17:10
An example Jasmine spec using a Sinon.JS spy without the jasmine-sinon plugin
it("should call the callback", function() {
var spy = sinon.spy();
doSomethingThenCallback(spy);
expect(spy.called).toBeTruthy();
});
@froots
froots / example-gist.js
Created December 1, 2010 07:22
Example gist for testing import into web page
var myModule = (function(w) {
var internal = "I'm hidden",
privateMethod = function() {
return "Message is " + internal;
},
publicMethod = function() {
return privateMethod().replace('hidden', 'visible');
@froots
froots / UK Filco Majestouch-2 Tenkeyless.keylayout
Created May 23, 2014 15:31
Filco Majestouch 2 tenkeyless UK OS X keyboard layout
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboard PUBLIC "" "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Created by Ukelele version 2.2.7 on 2014-01-18 at 17:44 (GMT)-->
<!--Last edited by Ukelele version 2.2.7 on 2014-01-18 at 17:59 (GMT)-->
<keyboard group="0" id="9190" name="UK Filco Majestouch-2 Tenkeyless" maxout="1">
<layouts>
<layout first="0" last="17" modifiers="30" mapSet="a8"/>
</layouts>
<modifierMap id="30" defaultIndex="7">
<keyMapSelect mapIndex="0">
@froots
froots / gist:9410296
Created March 7, 2014 12:05
Keybase proof

Keybase proof

I hereby claim:

  • I am froots on github.
  • I am froots (https://keybase.io/froots) on keybase.
  • I have a public key whose fingerprint is 8C86 3E94 ECF6 E978 9020 18FD 8E09 E8E2 E366 3297

To claim this, I am signing this object: