Skip to content

Instantly share code, notes, and snippets.

@havchr
havchr / PivotAdjuster.cs
Last active February 4, 2025 09:08
Unity3DS editor script, context menu for adjusting pivot of a parent object that have children placed around.
using UnityEditor;
using UnityEngine;
namespace Agens
{
#if UNITY_EDITOR
public enum PivotAlignment
{
Min,Mid,Max,
}
@ThomasFOG
ThomasFOG / MiniPCG32.cs
Last active January 28, 2025 13:25
Minimal PCG32 Random Number Generator in C#
namespace PizzaDough
{
/// <summary>
/// Random Number Generator based on Permutation-Congruential-Generator (PCG), which is a fancy wording to
/// describe a family of RNG which are simple, fast, statistically excellent, and hardly predictable.
///
/// More interestingly, PCG allows to generate multiple sequences with the same seed, which is very handy
/// in game development to have a unique seed per game session while using different streams for each
/// RNG which requires an isolated context (e.g. generating a procedural level, but we don't want the loot
/// generation to affect subsequent level generations).
@xsellier
xsellier / computeSteamTags.js
Last active December 3, 2020 16:05
Install request and async npm packages first, then run `node computeSteamTags.js`
/******************************************
* PREREQ:
* NodeJS 8+
* NPM
******************************************
* USAGE:
* npm install async request
* node index.js
******************************************/
const async = require('async')
@LosEcher
LosEcher / drive_global_blacklist.filter
Created May 21, 2020 02:21
synology drive exclude folders config
[Version]
major = 1
minor = 1
[Common]
black_dir_prefix = "@tmp", "@eaDir", ".SynologyWorkingDirectory", "#recycle", "desktop.ini", ".ds_store", "Icon\r", "thumbs.db", "$Recycle.Bin", "@sharebin", "System Volume Information", "Program Files", "Program Files (x86)", "ProgramData", "#snapshot"
max_length = 0
max_path = 0
[File]
@Yanrishatum
Yanrishatum / heapsfaq.md
Last active July 2, 2025 02:36
An Unofficial Heaps FAQ

An Unofficial Heaps FAQ

I (Yanrishatum) see too many same questions. They irritate me.

Translation

"How dare you come into this chat and not realize that i am the GOD of heaps and that you MUST check out MY documentation1!!! Im veyr abngrey!!!" - translation from someone in chat.

Very accurate, I highly approve.

@danieldogeanu
danieldogeanu / MakePowerShellRememberSSHPassphrase.md
Last active August 9, 2025 16:42
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
@nicolasdao
nicolasdao / visual_studio_msbuild_manual.md
Last active September 11, 2024 12:37
Visual Studio & MSBuild manual. Keywords: msbuild visual studio visualstudio
@bshishov
bshishov / SimpleDecal.shader
Last active March 26, 2025 04:39
Unity3D simple screen-space decal shader. Does not support lighting. Works with LWRP. Just create a material with this shader and assign it to a cube (also disable shadows and collider). Thats it you've got a working decals.
Shader "Custom/SimpleDecal"
{
Properties {
_MainTex ("Main Texture", 2D) = "white" {}
[HDR]_Color ("Color", Color) = (1, 1, 1, 1)
}
SubShader
{
Tags { "RenderType"= "Transparent" "Queue" = "Transparent" }
Pass
@vincentriemer
vincentriemer / twitter_encode.sh
Created May 5, 2019 02:08
Script to encode videos optimized for Twitter with ffmpeg. NOTE: Read through the entire script before running and modify to your needs, as it is currently configured for my own environment
#!/usr/bin/env bash
set -e
# usage:
# $ ./encode.sh [INPUT_FILE]
#
# NOTE: The output directory is defined in the script (below) because I use this script with Hazel
# START CONFIGURATION ==================
@wilmarvh
wilmarvh / git checkout-all-branches.sh
Last active October 1, 2025 06:54
git checkout-all-branches
#!/bin/bash
#Whenever you clone a repo, you do not clone all of its branches by default.
#If you wish to do so, use the following script:
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master | grep -v main `; do
git branch --track ${branch#remotes/origin/} $branch
done