Skip to content

Instantly share code, notes, and snippets.

View S-ed's full-sized avatar

Alexey Mak S-ed

View GitHub Profile
@ryanschmidtEpic
ryanschmidtEpic / subtract_actors.py
Created March 1, 2022 22:38
Sample UnrealEngine 5.0 Python Script for using Geometry Scripting to do a Boolean Subtract operation
#
# Unreal Engine 5.0 Python Script that takes in N >= 2 selected StaticMesh Actors,
# and subtracts Actors 1..N from the first Actor
#
import unreal
# output path and asset name (random suffix will be appended)
BooleanResultBasePath = "/Game/PythonBooleanTest"
BooleanResultBaseName = "PyBoolean"
@sfider
sfider / DataGameViewportClient.cpp
Last active May 4, 2024 17:26
UE4 Pixel Perfect GameViewportClient
#include "DataGameViewportClient.h"
#include "Engine.h"
#include "Engine/LocalPlayer.h"
#include "SceneView.h"
constexpr int RENDER_WIDTH = 320;
constexpr int RENDER_HEIGHT = 180;
UDataGameViewportClient::UDataGameViewportClient(FVTableHelper& Helper)
: Super(Helper)
param (
[String]$LanguageToFix = 'en-SG'
)
$lng = Get-WinUserLanguageList
$lng.Add($LanguageToFix)
Set-WinUserLanguageList -Force $lng
$lng.Remove( ( $lng | Where-Object LanguageTag -like $LanguageToFix ) ) 2>&1 | Out-Null
Set-WinUserLanguageList -Force $lng
@ruccho
ruccho / Generate Normal Map for all frames.lua
Last active April 25, 2025 17:08
Lua script for Aseprite that generates normal map automatically from all frames of selected layers.
----------------------------------------------------------------------
-- Generate Normal Map
--
-- It works only for RGB color mode.
----------------------------------------------------------------------
if app.apiVersion < 1 then
return app.alert("This script requires Aseprite v1.2.10-beta3")
end
----------------------------------------------------------------------
-- Generate Normal Map
--
-- It works only for RGB color mode.
----------------------------------------------------------------------
if app.apiVersion < 1 then
return app.alert("This script requires Aseprite v1.2.10-beta3")
end
// ==UserScript==
// @name sketchfab2obj
// @description Save Sketchfab models as obj
// @author <anonimus>
//
// Version Number
// @version 1.62
//
// Urls process this user script on
// @include /^https?://(www\.)?sketchfab\.com/models/.*
@SvenKortekaas
SvenKortekaas / installation_naskit_nanopi.md
Last active May 29, 2025 03:31
Setting up 1-bay NAS Kit v1.2 for NanoPi NEO&NEO2

Build your own NAS storage

Aluminum Case | OpenMediaVault Ready | NanoPi NEO-512M Applicable

Credit, text from: http://www.friendlyarm.com/index.php?route=product/product&product_id=192&search=nas&description=true&category_id=0&sub_category=true

Image 1/14

The NanoPi NEO and NanoPi NEO2 are pin-to-pin compatible super-mini ARM computers released by FriendlyElec. The NanoPi NEO uses Allwinner's quad-core Cortex-A7 H3 SoC while the NanoPi NEO2 usus Allwinner's 64-bit quad-core Cortex-A53 H5 SoC. Both have onboard Ethernet and USB.

The 1-bay NAS Dock V1.2 for NanoPi NEO&NEO2 uses high speed USB 3.0 to SATA chip JMS567. It has an onboard RTC battery. It works with the latest mainline kernal Linux-4.11 and Debian8-Jessie.

@SpineyPete
SpineyPete / tonemappers.glsl
Last active November 27, 2025 14:59
Tonemappers
#version 330
// Tonemapping
// -----------
// Some of these are attributed to certain games.
// But this is mostly secondhand info, so take it with a grain of salt.
vec3 Tonemap_Reinhard(vec3 x) {
// Simplest Reinhard tonemapper.
@phosphoer
phosphoer / SimpleGeo.cs
Last active December 2, 2024 16:13
Simple Geometry Painter for Unity
// The MIT License (MIT)
// Copyright (c) 2016 David Evans @phosphoer
// 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 substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
#include <iostream>
#include <fstream>
#include <memory>
#include <string>
#include <algorithm>
void process_crypt_table(unsigned *crypt_table)
{
for (auto i = 0; i < 227; i++)
{