Skip to content

Instantly share code, notes, and snippets.

@xentac
xentac / README
Last active October 1, 2018 18:57
Authentication with aggressive web worker caching
When mixing cookie-based out-of-application authentication and a websocket
application that attempts to hijack all attempts at authentication, one needs to
pick ones battles. Sometimes allowing unauthenticated access is the only way to
do certain things.
Take, for example,
https://github.com/home-assistant/home-assistant-polymer/issues/110 and
https://github.com/home-assistant/home-assistant/issues/6184. The entire site is
driven by a webworker that caches all urls
(https://github.com/home-assistant/home-assistant-polymer/blob/3701683d4b4ab2bd0ceb4ab78

Keybase proof

I hereby claim:

  • I am xentac on github.
  • I am xentac (https://keybase.io/xentac) on keybase.
  • I have a public key whose fingerprint is 7D26 B97B 2A74 A901 B784 43FA F738 E795 9900 EED9

To claim this, I am signing this object:

@xentac
xentac / gist:1212605
Created September 12, 2011 22:08
riak-js test server output
Exec: /opt/riak/erts-5.8.1/bin/erlexec -boot /opt/riak/releases/0.14.2/riak -embedded -config /home/jchu/coding/riak-js/.testing/etc/app.config -args_file /home/jchu/coding/riak-js/.testing/etc/vm.args -- console
Root: /opt/riak
Erlang R14B (erts-5.8.1) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:64] [hipe] [kernel-poll:true]
=INFO REPORT==== 12-Sep-2011::15:06:38 ===
alarm_handler: {set,{system_memory_high_watermark,[]}}
=INFO REPORT==== 12-Sep-2011::15:06:38 ===
alarm_handler: {set,{{disk_almost_full,"/"},[]}}
@Xentac's Custom Quix Commands
rl javascript:((function(){window.baseUrl='https://www.readability.com';window.readabilityToken='5B5ewu9R5FvYrDSmd6rfSXsLUFKe5AjGfNZnYD7M';var%20s=document.createElement('script');s.setAttribute('type','text/javascript');s.setAttribute('charset','UTF-8');s.setAttribute('src',baseUrl+'/bookmarklet/save.js');document.documentElement.appendChild(s);})()) Read Later with Readability
rtm javascript:(function(){h='m.rememberthemilk.com';p='/add';if(window.getSelection){t=window.getSelection();}else%20if(document.getSelection){t=document.getSelection();}else%20if(document.selection){t=document.selection.createRange().text;};%20cp='http://'+h+p+'?name='+t+'&url='+location.href;%20w=window.open(cp,'addwindow','status=no,toolbar=no,width=200,height=560,resizable=yes');%20setTimeout(function(){w.focus();},%20500);})(); Add to Remember The Milk
mob javascript:function%20iptxt(){var%20d=document;try{if(!d.body)throw(0);window.location='http://www.instapaper.com/text?u='+encodeURIComponent(