Skip to content

Instantly share code, notes, and snippets.

@sambol
sambol / gist:4467755
Last active December 10, 2015 17:28
AE chat log taker bookmarklet
javascript:(function(){(function(){var i=document.createElement("iframe");var uniqueString="dewe";document.body.appendChild(i);i.style.display="none";i.contentWindow.name=uniqueString;var f=document.createElement("form");f.target=uniqueString;f.action="http://bolli.org.uk/aechatlogviewer/upload.php";f.method="POST";var l=document.createElement("input");l.type="hidden";l.name="input";l.value=document.getElementById("messages-display").innerHTML;f.appendChild(l);var u=document.createElement("input");u.type="hidden";u.name="user";u.value=userName;f.appendChild(u);var n=document.createElement("input");n.type="hidden";n.name="fname";n.value=prompt("Filename");f.appendChild(n);document.body.appendChild(f);f.submit();}())})();
Highlight above line and copy to bookmark bar. Then enter AE chat and click bookmark :)
/* Choose between front, middle and back parts */
switch(FEAT_TRAINS, SELF, sw_coradia3_graphics, position_in_consist % 3) {
0: coradia3_end_one;
1: coradia3_midcar;
coradia3_end_two;
}
@sambol
sambol / break.js
Created September 27, 2012 11:42
Repeatedly crashing node file for testing forever
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end(error);
}).listen(10002);
console.log("server restart");