Skip to content

Instantly share code, notes, and snippets.

View ashe23's full-sized avatar

Ashot Barkhudaryan ashe23

  • 22:06 (UTC +04:00)
View GitHub Profile
@nakst
nakst / maths.cpp
Last active October 18, 2025 18:12
// NOTE Compile without fast math flags.
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
@rupeshtiwari
rupeshtiwari / material-icon.md
Last active December 28, 2025 09:09
Custom Material Icon Folder ( customize folder icons vscode material theme)
tags title
vscode, material,customize folder icons vscode material theme
How to add custom folder icon in Material icons

Steps to add custom folder icon in Material icons

Go to Settings.json file

template <class T>
void ShuffleArray(T& InArray)
{
const int32 LastIndex = InArray.Num() - 1;
for (int32 i = 0; i < LastIndex; ++i)
{
int32 Index = FMath::RandRange(0, LastIndex);
if (i != Index)
{
InArray.Swap(i, Index);
@leomrocha
leomrocha / find_arch.py
Created March 19, 2019 16:02
Python, finding if the architecture is 32 or 64 bits
# This file is to sum up how to get the hardware architecture (32 or 64 bits)
# solutions are taken from here:
# https://stackoverflow.com/questions/1405913/how-do-i-determine-if-my-python-shell-is-executing-in-32bit-or-64bit-mode-on-os
# https://stackoverflow.com/questions/1842544/how-do-i-detect-if-python-is-running-as-a-64-bit-application
def get_platform():
"""
Finds if the platform is 32 or 64 bits
Several different ways are tried in case one fails
@CoolOppo
CoolOppo / Cargo.toml
Last active September 15, 2024 10:55
How to compile to a DLL in rust while using it as a normal rust library
[package]
name = "test"
version = "0.1.0"
authors = ["YOU <YOU@users.noreply.github.com>"]
edition = "2018"
[lib]
crate-type = ["cdylib"]
@looterz
looterz / README.md
Last active March 26, 2025 13:44
UE4 Loading Screen with Progress

This will only work in cooked builds with Event Driven Loader enabled (enabled by default). Currently this only shows the specified packages loading progress, but not dependant packages, which is an annoying issue since that is where most of the loading time is for maps.

@mbinna
mbinna / effective_modern_cmake.md
Last active January 17, 2026 10:42
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@timvisee
timvisee / falsehoods-programming-time-list.md
Last active January 22, 2026 19:50
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@alexgeek
alexgeek / SGenericStructList.h
Created August 24, 2017 14:59
UE4 Slate: Generic wrapper to show list of structs
#pragma once
#include "CoreMinimal.h"
#include "Layout/Margin.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "Widgets/SCompoundWidget.h"
#include "Widgets/SNullWidget.h"
#include "Widgets/SWidget.h"
#include "Widgets/Layout/SBox.h"
#include "Widgets/Text/STextBlock.h"
@yujuiting
yujuiting / dynamic-load-uasset.cpp
Last active January 4, 2024 07:20
Unreal Engine 4: Dynamic load uasset
/*
load uasset from file path.
*/
FString filepath("/Game/an_animation_file"); // without extension, path start with `/Game`, `/Game` refer-> `Content` folder in real.
FStringAssetReference asset_stream_ref(filepath);
TAssetPtr<UAnimationAsset> animation_asset(asset_stream_ref);
UAnimationAsset* animation = animation_asset.LoadSynchronous();
bool isValid = animation_asset.IsValid();
bool isNull = animation_asset.IsNull();
bool isPending = animation_asset.IsPending();