Skip to content

Instantly share code, notes, and snippets.

View LinuxRocks2000's full-sized avatar
programming MMOSG and building Sitix


programming MMOSG and building Sitix
View GitHub Profile
View miniconsole.js
// Mini keyboard-activated console for Javascript
// Unobtrusive, comes with it's own CSS, appends to the html Body element. Configurable - change the password to whatever you want.
// Add new [method]s with miniConsole.methodTable[name] = your_function
// Made by Tyler Clarke circa 2022 A.D - use it however you want, but I'd be very disappointed if you avoided accrediting it ;)
let miniConsole = {
consoleEl: undefined,
password: "opensesame",
lock: "",
showed: false,
LinuxRocks2000 / httpserver.hpp
Last active January 14, 2022 16:10
One-file threaded HTTP server in C++ with support for callbacks. Updated as I need it, so eventually will be state aware and etc.
View httpserver.hpp
// Socket includes
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <cstring>
#include <fcntl.h>
// STD includes
#include <thread>
#include <string>