Skip to content

Instantly share code, notes, and snippets.

View falloutphil's full-sized avatar

falloutphil

  • UK
View GitHub Profile
@kalibek-epam
kalibek-epam / wsl-docker-how-to.md
Last active April 16, 2024 22:01
Docker installation guide for WSL2 with Debian

Installation

Prerequisites

  • Windows 11, or Windows 10 version 1903 or higher, with Build 18362 or higher, for x64 systems, and Version 2004 or higher, with Build 19041 or higher, for ARM64 systems
  • Basic linux command line understanding
  • Optional: Windows terminal application

On host machine

@falloutphil
falloutphil / guix-qemu-ubuntu.org
Last active April 7, 2022 23:01
Running Ubuntu under Guix using QEmu, and then installing Cuis Smalltalk

There is no WSL or Multipass on Guix, but we can get the same thing with QEmu (and a lot more). But it’s a bit trickier to get started!

Guix packages required:

  • qemu (possibly can get away with minimal package)
  • cloud-utils (for cloud-localds)
  • cdrkit-libre (for genisoimage, used by cloud-localds)

Create the following user data file - there may be more in this than you need.

@jakebrinkmann
jakebrinkmann / fix_wsl_2_vpn.md
Created November 17, 2020 14:34
Fix the Pulse Secure VPN HTTPS issue inside WSL 2

This is my solution for:

Pulse Secure VPN

  1. PowerShell: netsh interface ipv4 show subinterface
  2. WSL2: ip link list
  3. WSL2: sudo ip link set dev eth0 mtu 1400

Notes

@falloutphil
falloutphil / 99-noto-mono-color-emoji.conf
Last active June 12, 2020 17:41 — forked from IgnoredAmbience/99-noto-mono-color-emoji.conf
Noto Emoji Color fontconfig for Konsole
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
Noto Mono + Color Emoji Font Configuration for KDE/Konsole
Konsole/KDE apps use QT rather than the GTK emoji setup. So standard Ubuntu setup doesn't seem to work.
https://bugs.launchpad.net/ubuntu/+source/kubuntu-meta/+bug/1767390
If you want the Snake emoji in your Python venv Powerline then see below!
@djfdyuruiry
djfdyuruiry / README.md
Last active March 7, 2024 16:35
WSL 2 - Enabling systemd

Enable systemd in WSL 2

NOTE: If you have Windows 11 there is now an official way to do this in WSL 2, use it if possible - see MS post here (WINDOWS 11 ONLY)

This guide will enable systemd to run as normal under WSL 2. This will enable services like microk8s, docker and many more to just work during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.

  • To enable systemd under WSL we require a tool called systemd-genie

  • Copy the contents of install-sg.sh to a new file /tmp/install-sg.sh:

Guix on WSL2

(updated versions of this document, plus more, live here)

This will show you how to get Guix running on WSL2.
We're going to go as "minimal" as possible, without starting off one of the readily available WSL2 distros.
Parts of this guide should help with understanding how to set up any custom distro on WSL, not just Guix.

Disclaimer: I'm a Guix nOOb! (hence going through the trouble of installing it on WSL2)

@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active April 17, 2024 07:01
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@phaneesh
phaneesh / log4j.properties
Created March 19, 2019 08:48
Rundeck log rotation
log4j.appender.cmd-logger=org.apache.log4j.RollingFileAppender
log4j.appender.cmd-logger.append=true
log4j.appender.cmd-logger.layout=org.apache.log4j.PatternLayout
log4j.appender.cmd-logger.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c - %m%n
log4j.appender.cmd-logger.File=/var/log/rundeck/command.log
log4j.appender.cmd-logger.rollingPolicy=org.apache.log4j.rolling.TimeBasedRollingPolicy
log4j.appender.cmd-logger.rollingPolicy.ActiveFileName=/var/log/rundeck/command.log
log4j.appender.cmd-logger.rollingPolicy.FileNamePattern=/var/log/rundeck/command-%d{yyyy-MM-dd}.log
log4j.appender.cmd-logger.MaxBackupIndex=7
@quanticle
quanticle / org-mode tips.md
Last active June 24, 2021 18:51
Org-mode Tips

Org Mode

  • To have org-mode expand everything by default: M-x customize-variable RET org-startup-folded
  • To insert code-blocks quickly: <s TAB
  • To insert a new bullet/number in the current list: M-RET
  • To promote a heading: M-<left arrow>
  • To demote a heading: M-<right arrow>
  • Hyperlinks:
    • To link to another org-mode file:
@pcornier
pcornier / Termux.Jupyter.md
Created August 8, 2017 12:43
Install Jupyter with Numpy, SciPy, Pandas and Matplotlib
pkg install apt-transport-https curl gnupg pkg-config clang
pkg install freetype freetype-dev libpng libpng-dev libzmq-dev libzmq

mkdir $PREFIX/etc/apt/sources.list.d

echo "deb [trusted=yes] https://its-pointless.github.io/files/ termux extras" > $PREFIX/etc/apt/sources.list.d/pointless.list

curl -O https://its-pointless.github.io/pointless.gpg