Skip to content

Instantly share code, notes, and snippets.

View outiy5's full-sized avatar

Antony Wood outiy5

View GitHub Profile
# 0. ON WINDOWS :
# On windows, to check which WSL you use, type ` wsl --list --verbose ` in admin cmd.
# If you are not in WSL2, reinstall the machine with WSL2 : https://docs.microsoft.com/fr-fr/windows/wsl/install-win10
# 1. Make sure you are running with systemd
# sudo systemctl must not say "Failed to connect to bus"
# If so, I recommand you to reinstall the VM. You can try this repo too : https://github.com/DamionGans/ubuntu-wsl2-systemd-script.git
# 2. On WSL2 machine
# /!\ Create an user with A PASSWORD and with sudo access
@outiy5
outiy5 / x11_forwarding_macos_docker.md
Created May 23, 2022 07:27 — forked from sorny/x11_forwarding_macos_docker.md
X11 forwarding with macOS and Docker

X11 forwarding on macOS and docker

A quick guide on how to setup X11 forwarding on macOS when using docker containers requiring a DISPLAY.

This guide was tested on:

  • macOS Catalina 10.15.4
  • docker desktop 2.2.0.5 (43884) - stable release
  • XQuartz 2.7.11 (xorg-server 1.18.4)

Step-By-Step Guide

"""
run python web.rewrite.example.py
and then open a browser to localhost:8080/data/foo/bar
The two segments of the path below /data are transformed into query
arguments using the rewrite function pathToArgs.
The root resource is wrapped with the rewrite resource
The second arg to RewriterResource is the rewrite function.
@outiy5
outiy5 / web-servers.md
Created July 23, 2020 10:47 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000