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
GEM | |
remote: https://rubygems.org/ | |
specs: | |
colorator (1.1.0) | |
ffi (1.9.14) | |
foreman (0.78.0) | |
thor (~> 0.19.1) | |
forwardable-extended (2.6.0) | |
jekyll (3.2.1) | |
colorator (~> 1.0) |
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
// Returns array of objects containing the character it found, and it's hexidecimal string value. | |
function findUnicodeChars(str) { | |
var arr = str.split(''); | |
return arr.filter(char => { | |
return (char.charCodeAt(0) > 255) && char; | |
}).map(char => { | |
return { | |
char: char, | |
code: char.charCodeAt(0).toString(16) | |
}; |
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
if (!String.prototype.reverse) { | |
String.prototype.reverse = function reverse() { | |
if (typeof this !== 'string') { | |
this.split('').reverse().join(''); | |
} else { | |
throw new ReferenceError(this); | |
} | |
} | |
} |
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
<div class="twitter-logo"> | |
<span class="head">Welcome to Twitter.</span> | |
<span class="beak-top">Find out what’s happening,</span> | |
<span class="beak-bottom">right now,</span> | |
<span class="wing-top">with the people</span> | |
<span class="wing-middle">and organizations</span> | |
<span class="wing-bottom">you care about.</span> | |
<span class="body">Logo remade by <a href="//jonweb.co.uk">Jonathan Cousins (@evolutionxbox)</a></span> | |
</div> | |
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
var MyElement = new function MyElement() { | |
var obj = Object.create(HTMLElement.prototype); | |
var self = { | |
createdCallback: function createdCallback() { | |
console.log('createdCallback', this); | |
}, | |
attachedCallback: function attachedCallback() { | |
console.log('attachedCallback', this); | |
}, |
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
// Font Loaded | |
(function fontLoaded() { | |
var retries = 300; | |
function checkReady() { | |
var canvas, | |
context; | |
retries -= 1; | |
canvas = document.createElement('canvas'); | |
canvas.width = 20; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Object Composition</title> | |
</head> | |
<body> | |
<h1> | |
<a class="first" href="#">First</a> | |
<a class="second" href="#">Second</a> |
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
var rgb = (function(red, blue, green) { | |
return { | |
red: red, | |
blue: blue, | |
green: green | |
}; | |
}); | |
var rgb1 = rgb(0, 0, 0); // colour to use | |
var rgb2 = rgb(255, 255, 255); // background colour |
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
var Counter = (function counter(i) { | |
increment = function increment() { | |
++i; | |
}; | |
decrement = function decrement() { | |
--i; | |
}; |