Skip to content

Instantly share code, notes, and snippets.


Mo Ismailzai moismailzai

View GitHub Profile
moismailzai /
Created June 5, 2022 03:27 — forked from djfdyuruiry/
WSL 2 - Enabling systemd

Enable systemd in WSL 2

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 to a new file /tmp/

    cd /tmp
moismailzai / tmux-cheatsheet.markdown
Created March 7, 2021 06:34 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
View gist:cb3218150d49c57cfcac472a76eaaf39
byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings
F2 - Create a new window
F3 - Move to previous window
F4 - Move to next window
moismailzai /
Created November 9, 2018 23:32 — forked from andrezrv/
Purge all Varnish cache.
# Purge all Varnish cache
varnishadm "ban req.url ~ /"
moismailzai / .travis.yml
Created November 6, 2018 04:24 — forked from jonfriesen/.travis.yml
Example .travis.yml for Golang with integration
View .travis.yml
language: go
# Only the last two Go releases are supported by the Go team with security
# updates. Any versions older than that should be considered deprecated.
# Don't bother testing with them. tip builds your code with the latest
# development version of Go. This can warn you that your code will break
# in the next version of Go. Don't worry! Later we declare that test runs
# are allowed to fail on Go tip.
- 1.9
moismailzai /
Last active September 3, 2018 08:28 — forked from jdowning/
Script to clean up Ubuntu Vagrant box before packaging
# This script zeroes out any space not needed for packaging a new Ubuntu Vagrant base box.
# Run the following command in a root shell:
# bash <(curl -s
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
moismailzai /
Last active April 5, 2017 01:50 — forked from w00fz/
PHP switcher
# Check if command was ran as root.
if [[ $(id -u) -eq 0 ]]; then
echo "The command \"sphp\" should not be executed as root or via sudo directly."
echo "When a service requires root access, you will be prompted for a password as needed."
exit 1
# Usage