Skip to content

Instantly share code, notes, and snippets.

View marslo's full-sized avatar

marslo marslo

View GitHub Profile
@4wk-
4wk- / README.md
Last active February 14, 2025 07:32
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)
@shitchell
shitchell / git-user-stats
Last active January 16, 2025 03:34
Show user stats in a git repo
#!/bin/bash
#
# Show user stats (commits, files modified, insertions, deletions, and total
# lines modified) for a repo
git_log_opts=( "$@" )
git log "${git_log_opts[@]}" --format='author: %ae' --numstat \
| tr '[A-Z]' '[a-z]' \
| grep -v '^$' \
@Tampa
Tampa / gist:97e4ab0db59379b6c7bf347bb8dcb83e
Last active December 19, 2024 05:56
Jenkins extra css
:root {
--primary: #ddd;
--text-color: #ddd;
--background: #222;
--light-grey: #444;
--very-light-grey: #555;
--table-body-foreground: #ddd;
--table-header-foreground: #ddd;
--tabs-item-background--selected: #000;
--link-color: #ddd;
@brbsix
brbsix / fzf.sh
Last active February 7, 2025 02:08
Configure fzf
#!/bin/bash
#
# Configure fzf
# Set up fzf tab completion
. /usr/share/fzf/completion.bash
# Set up fzf key bindings
. /usr/share/fzf/key-bindings.bash
2021/01/22 01:18:42 GCEMetadataScripts: windows-startup-script-ps1: Success Restart Needed Exit Code Feature Result
2021/01/22 01:18:43 GCEMetadataScripts: windows-startup-script-ps1: ------- -------------- --------- --------------
2021/01/22 01:18:43 GCEMetadataScripts: windows-startup-script-ps1: True Yes SuccessRest... {Containers}
2021/01/22 01:18:43 GCEMetadataScripts: windows-startup-script-ps1: WARNING: You must restart this server to finish the installation process.
2021/01/22 01:18:43 GCEMetadataScripts: windows-startup-script-ps1: Restarting computer after enabling Windows Containers feature
2021/01/22 01:18:43 GCEMetadataScripts: windows-startup-script-ps1 exit status 0
2021/01/22 01:20:31 GCEMetadataScripts: windows-startup-script-ps1: Installing NuGet module
@s-lyn
s-lyn / INSTALL.md
Last active February 7, 2025 09:52
Configure Kubernetes Dashboard Web UI hosted with Nginx Ingress Controller
@Miha-x64
Miha-x64 / Xml.java
Last active December 22, 2022 14:03
HTML/XML escaping utils, answering https://stackoverflow.com/a/61215915/3050249
import java.io.IOException;
import java.io.UncheckedIOException;
/**
* XML escaping utils.
*
* Source: https://gist.github.com/Miha-x64/4ed50f1d5593e45a452efbf456aa1db4
*/
public final class Xml {
@kastiglione
kastiglione / dotfile.sh
Created September 17, 2019 16:53
git fetch config
addbranch() {
local branch=$1
git config --add remote.origin.fetch "+refs/heads/${branch}:refs/remotes/origin/${branch}"
git fetch
git checkout "$branch"
}
/*
Inspiration taken from the github page below.
Changes made:
- allowing the configuration to be taken from a file
- this will allow the script to be used in a docker/k8s environment
with the configuration in a mounted secret.
*/
/*
Copyright (c) 2015-2018 Sam Gleske - https://github.com/samrocketman/jenkins-bootstrap-shared