Skip to content

Instantly share code, notes, and snippets.

View b2ag's full-sized avatar
🙃

Thomas b2ag

🙃
View GitHub Profile
@kylemanna
kylemanna / eth.network
Created May 11, 2017 00:01
How to prevent systemd-networkd from breaking nfsroots
# /etc/systemd/network/eth.network
# Pass nfsroot=... on the kernel command line as you'd expect
[Match]
Name=eth*
KernelCommandLine=!nfsroot
[Network]
DHCP=v4
[DHCPv4]
@sweenzor
sweenzor / subprocessdemote.py
Created January 26, 2012 23:08
Run python subprocess(es) as another user
#!/usr/bin/env python
import os
import subprocess
# > python subprocessdemote.py
# > sudo python subprocessdemote.py
def check_username():