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 textHolder = document.querySelector('.textHolder'); | |
var fullText = textHolder.innerText; | |
var snippet = fullText.slice(0, 1000) + "..."; | |
function createLink(quantity) { | |
var link = document.createElement("a"); | |
link['href'] = "#"; | |
link.className = quantity | |
link.innerText = "Read " + quantity; | |
textHolder.appendChild(link); |
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 waitTilLoad(){ | |
var editable = document.querySelector('.editable'); | |
var reset = document.querySelector('.reset'); | |
function blurring() { | |
localStorage.setItem('editedContent', this.innerHTML); | |
document.designMode = 'off'; | |
} | |
function focusing() { |
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
<html> | |
<head> | |
<style> | |
.arrow_wrap { | |
display: inline-block; | |
position: relative; | |
height: 54px; | |
width: 54px; | |
} |
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
<h3>Dramatic Chipmunk</h3> | |
<video controls preload width=400px height=300px> | |
<source src="dramatic_chipmunk.ogv" type="video/ogg"> | |
<source src="dramatic_chipmunk.mp4" type="video/mpeg"> | |
You do not have HTML5 Video support. | |
</video> | |
<h3>Inconceivable</h3> | |
<audio controls> | |
<source src="thatword.ogg" type="audio/ogg"> |
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
$ -> | |
boneyard = [] | |
boneBuilder = (a, b) -> # A set of dominos is contains every combination of possible with 6 - 0 | |
boneyard.push('_' + a + '_' + b) # This recursive function push the two parameters into the boneyard array | |
return boneyard if b is 0 # If the 'b' variable is zero the loop is broken and the array is returned | |
(a = b; b--) if a is 0 # If 'a' is zero the value of 'b' is reduced by 1 and 'a' is set to the value of 'b' | |
boneBuilder(a-1, b) # Each iteration the value of 'a' is reduced by 1 and the function is called again | |
draw = (n) -> # This function picks dominos from the boneyard array |
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
boneyard = [] | |
boneBuilder = (a,b) -> | |
boneyard.push('_' + a + '_' + b) | |
return boneyard if b is 0 | |
(a = b; b--) if a is 0 | |
boneBuilder(a-1,b) | |
draw = (n) -> | |
randomDraw = _.shuffle(boneyard).splice(0, n) | |
fabricate value for value in randomDraw |
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
<head> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<script src="js/lib/underscore.js"></script> | |
<script src="js/lib/simple-inheritance.js"></script> | |
<script src="js/lib/backbone.js"></script> | |
<script src="js/lib/jStorage.js"></script> | |
<style> | |
div.tile {height: 70px; width: 35px; border-radius: 7px; float: left; margin: 10px;} | |
div.tile, div.bar {border: 2px outset #444;} |
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
<head> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> | |
<style> | |
div.tile {height: 70px; width: 35px; border-radius: 7px; float: left; margin: 10px;} | |
div.tile, div.bar {border: 2px outset #444;} | |
div.pips {height: 30px; width: 35px;position: relative; margin-top: 2px;} | |
div.pips div {border-radius: 5px; height: 4px; width: 5px; background: #333; position: absolute; border:2px inset #444;} |