Skip to content

Instantly share code, notes, and snippets.

@astrofrog
astrofrog / async_plotting.py
Created December 10, 2011 00:11
Asynchronous Plotting in Matplotlib: rather than call savefig directly, add plots to an asynchronous queue to avoid holding up the main program. Makes use of multiple processes to speed up the writing out. Suggestions welcome!
import time
import multiprocessing as mp
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
@klingtnet
klingtnet / how-to-remove-bloatware-from-android-without-root-using-adb-only.md
Created July 27, 2019 11:10
How to remove bloatware from android without root using adb only

How to remove bloatware from android without root using adb only

  1. Make sure that USB debugging is enabled.
  2. Deactivate all bloatware apps.
  3. List the names of all deactivated packages:
$ adb shell pm list packages -d
<resources>
<string name="settings" translatable="false">Settings</string>
<string name="next" translatable="false">Next</string>
<string name="previous" translatable="false">Prev</string>
<string name="skip" translatable="false">Skip</string>
<string name="faq" translatable="false">FAQ</string>
<string name="mac_address" translatable="false">Mac Address:</string>
<string name="channel" translatable="false">Channel:</string>
@kj800x
kj800x / Hacking the LG Monitor's EDID.md
Last active September 25, 2025 08:22
Hacking the LG Monitor's EDID

preface: Posting these online since it sounds like these notes are somewhat interesting based on a few folks I've shared with. These are semi-rough notes that I basically wrote for myself in case I ever needed to revisit this fix, so keep that in mind.

I recently bought an LG ULTRAGEAR monitor secondhand off of a coworker. I really love it and it's been great so far, but I ran into some minor issues with it in Linux. It works great on both Mac and Windows, but on Linux it displays just a black panel until I use the second monitor to go in and reduce the refresh rate down to 60 Hz.

This has worked decent so far but there's some issues:

  • It doesn't work while linux is booting up. The motherboards boot sequence is visible just fine, but as soon as control is handed over to Linux and I'd normally see a splash screen while I'm waiting for my login window, I see nothing.
  • It doesn't work on the login screen. This would be fine if login consistently worked on my second screen, but I need to manually switch
import configparser
import binascii
import struct
import sys
signature = b'IMAGEWTY'
header_ver = 0x300
header_size = 96
format_ver = 0x100234