Skip to content

Instantly share code, notes, and snippets.

@fnuecke
fnuecke / diablo4-loot-filter.proto
Created May 1, 2026 17:02
Diablo 4 Season 13 Loot Filter Protobuf Format
// Protobuf format for Diablo 4 Loot Filters added in Season 13.
syntax = "proto3";
package diablo4;
// Top level message for loot filter codes.
message Filter {
// The name of the rule as shown in the in-game UI.
string name = 2;
// The list of rules in the filter.
@fnuecke
fnuecke / mirror_github_starred_repos.sh
Last active April 17, 2025 22:26 — forked from franklioxygen/mirror_github_starred_repos.sh
This script automatically mirrors GitHub starred repositories to a Gitea instance.
#!/bin/bash
#########################################################################
# GitHub to Gitea Starred Repository Mirror
#
# This script automatically mirrors your GitHub starred repositories to
# a Gitea instance.
#
# - Fetches all repositories starred on GitHub
# - Recreate organization / owner (as org) to mirror repos into
@fnuecke
fnuecke / SelectionNavigation.cs
Created December 14, 2023 03:19
[Unity] Selection History Navigation
#if UNITY_EDITOR
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Threading;
using UnityEditor;
using UnityEngine;
/// <summary>
#if UNITY_EDITOR
using System;
using System.Reflection;
using UnityEditor;
using UnityEngine;
/// <summary>
/// Little utility for opening a "Game" view in fullscreen. Will be opened on whatever Unity thinks is the "main"
/// monitor at the moment. The hotkey will toggle the window; however, if for some reason this breaks, fullscreen
local computer = require("computer")
while true do
local maxMem = 0
for i=1,10 do maxMem = math.max(maxMem, computer.freeMemory()) os.sleep(0) end
print(maxMem)
os.sleep(5)
end
--[[ This script automatically saves the global environment periodically
and restores it when this script is run. Recommended usage is with
the standalone Lua interpreter like this:
lua -i autosave.lua
It was coded for and tested with Eris (https://github.com/fnuecke/eris).
This approach is quite limited and could be improved in a number of ways:
- Userdata cannot be persisted automatically, so if, for example, some
@fnuecke
fnuecke / bios.lua
Created December 24, 2014 00:35
Primitive remote code execution via OC network
local m=component.proxy(component.list("modem")())
m.open(2412)
local function respond(...)
local args=table.pack(...)
pcall(function() m.broadcast(2412, table.unpack(args)) end)
end
local function receive()
while true do
local evt,_,_,_,_,cmd=computer.pullSignal()
if evt=="modem_message" then return load(cmd) end
0000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000
@fnuecke
fnuecke / me-level.lua
Created November 30, 2014 15:15
AE utils for OC
local component = require("component")
local controller = component.appeng_blocks_controller
local modem = component.modem
local items = dofile("/me/items.dat")
local config = dofile("/me/level.cfg")
local function sendRequest(color, count)
modem.broadcast(45555, color, count)
end
--[[ This software is licensed under the M.I.T. license.
Author: David Bergman
Source: https://code.google.com/p/lualisp/
This is a Scheme/Lisp interpreter, written in Lua.
Adjusted for Lua 5.2 and amalgamated for OpenComputers.
Run it without parameters to get into interpreter mode.
Alternatively pass it a file name of a lisp script.
]]