This list will hopefully shrink faster than it can grow. (yeah, right)
jQuery deparam / deparam+ / sortObject (WIP)
https://gist.github.com/1025817
jQuery infiniteScroller (WIP)
jQuery scrollinout event
// First, let's define a widget/plugin called "foo" | |
// Either using jQuery's $.fn plugin namespace, for simple stateless plugins... | |
$.fn.foo = function(){ | |
// In this scope, this refers to the element on which the plugin foo() was called | |
// manipulate it and return this at the end, so it can be chainable | |
}; |
# npm publish with goodies | |
# prerequisite: `npm install -g trash` | |
# `np` with an optional argument `patch`/`minor`/`major`/`<version>` | |
# defaults to `patch` | |
np() { | |
trash node_modules &>/dev/null; | |
git pull --rebase && | |
npm install && | |
npm test && | |
npm version ${1:-patch} && |
// Idea and some code stemming from https://michaljanaszek.com/blog/test-website-performance-with-puppeteer#cacheAndServiceWorker | |
const puppeteer = require('puppeteer'); | |
const devices = require('puppeteer/DeviceDescriptors'); | |
const {URL} = require('url'); | |
var fs = require('fs'); | |
var sw_scope; | |
let NETWORK_PRESETS = { | |
'GPRS': { | |
'offline': false, |
/** | |
* Note that this script is intended to be included at the *end* of the document, before </body> | |
*/ | |
(function (window, document) { | |
if ('open' in document.createElement('details')) return; | |
// made global by myself to be reused elsewhere | |
var addEvent = (function () { | |
if (document.addEventListener) { | |
return function (el, type, fn) { |
(function( jQuery ) { | |
var getScript = jQuery.getScript; | |
jQuery.getScript = function( resources, callback ) { | |
var // reference declaration & localization | |
length = resources.length, | |
handler = function() { counter++; }, | |
deferreds = [], |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2012 Sindre Sorhus <http://sindresorhus.com> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Video recording demo</title> | |
<link rel="stylesheet" type="text/css" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css"> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body> | |
<div class="container"> |
http://blog.new-bamboo.co.uk/2010/1/26/why-your-javascript-apps-need-more-structure | |
http://blog.new-bamboo.co.uk/2010/2/4/let-them-eat-state | |
http://blog.new-bamboo.co.uk/2010/3/7/the-js-model-layer | |
http://blog.new-bamboo.co.uk/2010/2/8/rendering-views-in-javascript | |
Controllers: | |
http://code.quirkey.com/sammy/ - Sammy is a tiny javascript framework built on top of jQuery. It’s RESTful Evented JavaScript. |
// Source: http://www.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/platform/ColorData.gperf&exact_package=chromium&type=cs | |
// There's also an RGB one defined here: http://www.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/inspector/front-end/Color.js&exact_package=chromium&q=indianred&l=393 | |
var CSS_NAMED_COLORS = { | |
aliceblue: "#f0f8ff", | |
antiquewhite: "#faebd7", | |
aqua: "#00ffff", | |
aquamarine: "#7fffd4", | |
azure: "#f0ffff", | |
beige: "#f5f5dc", |
This list will hopefully shrink faster than it can grow. (yeah, right)
jQuery deparam / deparam+ / sortObject (WIP)
https://gist.github.com/1025817
jQuery infiniteScroller (WIP)
jQuery scrollinout event