Skip to content

Instantly share code, notes, and snippets.

View WoLfulus's full-sized avatar
🖥️
C:\> wsl --user 🐺

WoLfulus WoLfulus

🖥️
C:\> wsl --user 🐺
View GitHub Profile
@sj26
sj26 / LICENSE.md
Last active July 16, 2024 08:45
Bash retry function

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.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit

#!/bin/bash
# mirror list
#wget -qO - mirrors.ubuntu.com/mirrors.txt
# replace apt-get mirror's with a country mirror
sed -i -E 's/deb(-src)? http:\/\/.+\/\b/deb\1 http:\/\/br.archive.ubuntu.com\//' /etc/apt/sources.list
# mirror protocol
# sed -E 's/deb(-src)? http:\/\/.+ /deb\1 mirror:\/\/mirrors.ubuntu.com\/mirrors.txt /' /etc/apt/sources.list
@WoLfulus
WoLfulus / pi4-setup.md
Last active May 6, 2023 19:33
Raspberry Pi 4 Setup

bootstrap

  • burn raspbian image to sdcard
  • remove and insert sdcard
    • touch /boot/ssd
  • repeat for all sdcards

network pin (optional)

  • grab both (eth and wlan) mac addresses from your raspberries
@hybridherbst
hybridherbst / RuntimeInitializeOnLoad - Event Order.cs
Created March 8, 2021 15:04
[RuntimeInitializeOnLoad] Event Order
static Lifecycle() => Debug.Log(Prefix + "Static Constructor");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] static void Subs() => Debug.Log(Prefix + "Subsystem Registration");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterAssembliesLoaded)] static void AfterAsm() => Debug.Log(Prefix + "AfterAssembliesLoaded");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)] static void BeforeSlash() => Debug.Log(Prefix + "Before Splash");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] static void BeforeScene() => Debug.Log(Prefix + "BeforeScene");
private void Awake() => Debug.Log(Prefix + "Awake");
private void OnEnable() => Debug.Log(Prefix + "OnEnable");
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)] static void AfterScene() => Debug.Log(Prefix + "AfterSceneLoad");
[RuntimeInitializeOnLoadMethod] static void DefaultLog() => Debug.Log(Prefix + "RuntimeInit Default");
void Start() => Debug
using Sirenix.OdinInspector;
using Sirenix.Serialization;
using Sirenix.Utilities;
using UnityEngine;
[ShowOdinSerializedPropertiesInInspector]
public class SerializedGlobalConfig<T> : GlobalConfig<T>, ISerializationCallbackReceiver where T : GlobalConfig<T>, new()
{
[SerializeField, HideInInspector]
private SerializationData serializationData;