Skip to content

Instantly share code, notes, and snippets.

Hi there

@repsejnworb
repsejnworb / aocusage.bat
Created November 1, 2024 12:04
batch script to quickly check AoC usage
@echo off
@For /F "tokens=*" %%a IN ('"dir %localappdata%\AOC\Saved\* /s /-c | find "bytes" | find /v "free""') do @Set gameSum=%%a
@For /F "tokens=*" %%a IN ('"dir "%localappdata%\Intrepid Studios\Launcher\*" /s /-c | find "bytes" | find /v "free""') do @Set launcherSum=%%a
@For /f "tokens=1,2 delims=)" %%a in ("%gameSum%") do @set gamefilesout=%%a&set gamesizeout=%%b
@For /f "tokens=1,2 delims=)" %%a in ("%launcherSum%") do @set launcherfilesout=%%a&set launchersizeout=%%b
@Set gamesizeout=%gamesizeout:bytes=%
@Set gamesizeout=%gamesizeout: =%
@Set launchersizeout=%launchersizeout:bytes=%
@Set launchersizeout=%launchersizeout: =%
@repsejnworb
repsejnworb / CrossOverLicence.sh
Last active December 4, 2025 17:04
unlimited CrossOver 24 trial (MacOS)
#!/bin/sh
# Variables
FOLDER_NAME="CrossOverLicence"
PLIST_NAME="com.codeweavers.CrossOver.license.plist"
BOTTLES_PATH="$HOME/Library/Application Support/CrossOver/Bottles"
SCRIPT_URL="https://gist.githubusercontent.com/repsejnworb/84d3e0852cf90ef40edf7e9c060f193b/raw/CrossOverLicence.sh?token=$(date +%s)"
TOTAL_STEPS=3
STEP=0
@repsejnworb
repsejnworb / raymarch.hlsl
Created July 7, 2023 11:09 — forked from h3r2tic/raymarch.hlsl
Depth buffer raymarching for contact shadows, SSGI, SSR, etc.
// Copyright (c) 2023 Tomasz Stachowiak
//
// This contribution is dual licensed under EITHER OF
//
// Apache License, Version 2.0, (http://www.apache.org/licenses/LICENSE-2.0)
// MIT license (http://opensource.org/licenses/MIT)
//
// at your option.
#include "/inc/frame_constants.hlsl"
@repsejnworb
repsejnworb / redis_handlers.py
Created January 20, 2022 09:59 — forked from aaronpolhamus/redis_handlers.py
task locking with redis + celery
"""Task locking with redis in celery is hard, and good examples are tough to come by. This is the approach that's
worked for me, based on great work that other folks have posted:
* https://breadcrumbscollector.tech/what-is-celery-beat-and-how-to-use-it-part-2-patterns-and-caveats/
* http://loose-bits.com/2010/10/distributed-task-locking-in-celery.html
* https://redis.io/topics/distlock
This isn't polished,but hopefully it's useful. To verify it in our local test env we register the following test task in
our definitions file:
*** definitions.py ***
@repsejnworb
repsejnworb / xCharacter.cpp
Created September 18, 2021 22:54
client predicted top down example
void AgastCharacterV2::BeginPlay()
{
Super::BeginPlay();
NavDestination = GetActorLocation();
}
void AgastCharacterV2::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
GetNextPathPoint();
@repsejnworb
repsejnworb / install-pre-hook.sh
Last active February 25, 2020 13:04
Prevent push to master
#!/bin/sh
# This script will install a Git pre-push hook that prevents pushing the master branch.
# Based on https://gist.github.com/stefansundin/d465f1e331fc5c632088
# Global installation instructions:
# mkdir $HOME/.githooks
# git config --global core.hooksPath $HOME/.githooks
# curl -fL -o $HOME/.githooks/pre-push https://gist.githubusercontent.com/repsejnworb/e1dc8786c8b314f853cb487569a18aba/raw/pre-push
# chmod +x $HOME/.githooks/pre-push
# Uninstall: