As I learn about Docker and put together some things, I want to capture things in a place I can easily find later.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function topLevel() { | |
{ | |
{ | |
{ | |
{ | |
{ | |
{ | |
{ | |
// Pretty | |
} |
I hereby claim:
- I am brianarn on github.
- I am brianarn (https://keybase.io/brianarn) on keybase.
- I have a public key whose fingerprint is D9E1 393A 2377 36EC 5BE5 6361 2662 4B1A 2AF3 B2AA
To claim this, I am signing this object:
I attended this event and the talk was pretty great! Based on the talk and a little poking at documentation / Stack Overflow, I was able to easily put together this cube of cubes.
A Pen by Brian Arnold on CodePen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A simple object with some methods, | |
// which throw errors when bad arguments are passed. | |
var maths = { | |
square : function (value) { | |
// Validity checking | |
if (arguments.length !== 1) { | |
throw new Error('square: Requires one and only one argument'); | |
} | |
if (typeof value !== 'number') { | |
throw new Error('square: Requires numeric argument'); |
Friends! Have you ever been developing, littered your code with console statements, and then realized you couldn't find what you were looking for? Have you ever wondered, "How can I make this console.log
statement stand out in a crowd?"
WONDER NO MORE!
You can provide a special %c
prefix to your logged string, and then all magical and printf-like, you can then provide some CSS to style up that line!
Here's a couple of examples that I was JUST using!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snip thousands of file names> | |
Transmitting file data ......................................................... | |
................................................................................ | |
................................................................................ | |
................................................................................ | |
................................................................................ | |
................................................................................ | |
................................................................................ | |
................................................................................ | |
................................................................................ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([ | |
"dojo/_base/declare", | |
"dojo/store/JsonRest", | |
"dojo/store/util/QueryResults" | |
], function(declare, JsonRest, QueryResults){ | |
return declare(JsonRest, { | |
query: function(query, queryOptions){ | |
// Issue original query | |
var results = this.inherited(arguments); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(function () { | |
// summary: | |
// A dojo loader plugin for loading esri modules so that | |
// they get ignored by the build system. | |
return { | |
load: function (id, require, callback) { | |
// id: String | |
// esri module id | |
// require: Function | |
// AMD require; usually a context-sensitive require bound to the module making the plugin request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
document.write('<iframe src="http://www.yourwebsite.com/path/embed.html" width="100%" border="0" frameBorder="0" style="border:0;" id="the-embed-id"><' + '/iframe>'); | |
var the_iframe = document.getElementById('the-embed-id'), | |
offsetWidth = the_iframe.offsetWidth, newHeight = '60px'; | |
if (offsetWidth < 300) { | |
newHeight = '600px'; | |
} else if (offsetWidth < 400) { | |
newHeight = '300px'; | |
} else if (offsetWidth < 600) { |