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(){function t(){$("head").append("<style>"+i+"</style>"),$("body").addClass("blobbs"),$("body").append('<div class="trippy"/>')}var e=[38,38,40,40,37,39,37,39,66,65],o=0,i=".blobbs{background-size:66px 66px;background-color:#00a9ff;background-image:repeating-radial-gradient(hsla(200,100%,80%,.8) 0,hsla(200,100%,80%,.5) 4px,hsla(200,100%,80%,0) 50px),repeating-radial-gradient(hsla(260,100%,0%,0) 0,hsla(260,100%,50%,.1) 2px,hsla(260,100%,0%,0) 10px)}.blobbs:hover{animation:blobbs-position 6s cubic-bezier(.4,0,.2,1) infinite,blobbs-size .75s cubic-bezier(.4,0,.2,1) infinite alternate}@keyframes blobbs-position{0%,100%{background-position:left top,left top}25%{background-position:right top,left bottom}50%{background-position:right bottom,right bottom}75%{background-position:left bottom,right top}}@keyframes blobbs-size{from{background-size:200px 200px,200px 200px}to{background-size:66px 66px,66px 66px}}.trippy{position:fixed;z-index:99999;top:0;left:0;right:0;bottom:0;background:rgba(255,0,0,.5);animati |
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
// So let's say you have an async operation that doesn't | |
// use a jQuery-ajax method. In my example, I'll use a call | |
// to the FB API, which just takes a callback function | |
// which gets called with a ```resp``` object. | |
FB.api('/platform', function(resp) { | |
if (resp.data) { | |
success(); | |
} else if (resp.error) { | |
error(); |
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
// Uses Hammer-jquery | https://github.com/EightMedia/hammer.js/blob/master/dist/jquery.hammer.js | |
$.extend(ko.bindingHandlers, { | |
touchEvent: { | |
defaults: {}, | |
init: function(el, valueAccessor, allBindingsAccessor) { | |
var self = ko.bindingHandlers.touchEvent, | |
events = ko.utils.unwrapObservable(valueAccessor()), | |
allOptions = allBindingsAccessor(), | |
opts = allOptions.touchEventOptions ? allOptions.touchEventOptions : {}; |
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 Memcache = function(hash) { | |
var self = this, | |
this.lookupCache = [], | |
this.valueCache = []; | |
$.map(hash, function(val, key) { | |
self.lookupCache.push(key); | |
self.valueCache.push(val); |
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
module.exports = function(grunt) { | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-contrib-compass'); | |
grunt.loadNpmTasks('grunt-contrib-concat'); | |
grunt.loadNpmTasks('grunt-contrib-copy'); | |
grunt.loadNpmTasks('grunt-contrib-clean'); | |
grunt.loadNpmTasks('grunt-contrib-mincss'); | |
grunt.loadNpmTasks('grunt-contrib-uglify'); |
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
<script> | |
(function($) { | |
var kkeys = [], konami = "38,38,40,40,37,39,37,39,66,65"; | |
$(document).keydown(function(e) { | |
kkeys.push(e.keyCode); | |
if (kkeys.toString().indexOf(konami) >= 0) { | |
$(document).unbind('keydown', arguments.callee); | |
$.getScript('http://www.cornify.com/js/cornify.js', function() { | |
cornify_add(); | |
$(document).keydown(cornify_add); |
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 els = $('#main-content').children().filter(function() { | |
var el = $(this); | |
return (el.is('h3') || el.is('h3 + ul')) ? true : false; | |
}) | |
var queue = [] | |
els.each(function() { | |
var el = $(this); | |
if (el.is('h3')) { | |
queue.push(el.text()); |
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
.ui-dialog-reset.ui-dialog { | |
padding: 0; | |
} | |
.ui-dialog-reset.ui-dialog .ui-dialog-titlebar, | |
.ui-dialog-reset.ui-dialog .ui-dialog-content, | |
.ui-dialog-reset.ui-dialog .ui-dialog-buttonpane, | |
.ui-dialog-reset.ui-dialog .ui-dialog-buttonpane button, | |
.ui-dialog-reset.ui-dialog .ui-button-text { | |
padding: 0; | |
margin: 0; |
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 __extend = new Extender(); | |
var Robot = function(robot) { | |
}; | |
__extend( Robot.prototype, { | |
onIdle: function(e) { | |
var robot = e.robot; |
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
class Coffee { | |
constructor() { | |
this.refill() | |
} | |
get empty() { | |
return this.level === 0; | |
} | |