Skip to content

Instantly share code, notes, and snippets.

2017-06-27T08:17:13.468857074Z app[web.1]: Invalid memory access (signal 11) at address 0x0
2017-06-27T08:17:13.470053308Z app[web.1]: [0x6363d5] *CallStack::print_backtrace:Int32 +117
2017-06-27T08:17:13.470384157Z app[web.1]: [0x5f2ecd] __crystal_sigfault_handler +61
2017-06-27T08:17:13.471176757Z app[web.1]: [0xd2d9b4] sigfault_handler +40
2017-06-27T08:17:13.471234670Z app[web.1]: [0x7f44602c3340] ???
2017-06-27T08:17:13.471644884Z app[web.1]: [0x7f4460bd5dd9] ???
2017-06-27T08:17:13.471718207Z app[web.1]: [0x7f4460bd6a63] ???
2017-06-27T08:17:13.472143543Z app[web.1]: [0x7f4460bd6bc9] ???
2017-06-27T08:17:13.472553163Z app[web.1]: [0x7f4460bd8931] ???
2017-06-27T08:17:13.472859127Z app[web.1]: [0xa98316] *OpenSSL::SSL::Socket::Client#initialize<TCPSocket, OpenSSL::SSL::Context::Client, Bool, String>:Nil +182
execve("/app/.heroku/node/bin/node", ["node", "script.js"], [/* 39 vars */]) = 0
brk(0) = 0x417b000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ffa01618000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=43013, ...}) = 0
mmap(NULL, 43013, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffa0160d000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
function fixhtml(html) {
var div, dom, hasBlockChild, needWrapping, textOrInlineChildren, treeWalker;
dom = document.createElement('div');
html = html.replace(/\s+/g, " ").replace(/> </g, "><"); // removes white space
while (html.match(/<(h[1-5]|p|strong|div|u|em|a|bi) ?[^>]*>\s?<\/\1>/g)) {
html = html.replace(/<(h[1-5]|p|strong|div|u|em|a|b|i) ?[^>]*>\s?<\/\1>/g, ""); //removes empty tags recursively, except iframes
}
dom.innerHTML = html;
Array.from(dom.querySelectorAll("h1 h1")).forEach(function(node) {
return node.outerHTML = node.innerHTML; //unwrap nested h1's