Skip to content

Instantly share code, notes, and snippets.

binmode STDOUT, ":utf8";
{
my @r = ("\x{2080}", "\x{2081}","\x{2082}", "\x{2083}", "\x{2084}", "\x{2085}", "\x{2086}", "\x{2087}", "\x{2088}", "\x{2089}");
sub sscript {
my $num = shift // $_;
my $ret = "";
$num =~ s/(\d)/$r[$1]/g;
return $num;
}}
var EventSourceWrapper = (function() {
"use strict;"
var Class = function (url) {
var that = this;
that.ws = undefined;
that.connected = false;
that.reconnect = 3 *1000;
that.log = undefined;
module.exports = {
die: function(err) {
let e = new Error();
let frame = e.stack.split("\n")[2];
let arr = frame.split(" ");
// let functionName = arr[5];
let where = arr[6].split(/[:()]/);
let fileName = where[1];
let lineNumber = where[2];
throw (err || "Died").toString().replace(/\w+:\s*/g, '') +" at "+ fileName +" line "+ lineNumber +".";

Keybase proof

I hereby claim:

  • I am mpapec on github.
  • I am mpapec (https://keybase.io/mpapec) on keybase.
  • I have a public key ASB6lo_QxTyVluBbOK1OxGOj_hb_7m31kMrjMp-8jPKrmgo

To claim this, I am signing this object: