Instantly share code, notes, and snippets.

View fi-k8s-workshop-test-server.js
const http = require('http');
const requestHandler = (req, res) => {
const { remoteAddress, remotePort } = req.socket;
console.log(`Got a request from ${remoteAddress}:${remotePort}`);
res.end('Hello');
};
const server = http.createServer(requestHandler);
View untrusted-lvl17-solution.js
/***************
* pointers.js *
***************
*
* You! How are you still alive?
*
* Well, no matter. Good luck getting through this
* maze of rooms - you'll never see me or the Algorithm again!
*/
View untrusted-lvl13-solution.js
/*
* robotMaze.js
*
* The blue key is inside a labyrinth, and extracting
* it will not be easy.
*
* It's a good thing that you're a AI expert, or
* we would have to leave empty-handed.
*/
View test.js
Twig = require('./twig');
var context = {};
// Context is big
for (var i=0; i<500; i++) {
context[''+i] = i;
}
// List of countries
var countries = context.countries = {};
View onchange.sh
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of