Skip to content

Instantly share code, notes, and snippets.

View brucevanhorn2's full-sized avatar
💭
I may be slow to respond.

Bruce M. Van Horn II brucevanhorn2

💭
I may be slow to respond.
View GitHub Profile
@brucevanhorn2
brucevanhorn2 / README.md
Created October 7, 2022 04:32 — forked from djfdyuruiry/README.md
WSL 2 - Enabling systemd

Enable systemd in WSL 2

NOTE: There is now an official way to do this in WSL 2, use it if possible - see MS post here

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:

@brucevanhorn2
brucevanhorn2 / snakecoin-block.py
Created February 23, 2018 21:28 — forked from aunyks/snakecoin-block.py
The block structure for SnakeCoin.
import hashlib as hasher
class Block:
def __init__(self, index, timestamp, data, previous_hash):
self.index = index
self.timestamp = timestamp
self.data = data
self.previous_hash = previous_hash
self.hash = self.hash_block()