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 / bolderiser.js
Created July 2, 2013 08:25
AMD module definition
define(['jquery'], function ($) {
'use strict';
var Bolderiser = function ();
Bolderiser.prototype = {
embolden: function (el) {
var $el = $(el);
$el.css('font-weight', 'bold');
@wrumsby
wrumsby / yui_config.js
Last active December 18, 2015 22:49
Configuring YUI Loader
YUI.applyConfig({
modules: {
'my-bolderiser': {
type: 'js',
base: './build/',
requires: ['node-core', 'node-style']
}
}
});
@wrumsby
wrumsby / index.html
Last active December 18, 2015 22:49
Using a YUI module
<!DOCTYPE html>
<html>
<head>
<title>Using modules</title>
<script src="http://yui.yahooapis.com/3.11.0/build/yui/yui-min.js"></script>
<script src="yui_config.js"></script>
</head>
<body>
<p id="element">This is just some text.</p>
<script>
@wrumsby
wrumsby / my-bolderiser.js
Last active December 18, 2015 22:49
YUI module definition
YUI.add('my-bolderiser', function (Y) {
'use strict';
var Bolderiser = function () {
};
Bolderiser.prototype = {
embolden: function (el) {
var node = new Y.one(el);
@wrumsby
wrumsby / dabblet.css
Created June 24, 2013 20:13
One-way CSS transition - "yellow" fade out
/**
* One-way CSS transition - "yellow" fade out
*/
body {
background: #fcfcfc;
color: #333;
font-family: "Open Sans", sans-serif;
}
@wrumsby
wrumsby / dabblet.css
Created June 17, 2013 23:42
Birds and smiles
/**
* Birds and smiles
*/
body {
font-family: "Open Sans", sans-serif;
line-height: 1em;
font-size: 24px;
}
@wrumsby
wrumsby / karma.conf.js
Created June 13, 2013 09:13
Karma setup
// Karma configuration
// Generated on Thu Jun 13 2013 20:35:00 GMT+1200 (NZST)
// base path, that will be used to resolve files and exclude
basePath = '';
// list of files / patterns to load in the browser
files = [
@wrumsby
wrumsby / dabblet.css
Created June 6, 2013 01:28
Hamburger
/**
* Hamburger
*/
body {
background-color: #fff;
font-family: "Open Sans", sans-serif;
}
@wrumsby
wrumsby / dabblet.css
Created May 27, 2013 21:25
Hamburger
/**
* Hamburger
*/
body {
background-color: #fff;
font-family: "Open Sans", sans-serif;
}
@wrumsby
wrumsby / Foo.js
Created May 27, 2013 01:30
Documenting "interfaces" in JavaScript
/**
* Foo
*
* @class Foo
* @constructor
*/
function Foo() {}
Foo.prototype = {
/**