Skip to content

Instantly share code, notes, and snippets.

@4wk-
4wk- / README.md
Last active May 21, 2024 11:51
Clean uninstall then reinstall of WSL on Windows 10, with systemD support

Uninstall then reinstall WSL on Windows 10 (clean way)

Background

I've been using wsl (version 2) with genie mod for years without issue, but one day, Windows 10 finally catch up on wsl Windows 11 features and gives us a way to use systemD natively.

I wanted to use the new "right way" to enable systemD on Windows Subsystem for Linux (without genie), and I also had a (probably related) infinite Windows RemoteApp error poping in.

Fixing it

A - Uninstall wsl and related stuff

  1. In powershell (as admin)
@Pandapip1
Pandapip1 / CooldownButton.cs
Last active July 4, 2023 11:12 — forked from naturecodevoid/CooldownButton.cs
CooldownButton for Among Us mods (with example)
// Credits to https://gist.github.com/gabriel-nsiqueira/827dea0a1cdc2210db6f9a045ec4ce0a and https://gist.github.com/naturecodevoid/1c61786e6a95d7d093f495b6e67aad29 for the original code.
using HarmonyLib;
using Reactor.Extensions;
using Reactor.Unstrip;
using System;
using System.Collections.Generic;
using UnityEngine;
namespace Reactor.Button

Adding Dependencies

Introduction

Adding Dependencies allows you to access hooks, tools and apis provided by other mods. Depending on other's code allows you to spend lesser time on writing your code, and more time on refining it. A commonly used dependency in fabric is Fabric API.

Adding the repository

Open your build.gradle file and add the required maven repositories

repositories {
    maven {
 name = "Example"
@aras-p
aras-p / test.txt
Last active November 2, 2022 23:26
Markdeep Admonition style blocks?
Right now I can do this in Markdeep source:
------------------
Just a test paragraph, move along...
<div class="note">
Just a note. Don't mind me.
</div>
<div class="warn">
@kafene
kafene / gpg-wkd.md
Last active April 12, 2024 19:14
Setting up WKD for self-hosted automatic key discovery

I just got this working so I figured I'd share what I found, since there's hardly any information about this anywhere online except an RFC, the GPG mailing list and one tutorial from the GnuPG blog.

You can use automatic key discovery with WKD (Web key directory) to make it easy for users to import your key, in GPG since version 2.1.12. Since this feature is fairly new, it isn't yet available in the current LTS release of Ubuntu (16.04; xenial), however it is available in Debian stable (stretch).

I couldn't add a DNS CERT or DANE / OPENPGPKEY record through my email service (which also hosts my nameservers). I tried making the PKA record - a foo._pka.example.com TXT record but GPG doesn't seem to recognize it and fails; I'm still investigating why.

So the last option for self-hosted auto-discovery was WKD.

First thing I had to do was add an email address to my key. My primary UID is just my name so the key represents my identity rather

@heyjohnmurray
heyjohnmurray / React accessing child properties
Created November 22, 2015 06:28
In React you can access the inner HTML or the value of a nested component using this.props.children
var App = React.createClass({
render: function() {
// notice that we have the "Button" and "Heart" components
return <Button>I <Heart /> React</Button>
}
});
var Button = React.createClass({
render: function() {
// notice that this.props.children gave us the value of both the "Button" and the "Heart" component
@junwin
junwin / gist:4731525
Created February 7, 2013 15:13
Simple C# worker thread that processes a queue of string data items (XML, JSON )
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Collections;
namespace workerthread
{