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 July 18, 2021 17:08
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
// ==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 28, 2022 06:45
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 2, 2023 13:20
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 March 28, 2024 22:24
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++)
{
@steelywing
steelywing / google-translate-tooltip.user.js
Last active October 22, 2023 16:18
google translate tooltip for firefox & chrome
// ==UserScript==
// @name Google Translate Tooltip
// @namespace steely.wing
// @version 1.10
// @description Translates selected text into a tooltip.
// @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
// @copyright 2014, Wing Leong (http://steelywing.iblogger.org/)
// @include *
// @require http://code.jquery.com/jquery-2.1.0.min.js
// @grant GM_getValue
@archagon
archagon / gdc-downloader.py
Last active March 21, 2024 19:04
A quick and dirty script to download GDC Vault videos.
# GDC Vault videos can't be watched on mobile devices and this is a very sad thing indeed!
# (Note: this has changed for GDC2013, which lets you watch raw MP4 streams. Kudos!)
# This script is designed to circumvent this by downloading the lecture and slideshow
# videos which can then be re-encoded into whatever format you wish. Obviously, you
# won't be able to do this without access to the Vault. This is strictly for the
# convenience of legitimate Vault users!
# Note: this code is rather flimsy and was written as fast as possible for my own personal use.
# The code only works for the most recent GDC Vault videos, since they all use the same player
# format. If the XML format used to run the player is changed (as it has in the past), the code