Skip to content

Instantly share code, notes, and snippets.

View adlerweb's full-sized avatar

Florian Knodt adlerweb

View GitHub Profile
@adlerweb
adlerweb / redis-mygrate.py
Last active April 13, 2020 13:19 — forked from romanmah/redis-mygrate.py
A small utility to dump/restore serialized redis data to text files
#!/usr/bin/python
import redis
import pickle
import argparse
class RedisMigrate():
def __init__(self, host, port, db):
@adlerweb
adlerweb / res-change.py
Last active July 13, 2024 00:11 — forked from sohailshaukat/res-change.sh
Linux Screen Resolution Change script
#!/usr/bin/env python3
import argparse
import subprocess
def set_resolution(output, mode, refresh, apply):
modeline = False
width, height = mode.split('x')
gtf_cmd = f"gtf {width} {height} {refresh}"
gtf_output = subprocess.check_output(gtf_cmd, shell=True, text=True)