This file contains 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
// modals | |
$('a[rel*=modal]').click(function(){ | |
if (window.innerWidth > 960){ | |
$.get( $(this).attr('href') ).done(function( html ) { | |
var $h = $(html); | |
$h.find('#content').prepend('<a class="xhr_close">×</a>'); | |
$h.simpleModal().trigger("show"); | |
$('.xhr_close', $h).click(function(){ | |
$h.trigger("hide"); |
This file contains 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
// modals | |
$('a[rel*=modal]').click(function(){ | |
if (window.innerWidth > 960){ | |
$.get( $(this).attr('href') ).done(function( html ) { | |
var $h = $(html); | |
$h.find('#content').prepend('<a class="xhr_close">×</a>'); | |
$h.simpleModal().trigger("show"); | |
$('.xhr_close', $h).click(function(){ | |
$h.trigger("hide"); |
This file contains 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
node --harmony test.js | |
GET, gen | |
GET, oh | |
GET, cool |
This file contains 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
javascript:Array.prototype.slice.call(document.querySelectorAll('.quiz_answer')).forEach(function(i){if (i.attributes['rel:correct'].value==="1"){i.click();}}) |
This file contains 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
Array.prototype.slice.call( | |
document.querySelectorAll('.quiz_answer') | |
).forEach(function(i){ | |
if (i.attributes['rel:personality_index'].value === "1"){ | |
i.click(); | |
} | |
}); |
This file contains 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(){ | |
var World = Model({ | |
init:function(){ | |
var world = this; | |
world.canvas = document.getElementsByTagName('canvas')[0]; | |
world.engine = new BABYLON.Engine(world.canvas, true); | |
window.addEventListener("resize", function(){ world.engine.resize(); }); | |
world.engine.runRenderLoop(function(){ if (world.scene){ world.scene.render(); } }); | |
} | |
}); |
This file contains 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(){ | |
var canvas = document.getElementsByTagName('canvas')[0]; | |
var engine = new BABYLON.Engine(canvas, true); | |
var scene = new BABYLON.Scene(engine); | |
var camera = new BABYLON.ArcRotateCamera("Camera", 1, 0.8, 10, new BABYLON.Vector3(0, 0, 0), scene); | |
var light0 = new BABYLON.PointLight("Omni", new BABYLON.Vector3(0, 0, 10), scene); | |
var origin = BABYLON.Mesh.CreateSphere("origin", 10, 1.0, scene); | |
scene.activeCamera.attachControl(canvas); |
This file contains 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 Pirate = Model({ // simple class creator | |
likes: "GROG", // instance properties | |
init: function(name){ // init is the main entrance | |
this.name = name; // options can be passed | |
this.grogs = 0; | |
console.log("I am a pirate!"); | |
}, | |
drink: function(){ // instance method | |
if (++this.grogs >= 100){ | |
this.trigger("drunk"); // trigger an event |
This file contains 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
.slider { | |
border-radius: 15px; | |
position:relative; | |
background: #ccc; | |
height: 200px; | |
width: 20px; | |
} | |
.handle { | |
background: #eee; |
This file contains 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
{ | |
"_id": "5265e9af449934ed45e7fd6a", | |
"title": "Little Girl (Feat. Julian Casablancas)", | |
"tracks": [{ | |
"foreign_release_id": "rdio-US:release:a299677", | |
"catalog": "rdio-US", | |
"foreign_id": "rdio-US:track:t3705747", | |
"id": "TRJBKTZ136E8CD69BE", | |
"info": { | |
"baseIcon": "album/d/9/2/000000000004929d/2/square-200.jpg", |