Skip to content

Instantly share code, notes, and snippets.


Mo Ismailzai moismailzai

View GitHub Profile
djfdyuruiry /
Last active Aug 16, 2022
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
ibaiul /
Last active Apr 30, 2022
Configure the protonmail bridge linux client on CentOS server and Fedora

Protonmail on CentOS server

#protonmail #centos #fedora #linux

Before you start

Currently protonmail bridge for linux is distributed as part of an open beta program, but soon it will be made public (

Consider that the bridge linux client requires a paid protonmail account to work.

Get the protonmail bridge linux installer

jonfriesen / .travis.yml
Last active Mar 20, 2021 — forked from ryboe/.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
w00fz /
Last active Feb 7, 2022
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
gabrielelana / Vagrantfile
Last active Feb 6, 2021
How to create a VirtualBox machine with encrypted storage with Vagrant
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
PASSWORD_PATH = ".password"
PASSWORD_ID_PATH = ".password_id"
# Make sure to have installed vagrant-triggers plugin
# > vagrant plugin install vagrant-triggers
# After the first `vagrant up` stop the VM and execute the following steps
andrezrv /
Created Nov 2, 2013
Purge all Varnish cache.
# Purge all Varnish cache
varnishadm "ban req.url ~ /"
hakre / DateInterval_11556731.php
Created Jul 19, 2012
How we can add two date intervals in PHP
View DateInterval_11556731.php
* How we can add two date intervals in PHP
* @link
* @link
* NOTE: This code is rough.
header("Content-Type: text/plain;");
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname