Skip to content

Instantly share code, notes, and snippets.

Assuming you have followed all the steps to install / setup WSL2 -> https://docs.microsoft.com/en-us/windows/wsl/install-win10
**Tested on Ubuntu 20.04**
Step 1 - Find out default gateway and DNS servers
- Navigate to `Control Panel\Network and Internet\Network Connections`
- Right click on relevant connection type WiFi or Ethernet and select `Status`
- Status screen will be displayed, click on `Details` button
- Network Connection details screen will be displayed
- Note down `IPv4 default gateway` and `IPv4 DNS Servers` if available
@thesamesam
thesamesam / xz-backdoor.md
Last active May 4, 2024 09:26
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@P7h
P7h / tmux__CentOS__build_from_source.sh
Last active May 2, 2024 01:27
tmux 2.0 and tmux 2.3 installation steps for Ubuntu. Or build from tmux source v2.5 for Ubuntu and CentOS.
# Steps to build and install tmux from source.
# Takes < 25 seconds on EC2 env [even on a low-end config instance].
VERSION=2.7
sudo yum -y remove tmux
sudo yum -y install wget tar libevent-devel ncurses-devel
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
tar xzf tmux-${VERSION}.tar.gz
rm -f tmux-${VERSION}.tar.gz
cd tmux-${VERSION}
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active May 2, 2024 01:27
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@miXwui
miXwui / framework-13-amd-upgrade.md
Last active April 28, 2024 18:38
Framework 13 AMD 7080U Upgrade (From i7-1165G7, Fedora 38)

Note: this is an ongoing process which I'm documenting here. Semi-experimental, but this is my daily driver machine since September 2021 (work included), so I'm aiming for stability (hence why I'm not using the recommended Fedora 39 Beta).

Upgraded from an Intel i7-1165G7 to AMD 7080U mainboard:

  • 64GB (2x32GB) G.Skill F5-5600S4040A32GX2-RS
    • Have an SK Hynix 16GB (2x8GB) 4800MHz (HMCG66MEBSA095N BA) kit that I'll test just to see power draw difference.
  • SK hynix Gold P31 2TB PCIe NVMe Gen3 M.2 2280

These notes are for Fedora 38 6.5.8-200.fc38.x86_64 with SwayWM.

Booted into Fedora with BIOS 3.02 and seemed fine. First thing I did was upgrade to 3.03.

@matthewd
matthewd / diff-configs.sh
Created September 30, 2011 19:48
Diff /etc files against the versions supplied in Debian packages
#!/bin/bash
# This script will make a best-effort attempt at showing modifications
# to package-provided config files on a Debian system.
#
# It's subject to some pretty significant limitations: most notably,
# there's no way to identify all such config files. We approximate the
# answer by looking first at dpkg-managed conffiles, and then hoping
# that most of the time, if maintainer scripts are managing files
# themselves, they're using ucf. So, DO NOT TRUST THIS SCRIPT to find
@cmalven
cmalven / index.html
Last active April 27, 2024 10:17
Shortest (useful) HTML5 Document
<!-- http://www.brucelawson.co.uk/2010/a-minimal-html5-document/ -->
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>blah</title>
</head>
<body>
<p>I'm the content</p>
@johanmcos
johanmcos / export_installed_flatpaks.md
Created October 15, 2020 16:53
export import-able list of installed flatpaks

I was switching to a new computer today and wanted to install all the flatpaks on my old one, without having to do anything manually of course

It turned out to be pretty easy, but I didn't find any obvious guide on the internet, so I figured I would document my solution

At first I tried the command: flatpak list --app --columns=application > installed_flatpaks.txt This will give you a list of only the application ID's, but each will be on a newline

The issue is that each ID is on its own line. To fix this, I added a second part to the command: flatpak list --app --columns=application | xargs echo -n &gt; installed_flatpaks.txt

@Qix-
Qix- / readme.md
Last active March 30, 2024 10:29

This is a diff between the xz-embedded repositories listed on github and at git.tukaani.org.

$ git remote -v
github  https://github.com/tukaani-project/xz-embedded (fetch)
github  https://github.com/tukaani-project/xz-embedded (push)
origin  https://git.tukaani.org/xz-embedded.git (fetch)
origin  https://git.tukaani.org/xz-embedded.git (push)
@hay
hay / gist:1351230
Last active March 29, 2024 16:36
Enterprisify your Java Class Names!
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Enterprisify your Java Class Names! (by Hay Kranen)</title>
<style>
body {
background: white;
text-align: center;