Skip to content

Instantly share code, notes, and snippets.

View dominsights's full-sized avatar

Dom dominsights

View GitHub Profile
dominsights /
Created January 12, 2023 13:58 — forked from djfdyuruiry/
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 to a new file /tmp/

dominsights / JsonConverter.cs
Created September 2, 2020 14:50
Solution JsonConverter
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
namespace JsonConverter
* Nowadays it's important to know how to work with JSON, in this exercise candidate must convert a HTTP query string into JSON
dominsights / auth.service.ts
Last active March 28, 2019 20:48
Example of implementing a JWT token (login page) using node.js, express and Angular. You'll need the proxy.conf.json to run Angular and node in the same machine (to be able to access /api/login). Use ng serve --proxy-config proxy.conf.json -o.
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { shareReplay, tap, catchError } from 'rxjs/operators';
import * as moment from "moment";
import { User } from './User';
providedIn: 'root'