Skip to content

Instantly share code, notes, and snippets.

@Kurty00
Kurty00 / words_for_ipv6.js
Created August 22, 2022 08:56
Node script that finds words you could use in IPv6 addresses.
var fs = require("fs")
var file = fs.readFileSync("words_alpha.txt", { encoding: "utf-8" }).split("\r\n");
var out = [];
var allowedCharacters = ['a', 'b', 'c', 'd', 'e', 'f', 't', 's', 'g', 'i', 'o']
for (let line of file) {
var o = "";
for (var c of line) {
if (allowedCharacters.includes(c.toLowerCase())) {
if (c.match(/[tsgio]/g))
@Kurty00
Kurty00 / download mastodon instance emoji.js
Last active April 16, 2023 19:41
Downloads Mastodon Emoji
getEmoji("fedi.fun");
function loadJSON(url, callback) {
var xhr = new XMLHttpRequest();
xhr.overrideMimeType("application/json");
xhr.open("GET", url, true);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
callback(xhr.responseText);
}