Skip to content

Instantly share code, notes, and snippets.

@oldmud0
oldmud0 / gh-pages-old.md
Created May 1, 2018 22:16
Old GitHub Pages IP addresses for A records

On May 1, 2018, GitHub changed the suggested IP addresses to put on the A records for domains that use GitHub Pages. The new ones now support HTTPS for custom domains, but the old ones did not. Here are the old ones for historical purposes:

  • 192.30.252.153
  • 192.30.252.154

Here are the new ones:

  • 185.199.108.153
  • 185.199.109.153
  • 185.199.110.153
@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]
@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 / aseprite-build.md
Last active February 7, 2022 16:31
Aseprite 1.1.6 Windows Build

Aseprite 1.1.6 Windows Build

This is an unofficial build done in a Windows 7 x64 machine using Visual Studio 2015. The build includes debugging symbols in case you want them, but they are not necessary to run Aseprite.

Building Aseprite is not an easy task if it is your first time doing it. It took me a few hours to make this build and a couple start-overs before realizing that TDM-GCC/MinGW binaries in the path can conflict with CMake since it will favor TDM-GCC/MinGW over Visual Studio build tools. Just follow the instructions, and you won't have to get tangled in a mess.

If you can afford it, please support David Capello by buying Aseprite for $15. Otherwise, stay hungry, stay foolish, and thank you for choosing the world's best open-source sprite editor.

Download:

@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 / 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 / music2yaml.py
Last active September 6, 2019 07:38
Extracts songs from the AO2 music folder into a YAML file for tsuserver3
"""
Extracts songs from the AO2 music folder into a yaml file for tsuserver3.
This script will look through the music files present in the given music folder
and add/update the respective song lengths in the music.yaml. It will preserve
the category and positioning of existing tracks, while new tracks are added
to the "Uncategorized" category.
You can also create a fresh music.yaml with this script.
# Ever wonder what all those optional updates are? There's an easy way to find out.
# Step 1: Go to Control Panel > Windows Update > Show optional updates.
# Step 2: Select all the updates you want to find the title of, then copy the update details.
# Step 3: Remove all the cruft and only leave the links.
# Step 4: Replace http with https and /kb/xxx with /api/content/kb/xxx.
# Step 5: Save the list of links.
# Step 6: Open up an MSYS shell and do the following (replace the .txt files with your own):
# (note: this will require curl and perl)
while read fn; do curl $fn -Lso - | perl -l -0777 -ne 'print $1 if /<h1.*?title=\"(.*?)\".*?>.*?/si'; done < '/r/updates.txt' > /r/updates_new.txt
@oldmud0
oldmud0 / aorules.md
Last active July 12, 2017 00:42
Attorney Online Discord Rules

New general rules:

  • Apply common sense, if you have any.
  • Keep trolling contained. This means when there is a serious conversation going on, you keep it serious.
  • Criticism must be constructive, except in dire cases of irony.
  • No spamming, except in #spam.
  • No excess memery or dead, unfunny memes except in #memes.
  • No NSFW content in any channel, except for role-playing in #nsfw-erp.
  • No stalking, harassment, or excess profanity.