Skip to content

Instantly share code, notes, and snippets.

View andreslunchbox's full-sized avatar

andreslunchbox andreslunchbox

View GitHub Profile
@daehahn
daehahn / wsl2-network.ps1
Last active September 28, 2025 12:00
WSL 2 TCP NETWORK FORWARDING
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
}
@reneabreu
reneabreu / AutoHideSplashScreen.cs
Last active December 16, 2022 12:17
I always forget to check if Unity's splashscreen is activated, so here is a Pre-Process Build to check if i'm using Unity Plus/Pro and deactivate it for me.
#if UNITY_EDITOR
using UnityEditor;
using UnityEngine;
using UnityEditor.Build;
#if UNITY_2017
class AutoHideSplashScreen : IPreprocessBuild
{
public int callbackOrder { get { return 0; } }
public void OnPreprocessBuild(BuildTarget target, string path) {
@josdejong
josdejong / merge.kt
Last active July 30, 2025 05:53
Merge two data classes in Kotlin
import kotlin.reflect.full.declaredMemberProperties
import kotlin.reflect.full.primaryConstructor
/**
* Merge two data classes
*
* The resulting data class will contain:
* - all fields of `other` which are non null
* - the fields of `this` for the fields which are null in `other`
*
@Birdie0
Birdie0 / ifttt-webhooks-extended-guide.md
Last active October 23, 2025 07:29
How to use Discord Webhooks

⚠️ This gist is no longer updated! For maintained, improved and even more extended guide click here.


How to use Discord Webhook

It's a JSON

First, learn JSON. It's not programming language, not even close. Just follow syntax rules and you will be fine.