Skip to content

Instantly share code, notes, and snippets.

View akarasulu's full-sized avatar

Alex Karasulu akarasulu

View GitHub Profile
@thomas-maurice
thomas-maurice / setup-net.sh
Last active March 20, 2024 20:52
Setup the openwrt networks
#!/bin/bash
set -eo pipefail
# List of bridges to create space delimited
bridges="sw-r0-eth0 sw-r0-eth1 sw-r0-eth2 sw-r0-eth3"
# Veths peirs to create with the following format, space delimited
# <veth dev 1>[|options]:<veth dev 1>[|options]
# where options are a comma delimited key=values pair
# options: master=<master bridge> or dhcp
@djfdyuruiry
djfdyuruiry / README.md
Last active October 8, 2024 04:54
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:

@pmav99
pmav99 / config2.json
Last active June 15, 2022 14:56
Python logging configuration using JSON. If you want an updated example also covering YAML files, check here: https://github.com/pmav99/python-logging-example
{
"logging": {
"version": 1,
"disable_existing_loggers": true,
"formatters": {
"brief": {
"class": "logging.Formatter",
"datefmt": "%I:%M:%S",
"format": "%(levelname)-8s; %(name)-15s; %(message)s"
},