Skip to content

Instantly share code, notes, and snippets.

View thenger's full-sized avatar
🌀
🦔🐉

thenger

🌀
🦔🐉
View GitHub Profile
@thenger
thenger / subprocess_stdout_instantly.py
Created April 29, 2020 09:38
Python display subprocess stdout in real time
# Redirect stderr and stdout of a subprocess to the python ones
def exec_cmd_with_output(cmd):
stdoutlines = []
a_process = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
while a_process.poll() is None:
line = a_process.stdout.readline()
stdoutlines.append(line)
sys.stdout.write(line.decode(sys.stdout.encoding))
@thenger
thenger / No_lock_screen_and_no_blur.md
Last active August 3, 2021 18:36
On windows 10 when you want directly a login screen without blur

Windows 10 no lock screen and no blur on login screen

No lock screen (pre login screen):

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization\NoLockScreen DWORD=1

New-Item -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization
New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization -Name NoLockScreen -PropertyType DWord -Value 1