Skip to content

Instantly share code, notes, and snippets.

@kirby561
kirby561 / TransferComponent.cpp
Created November 22, 2023 21:39
Implements a UActorComponent that can be attached to actors in Unreal Engine to send buffers larger than the max RPC size by sending chunks at a time.
/*
* Copyright © 2023 kirby561
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the “Software”), to deal in the Software without
* restriction, including without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
@Oleksiy-Yakovenko
Oleksiy-Yakovenko / pipe.cpp
Created January 25, 2018 16:39
cross platform pipe IPC implementation in C++
#include "stdafx.h"
#define USE_POPEN 1
#if PLATFORM_WINDOWS
#define popen _popen
#define pclose _pclose
#endif
class Pipe
@hillin
hillin / integrating-fastbuild-with-ue4.md
Last active August 1, 2023 22:21
Integrating FASTBuild with Unreal Engine 4

FASTBuild is an open-source distributed build system, which could be a free alternative to Incredibuild. Unreal Engine 4 (UE4) does not support FASTBuild natively, however it's not hard to integrate it manually.

Integrate FASTBuild with UE4

Install FASTBuild

We assume you already have the full UE4 source code. First you'll need to grab the latest FASTBuild tools from here. We use v0.93 Windows x64 version in this tutorial. Download it and extract all the files. Here you have several choices:

  • Place the files under any folder which could be found with your system's PATH environment variable. To see where these folders are, run the PATH command in a command prompt window;
  • Place the files under the Engine\Binaries\ThirdParty\FASTBuild folder of your engine. This is the recommended place;
  • Place the files anywhere you like. This is not recommended because you'll have to hard-code the path later.
@JakubNei
JakubNei / DeferredSynchronizeInvoke.cs
Last active January 11, 2023 11:06
Implementation of ISynchronizeInvoke for Unity3D game engine. Can be used to invoke anything on main Unity thread. ISynchronizeInvoke is used extensively in .NET forms, it's is elegant and quite useful in Unity as well. I implemented it so i can use it with System.IO.FileSystemWatcher.SynchronizingObject.
/*
Implementation of ISynchronizeInvoke for Unity3D game engine.
Can be used to invoke anything on main Unity thread.
ISynchronizeInvoke is used extensively in .NET forms, it's is elegant and quite useful in Unity as well.
I implemented it so i can use it with System.IO.FileSystemWatcher.SynchronizingObject.
help from: http://www.codeproject.com/Articles/12082/A-DelegateQueue-Class
example usage: https://gist.github.com/aeroson/90bf21be3fdc4829e631
version: aeroson 2017-07-13 (author yyyy-MM-dd)
@mywaiting
mywaiting / graceful_shutdown_tornado_web_server.py
Last active May 7, 2022 08:30
The example to how to shutdown tornado web server gracefully...
#!/usr/bin/env python
"""
How to use it:
1. Just `kill -2 PROCESS_ID` or `kill -15 PROCESS_ID` , The Tornado Web Server Will shutdown after process all the request.
2. When you run it behind Nginx, it can graceful reboot your production server.
3. Nice Print in http://weibo.com/1682780325/zgkb7g8k7
"""
@mminer
mminer / Console.cs
Last active March 28, 2024 22:23
Unity script to display in-game debug console. Actively maintained version: https://github.com/mminer/consolation
// NOTE: For an actively-maintained version of this script, see https://github.com/mminer/consolation.
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// A console to display Unity's debug logs in-game.
/// </summary>
public class Console : MonoBehaviour
{