Skip to content

Instantly share code, notes, and snippets.

@oldmud0
oldmud0 / client.js
Created July 8, 2018 04:08
node-ipc example with high client->server reliability (no dropped messages)
const ipc = require("node-ipc");
const async = require("async");
const queue = async.queue((data, cb) => {
// There is no way of checking if client is connected so just
// catch and put it back in the queue if a bad happens.
try {
ipc.of.test.emit("message", data);
} catch (err) {
console.error(err);
@oldmud0
oldmud0 / ao2-rite-of-passage.md
Last active February 5, 2021 23:37
The AO2 Rite of Passage

THE AO2 RITE OF PASSAGE

For epochs, the secrets of how to correctly compile AO2 was buried in the mind of its creator. After over 12 painstaking hours experimenting, compiling, and pacing around my room aimlessly, I succeeded the rite of passage, and I, too, gained the power to compile AO2 into a single executable of less than 10 MB in size.

I shared this power with great care. But as my involvement in AO2 dwindles and the community yearns for their own clients and their own features, and I look through ZIP files in disgust as dozens of DLLs are strewn all over, I have decided to divulge the secrets of how to compile AO2 statically.

With this powerful guide, you can complete the AO2 rite of passage in three hours or less.

Dependencies

@oldmud0
oldmud0 / widgetdumper.cpp
Last active December 21, 2020 04:21 — forked from pjwhams/qtdumper.cpp
Dump size and position of Qt QWidgets and QLayouts
#include "widgetdumper.h"
#include <sstream>
#include <string>
#include <iostream>
#include <stdio.h>
#include <QtWidgets/QLayout>
#include <QtWidgets/QWidget>
#if _MSC_VER
@oldmud0
oldmud0 / foobar.md
Created June 10, 2021 02:07
Google Foobar API v1

Base URL: https://foobar.withgoogle.com/api/v1

Supports HTTP/3. Server name is "Google Frontend." You will need a sessionid and SACSID cookie.

All POST requests use form data.

POST /commands/save

request

@oldmud0
oldmud0 / binlookup.md
Created June 4, 2022 15:36
NIC BIN lookup API

BIN lookup api

$ http post https://securecheckout.cdc.nicusa.com/Checkout/Payment/BinLookup prefix="5149"
HTTP/1.1 200 OK
Cache-Control: private,no-cache, no-store, must-revalidate 
Content-Length: 303
Content-Type: application/json; charset=utf-8
Date: [redacted]