Skip to content

Instantly share code, notes, and snippets.

View wrumsby's full-sized avatar
💭
what is this even

Walter Rumsby wrumsby

💭
what is this even
View GitHub Profile
@wrumsby
wrumsby / dabblet.css
Created May 21, 2013 03:31
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body {
background-color: #fff;
}
span {
content:attr('data-foo') " ";
}
@wrumsby
wrumsby / dabblet.css
Created May 6, 2013 02:09
Using images for checkboxes and radiobuttons
/**
* Using images for checkboxes and radiobuttons
*/
body {
background-color: #fff;
color: #333;
font-family: "Open Sans", Arial, Helvetica, sans-serif;
line-height: 1.6;
}
@wrumsby
wrumsby / dabblet.css
Created May 6, 2013 01:46
Using images for checkboxes and radiobuttons
/**
* Using images for checkboxes and radiobuttons
*/
body {
background-color: #fff;
color: #333;
font-family: "Open Sans", Arial, Helvetica, sans-serif;
line-height: 1.6;
}
@wrumsby
wrumsby / dabblet.css
Created April 26, 2013 04:18
Groove Holmes
/**
* Groove Holmes
*/
body {
background-color: #ddd;
color: #333;
font-family: "Open Sans", sans-serif;
}
div:not(.item) {
@wrumsby
wrumsby / dabblet.css
Created April 26, 2013 02:56
I wish CSS provided a previous sibiling selector
/**
* I wish CSS provided a previous sibiling selector
*/
body {
background-color: #fff;
color: #333;
font-family: "Open Sans", sans-serif;
}
div:not(.item) {
@wrumsby
wrumsby / test-case.js
Last active December 16, 2015 13:08
Trying to find the correct way to write a test case with Chai if the test should fail when an event is invoked.
define(['testable', 'chai'], function (Testable, chai) {
'use strict';
var assert = chai.assert;
describe('testable', function () {
describe('method', function () {
it('should not fire an "invoked" event', function (/*done?*/) {
var testable = new Testable();
@wrumsby
wrumsby / dabblet.css
Created April 17, 2013 01:46
Big tabs are big!
/**
* Big tabs are big!
*/
body {
margin-top: 1em;
padding: 0;
background: linear-gradient(to bottom, #eee, #ccc);
color: #333;
font-family: "Open Sans", Arial, Helvetica, sans-serif;
/*global define, describe, it */
define(['chai', 'boilerplate/simple'], function (chai, simple) {
'use strict';
var assert = chai.assert;
describe('simple', function () {
describe('later', function () {
it('should invoke the callback', function (done) {
simple.later(function () {
@wrumsby
wrumsby / test-simple.js
Last active December 15, 2015 22:49
Example of how to use Sinon's fakeServer.
/*global define, describe, it, before, after */
define(['chai', 'sinon', 'boilerplate/simple'], function (chai, sinon, simple) {
'use strict';
var assert = chai.assert;
describe('simple', function () {
describe('getData', function () {
var server;
@wrumsby
wrumsby / test-simple.js
Last active May 4, 2017 10:06
Example of how to use Sinon's useFakeTimers.
/*global define, describe, it, before, after */
define(['chai', 'sinon', 'boilerplate/simple'], function (chai, sinon, simple) {
'use strict';
var assert = chai.assert;
describe('simple', function () {
describe('stamp', function () {
var clock;