Skip to content

Instantly share code, notes, and snippets.

View NotNite's full-sized avatar
💜
let's build cuteware!

Julian NotNite

💜
let's build cuteware!
View GitHub Profile
@NotNite
NotNite / json.ts
Last active November 24, 2023 02:24
JSON literal verification in TypeScript type system
/*
JSON literal verification in TypeScript type system (version 3.1 for workgroups)
now powerd by tail recursion (you can blame @ackwell for telling me to and
@s5bug for doing it)
*/
type HEX_CHARS =
| "0"
| "1"
| "2"
@NotNite
NotNite / packwiz-generator.js
Created June 11, 2023 16:30
packwiz-generator.js
// packwiz-generator - make a multimc instance zip for packwiz
// node index.js <URL to pack.toml>
// (c) notnite 2023, MIT license
const fs = require("fs");
const AdmZip = require("adm-zip");
const TOML = require("@iarna/toml");
const packUrl = process.argv[2];
@NotNite
NotNite / screeps-webhook.js
Created May 18, 2023 17:28
screeps-webhook.js
const https = require("https");
function ivmWrap(sandbox, name, func) {
const ivm = require("isolated-vm");
const sandboxContext = sandbox.getContext();
const sandboxGlobal = sandboxContext.global;
const sandboxIsolate = sandbox.getIsolate();
sandboxGlobal.setSync("_notnet_ivm", ivm);
sandboxGlobal.setSync("_notnet_" + name, new ivm.Reference(func));
# Blender addon to make my life easier developing Xande.TestPlugin
import bpy
import os
# ===== Helper functions
def get_overlay() -> bpy.types.View3DOverlay:
for area in bpy.context.screen.areas:
if area.type == "VIEW_3D":
using System;
using System.IO;
using System.Runtime.InteropServices;
using Dalamud.Data;
using Dalamud.Game;
using FFXIVClientStructs.Havok;
namespace Toolkitty.Utils;
// shoutouts aers, winter, perch, couldn't have done it without you besties