Skip to content

Instantly share code, notes, and snippets.

View konsumer's full-sized avatar

David Konsumer konsumer

View GitHub Profile
// 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">&times;</a>');
$h.simpleModal().trigger("show");
$('.xhr_close', $h).click(function(){
$h.trigger("hide");
// 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">&times;</a>');
$h.simpleModal().trigger("show");
$('.xhr_close', $h).click(function(){
$h.trigger("hide");
node --harmony test.js
GET, gen
GET, oh
GET, cool
javascript:Array.prototype.slice.call(document.querySelectorAll('.quiz_answer')).forEach(function(i){if (i.attributes['rel:correct'].value==="1"){i.click();}})
Array.prototype.slice.call(
document.querySelectorAll('.quiz_answer')
).forEach(function(i){
if (i.attributes['rel:personality_index'].value === "1"){
i.click();
}
});
!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(); } });
}
});
!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);
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
.slider {
border-radius: 15px;
position:relative;
background: #ccc;
height: 200px;
width: 20px;
}
.handle {
background: #eee;
{
"_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",