Skip to content

Instantly share code, notes, and snippets.

@SeriousBuggie
SeriousBuggie / UT99-uc-helpers.md
Last active September 24, 2023 17:51
Useful helper functions for Uscript for UT99

Get screen X Y coordinates for specified Location:

simulated function float getXY(Canvas C, vector location, out int screenX, out int screenY) {
	local vector X, Y, Z, CamLoc, TargetDir, Dir, XY;
	local rotator CamRot;
	local Actor Camera;
	local float TanFOVx, TanFOVy;
	local float ret;

	C.ViewPort.Actor.PlayerCalcView(Camera, CamLoc, CamRot);
@willurd
willurd / web-servers.md
Last active May 10, 2024 05:14
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@derekgates
derekgates / SetAssemblyInfoToVersion.ps1
Last active April 14, 2021 20:07
Changes version information in AssemblyInfo.cs files recursively from a given path. I use this with TeamCity to control the version number as the built in Build Feature runs before my psake script can obtain the version (clearing out the version!).
# SetAssemblyVersion.ps1
#
# http://www.luisrocha.net/2009/11/setting-assembly-version-with-windows.html
# http://blogs.msdn.com/b/dotnetinterop/archive/2008/04/21/powershell-script-to-batch-update-assemblyinfo-cs-with-new-version.aspx
# http://jake.murzy.com/post/3099699807/how-to-update-assembly-version-numbers-with-teamcity
# https://github.com/ferventcoder/this.Log/blob/master/build.ps1#L6-L19
Param(
[string]$path=$pwd
)