Skip to content

Instantly share code, notes, and snippets.

View house.bf
; loop memory layout:
; 0 0 | lf sp \ _ / n 2nmi 2nmi 0 4i 4i
[-]
; set up characters
++++++[->++++>+>+>+<<<<]>-
[->+++++>>+>++++>++++>++<<<<<<]>
+++>++++>+++>>+++>+
>
View index.html
<div id="app">
<div id="header">
<img src="https://esamarathon.com/static/img/logos/logo-borderless.svg" id="logo"></img>
<h1>European<br>Speedrunner<br>Assembly</h1>
</div>
<div id="body">
<h3>Hey {{data.user.connections.twitch.displayName}}!</h3>
{{data.message}}
</div>
<div id="footer">
View font-example.css
.chat-wrapper {
font-size: 10pt;
font-family: 'Sitka Text';
}
View blank-pen-external-js-css.markdown
View index.js
var express = require("express");
var app = express();
var server = require('http').Server(app);
server.listen(9003);
app.get("*", function(req, res, next) {
var url = req.path.substr(1);
if(url.startsWith("https://cdn.frankerfacez.com/emoticon/") || url.startsWith("https://cdn.betterttv.net/emote/")) {
console.log("Getting url "+req.path);
require('request').get(url).pipe(res);
View index.js
var express = require("express");
var app = express();
var server = require('http').Server(app);
server.listen(9003);
app.get("*", function(req, res, next) {
console.log("Getting url "+req.path);
require('request').get("https://cdn.betterttv.net/emote"+req.path).pipe(res);
});
View ircbot.js
var net = require('net');
var events = require('events');
var rx = /^(?:@([^ ]+) )?(?:[:](\S+) )?(\S+)(?: (?!:)(.+?))?(?: [:](.+))?$/;
var rx2 = /([^=;]+)=([^;]*)/g;
var rx3 = /\r\n|\r|\n/;
var STATE_V3 = 1
var STATE_PREFIX = 2
var STATE_COMMAND = 3
var STATE_PARAM = 4
View IRCParser.py
STATE_V3 = 1
STATE_PREFIX = 2
STATE_COMMAND = 3
STATE_PARAM = 4
STATE_TRAILING = 5
def parseIRCMessage(message):
parts = message.split(" ")
state = 0
data = [message,"","","",[],""]