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
Last active December 19, 2015 14:49
ES6 module definition
import { $ } from 'dollar';
Bolderiser = function () {
};
Bolderiser.prototype = {
embolden: function (id) {
var el = $.byId(id);
el.style.fontWeight = 'bold';
@wrumsby
wrumsby / dabblet.css
Created July 4, 2013 01:21 — forked from psyrendust/dabblet.css
Menus with actions.
/**
* Menus with actions.
*/
body {
background-color: #eee;
color: #333;
font-family: "Open Sans", sans-serif;
}
@wrumsby
wrumsby / dabblet.css
Created July 3, 2013 03:56
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
body {
background-color: #eee;
color: #333;
font-family: "Open Sans", sans-serif;
}
@wrumsby
wrumsby / url
Created July 3, 2013 01:00
YUI Combo URL from Flickr.com
http://l.yimg.com/g/combo/1/3.7.3?cookie/cookie-min.js&oop/oop-min.js&attribute-core/attribute-core-min.js&base-core/base-core-min.js&event-custom-base/event-custom-base-min.js&event-custom-complex/event-custom-complex-min.js&attribute-events/attribute-events-min.js&attribute-extras/attribute-extras-min.js&attribute-base/attribute-base-min.js&attribute-complex/attribute-complex-min.js&base-base/base-base-min.js&dom-core/dom-core-min.js&dom-base/dom-base-min.js&dom-style/dom-style-min.js&selector-native/selector-native-min.js&selector/selector-min.js&node-core/node-core-min.js&node-base/node-base-min.js&event-base/event-base-min.js&node-style/node-style-min.js&anim-base/anim-base-min.js&anim-color/anim-color-min.js&dom-screen/dom-screen-min.js&node-screen/node-screen-min.js&anim-xy/anim-xy-min.js&anim-curve/anim-curve-min.js&anim-easing/anim-easing-min.js&pluginhost-base/pluginhost-base-min.js&pluginhost-config/pluginhost-config-min.js&node-pluginhost/node-pluginhost-min.js&anim-node-plugin/anim-node-plugin-mi
@wrumsby
wrumsby / app.js
Created July 3, 2013 00:56
Using a YUI module
YUI().use('json-stringify', function (Y) {
'use strict';
var stringified,
parsed;
stringified = Y.JSON.stringify({
'a': 'A',
'b': 'B'
});
@wrumsby
wrumsby / index.html
Last active December 19, 2015 05:59
Using an ExtJS class
<!DOCTYPE html>
<html>
<head>
<title>Using modules</title>
<script src="http://cdn.sencha.com/ext/gpl/4.2.0/ext-all.js"></script>
<script>
Ext.Loader.setPath('My', './js/');
</script>
</head>
<body>
@wrumsby
wrumsby / index.html
Created July 2, 2013 09:13
Using an ExtJS class
<!DOCTYPE html>
<html>
<head>
<title>Using modules</title>
<script src="http://cdn.sencha.com/ext/gpl/4.2.0/ext-all.js"></script>
<script>
Ext.Loader.setPath('My', './js/');
</script>
</head>
<body>
@wrumsby
wrumsby / bolderiser.js
Created July 2, 2013 09:09
ExtJS class definition
Ext.define('My.Bolderiser', {
requires: ['Ext.Element'],
embolden: function (el) {
var element = Ext.get(el);
element.setStyle('font-weight', 'bold');
}
});
@wrumsby
wrumsby / index.html
Created July 2, 2013 08:54
Using an AMD module
<!DOCTYPE html>
<html>
<head>
<title>Using modules</title>
<script src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.6/require.min.js"></script>
<script src="require_config.js"></script>
</head>
<body>
<p id="element">This is just some text.</p>
<script>
@wrumsby
wrumsby / require_config.js
Last active December 19, 2015 05:59
Configuring AMD Loader
require.config({
baseUrl: './js',
packages: [
{
name: 'jquery',
location: 'http://code.jquery.com/',
main: 'jquery-2.0.0.min.js'
}
]