Skip to content

Instantly share code, notes, and snippets.

View alexgeek's full-sized avatar

Alexander Brook Perry alexgeek

View GitHub Profile
@andrewrk
andrewrk / microsoft_craziness.h
Created September 1, 2018 14:35
jonathan blow's c++ code for finding msvc
//
// Author: Jonathan Blow
// Version: 1
// Date: 31 August, 2018
//
// This code is released under the MIT license, which you can find at
//
// https://opensource.org/licenses/MIT
//
//
// Copyright 2016 People Gotta Play. All rights reserved.
#include "ProjectMK.h"
#include "UMGExtensionLibrary.h"
UTextureRenderTarget2D * UUMGExtensionLibrary::RenderWidgetToTexture(bool UseGamma, TextureFilter Filter, UUserWidget * WidgetToRender, FVector2D DrawSize, float DeltaTime)
{
if (!WidgetToRender) return nullptr;
if (DrawSize == FVector2D(0, 0)) return nullptr;
@williewillus
williewillus / Primer.md
Last active July 16, 2023 03:18
1.8 rendering primer

1.8 Rendering Primer by williewillus (formatted to markdown by gigaherz)

Note: This primer assumes you are using MinecraftForge 1.8.9 build 1670 or above. Correctness not guaranteed otherwise. Note 2: This primer is for 1.8.x. Changes in 1.9 are on another gist: https://gist.github.com/williewillus/e37edde85dc78d2e138c

This guide is intended for those with a clear knowledge of general modding and want a quick up to speed on how new things work. If you are confused, please hop on IRC and ask for help!

Blocks and Items

  • 1.7: EVERY BLOCK SHAPE EVER was hardcoded into RenderBlocks or your ISBRH. Oh God, just look at that class. Actually don’t, if you value your sanity.
@alexgeek
alexgeek / test.sh
Created March 6, 2015 14:47
Bash Execution Timer
#!/bin/bash
die() { echo "$@" 1>&2 ; exit 1; }
[ $# -gt 2 ] && die "Max 2 arguments."
PROGRAM=$1
[ -z "$PROGRAM" ] && die "No arguments passed."
[ ! -f "$PROGRAM" ] && die "Program does not exist."
ITER=${2:-1000} # default 1000 iterations
echo "Executing $ITER tests on $PROGRAM."
for i in `seq 1 $ITER`; do
@fearthecowboy
fearthecowboy / associate-powershell.ps1
Last active July 11, 2025 12:48
Make PowerShell scripts runnable from anywhere ( ie, CMD.EXE, Explorer, Run Dialog, etc)
#==============================================================================
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.