Skip to content

Instantly share code, notes, and snippets.

View BenVlodgi's full-sized avatar
💭
Working on Supraworld

Benjamin Thomas Blodgett BenVlodgi

💭
Working on Supraworld
View GitHub Profile
@intaxwashere
intaxwashere / customthunkexample.md
Last active June 29, 2024 19:55
Custom Thunks Unreal Engine TL;DR

Custom thunks TL;DR

This smol post assumes you worked on a custom thunk implementation before but no idea how it works, why you're using cursed macros from 1990s etc. If you don't have any programming experience or relatively new to Unreal world, it's likely you might not understand anything from this post, not because concepts are too difficult to grasp, but rather because this post is written for the people who has an understanding of how Unreal works since a while and want to expand their knowledge of custom thunks implementation.

Part 1:

  • A thunk is a function that you can save and call later, so if you had an array of TFunction<void()>s, you would have an array of custom thunks that you can bind/unbind new function pointers to existing TFunctions.
  • Custom thunks of Blueprints are the same, they're a fancy array/list of function pointers. Imagine for each node you placed to graph, Blueprints have a place for that node in it's list of custom thunks. For example the + node in Blueprints that
@vii33
vii33 / obsidian-vii-adjustable-readable-line-length.css
Last active April 13, 2024 14:50
Changes the readable line length in Obsidian Notes. Tested in Obsidian v1.0.0
/* Changes the readable line length in Obsidian Notes. Tested in Obsidian v1.0.0
See https://gist.github.com/vii33/f2c3a85b64023cefa9df6420730c7531/f4ea845b240e94c9fcd47d456340f78208dab38f
*/
body {
--file-line-width: 750px;
}
@rdeioris
rdeioris / DiscoverBlueprintComments.cpp
Created April 11, 2020 09:41
How to extract Unreal Engine Blueprint comments via c++
FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked<FAssetRegistryModule>("AssetRegistry");
TArray<FAssetData> AssetData;
AssetRegistryModule.Get().GetAssetsByClass(UBlueprint::StaticClass()->GetFName(), AssetData, true);
for (FAssetData& Asset : AssetData)
{
if (Asset.ObjectPath.ToString().StartsWith("/Game/"))
@Sacristan
Sacristan / push_commits_by_chunks.sh
Last active June 3, 2024 12:54
Push commits by chunks
REMOTE=origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=10
# check if the branch exists on the remote
# if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then
# # if so, only push the commits that are not on the remote already
# range=$REMOTE/$BRANCH..HEAD
# else
# # else push all the commits
@bisqwit
bisqwit / vbsp_bisqwit.cc
Last active June 24, 2018 14:44
Rewriting vbsp_styles (Portal 2 Puzzlemaker BEE2)
/* TO COMPILE:
*
i686-w64-mingw32-g++.exe -o vbsp_bisqwit.exe vbsp_bisqwit.cc -Wall -Wextra -pedantic -Ofast -static -flto -s -std=gnu++1y -fopenmp
OR:
x86_64-w64-mingw32-g++.exe -o vbsp_bisqwit.exe vbsp_bisqwit.cc -Wall -Wextra -pedantic -Ofast -static -flto -s -std=gnu++1y -fopenmp
OR
@ansonparker
ansonparker / gist:1228449
Created September 20, 2011 05:48
Lossless FLV to MP4 conversion
Open command prompt (Terminal) and run:
ffmpeg -i "filename.flv" -vcodec copy -acodec copy "filename.mp4"
This will copy video track and audio track from filename.flv to filename.mp4. The operation is lossless (there is no quality loss).
@vbfox
vbfox / Program.cs
Created August 26, 2010 15:33
Sample code for SHOpenFolderAndSelectItems in C#
namespace SHOpenFolderAndSelectItems
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.ComTypes;