Skip to content

Instantly share code, notes, and snippets.

@FesterCluck
FesterCluck / sw.js
Created Aug 16, 2017
serviceworker logger
View sw.js
self.addEventListener('install', event => {
event.waitUntil(self.skipWaiting());
});
self.addEventListener('activate', event => {
event.waitUntil(self.clients.claim());
});
self.addEventListener('fetch', event => {
console.log(event.request); event.respondWith(fetch(event.request));
@FesterCluck
FesterCluck / gist:022a229615a4a348c361
Created Dec 13, 2014
Local Web Server + Proxy Relay
View gist:022a229615a4a348c361
var sys = require("sys"),
http = require('http'),
path = require("path"),
url = require("url"),
filesys = require("fs");
http.createServer(function(request, response) {
var my_path = url.parse(request.url).pathname;
var full_path = path.join(process.cwd(),my_path);
View keybase.md

Keybase proof

I hereby claim:

  • I am festercluck on github.
  • I am festercluck (https://keybase.io/festercluck) on keybase.
  • I have a public key whose fingerprint is 2951 3E9C A7B8 21A0 0538 A40C DCC7 C2A0 149B 4335

To claim this, I am signing this object:

@FesterCluck
FesterCluck / jQuery Tabbable Optimize
Last active Aug 29, 2015
Looking to optimize disableTabbing, enableTabbing, and jQuery.expr.filters.hidden
View jQuery Tabbable Optimize
/*!
* jQuery.tabbable 1.0 - Simple utility for selecting the next / previous ':tabbable' element.
* https://github.com/marklagendijk/jQuery.tabbable
*
* Includes ':tabbable' and ':focusable' selectors from jQuery UI Core
*
* Copyright 2013, Mark Lagendijk
* Released under the MIT license
*
*/
View gist:10017298
function extend(dst) {
var h = dst.$$hashKey;
forEach(arguments, function(obj){
if (obj !== dst) {
forEach(obj, function(value, key){
dst[key] = value;
});
}
});
View gist:8491391
<div id="ui-view" class="container" ui-view>
<h1 class="ng-scope ng-binding">Home! {{$id}}</h1>
<div ui-view="status" class="ng-scope">
<h1 class="ng-scope">Status Template</h1>
</div>
<div ui-view="content" class="ng-scope">
<h1 class="ng-scope">Content Template</h1>
</div>
<h4 class="ng-scope">Inside the {{title}} Controller!</h4>
</div>