Skip to content

Instantly share code, notes, and snippets.

View json-m's full-sized avatar
🏴

Jason M. json-m

🏴
View GitHub Profile
@json-m
json-m / monitor.ps1
Created November 28, 2024 23:46
tails a log file and prints urls to console
#Requires -Version 2.0
param(
[Parameter(Mandatory=$true)]
[string]$logFile
)
# Convert relative path to absolute path
$logFile = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($logFile)
# URL regex pattern that matches http, https, ftp, and other common protocols
@json-m
json-m / decrypt.go
Created November 20, 2024 21:24
decrypts eve online launcher account data
package main
/*
#cgo LDFLAGS: -lcrypt32
#include <windows.h>
#include <wincrypt.h>
typedef struct {
BOOL success;
@json-m
json-m / GameMode.cs
Created September 10, 2024 09:47
adds button to scene view in unity to return to gamemode and select whatever gameobject you want every time
using UnityEngine;
using UnityEditor;
public static class SceneViewButton
{
[InitializeOnLoadMethod]
static void RegisterCallback()
{
SceneView.duringSceneGui += OnSceneGUI;
}
@json-m
json-m / MatrixRainEffectWithDepth.glsl
Last active September 10, 2024 01:19
matrix rain shader for unity with some depth and whatever + shadertoy (glsl version) https://www.shadertoy.com/view/l3scz4
// public domain idc
// constants (replace properties)
const vec3 rainColor = vec3(0.0, 1.0, 0.0);
const vec3 backgroundColor = vec3(0.0, 0.0, 0.0);
const float speed = 0.25;
const float density = 0.4;
const float charSize = 0.01;
const float brightness = 0.75;
const float illumination = 0.25;
@json-m
json-m / AutoGesture.cs
Created September 9, 2024 18:59
automatically selects GestureManager in Unity when entering playmode, add to any Editor/ folder
using UnityEngine;
using UnityEditor;
[InitializeOnLoad]
public class AutoSelectGestureManager
{
static AutoSelectGestureManager()
{
EditorApplication.playModeStateChanged += OnPlayModeStateChanged;
}
@json-m
json-m / w32_input.go
Created September 4, 2024 23:26
pure go way to send inputs to background windows using w32+syscall
package input
import (
"fmt"
"github.com/gonutz/w32/v2"
"syscall"
"time"
)
// some code for sending inputs to a window, regardless of whether it is in the foreground or not
@json-m
json-m / zomboidWorkshopMapper.go
Last active January 18, 2024 01:35
project zomboid dedicated server map load order
package main
// for Project Zomboid Dedicated Server
// converts a ModManager load order string to a map mod name load order
// your own client doesn't need the map names since it loads them via the mod load order anyway
// however, hosting a server requires this specific Map load directive in servertest.ini
// this will output a Map= load order in the same order as the mod load order
// the idea is that getting a stable mod load order is way easier in the game client mod manager
// then you can export and use this on a dedicated server instance to host a mp game with your mod order
@json-m
json-m / localdeploy.xml
Last active October 17, 2021 00:48
teamcity local docker image deployment meta-runner. traefik+local registry
<meta-runner name="localdeploy">
<description>builds docker image and deploys to local machine</description>
<settings>
<parameters>
<param name="env.ASSIGNED_PORT" value="8888" />
</parameters>
<build-runners>
<runner name="build" type="DockerCommand">
<parameters>
<param name="command.args" value="--pull" />
@json-m
json-m / isan_v2.yolol
Last active August 27, 2021 22:19
Starbase ISAN document
A=1000 n=1000 pr=0 sp=0 div=(9.6+2.4*pr)*n so=1-sp o=160000 e=8*o c=""
z="origin_" mr=z+"north" br=z+"south" cr=z+"east" z+="west" sm="\nS: "
u=e*3/13 l=2*o mm=l*13/19 k=e*3/19 x/=so sm=c s=c sl="\nsignal lost"
rr="ISAN2 :_\n " xm="\nX: " ym="\nY: " zm="\nZ: " nn=l*13/3
ej=16*sp h="Q" pj=14-pr b=0.5 p=1000000 :at=mr :bt=br :ct=cr :dt=z x=0
t=p-:a t*=t i=p-:b i*=i g=p-:c g*=g f=p-:d f*=f x/=:a*:b*:c*:d goto14
h="M" t=p-:a t*=t er=(t-el)/4 el=t x/=:a :at=br x=8 gotopj// ISAN
i=p-:a i*=i fr=(i-fl)/4 fl=i x/=:a :at=cr x=9 gotopj// From Collective
g=p-:a g*=g gr=(g-gl)/4 gl=g x/=:a :at=z x=10 gotopj// v2.5 - 190821
f=p-:a f*=f hr=(f-hl)/4 hl=f x/=:a :at=mr x=7 gotopj