Skip to content

Instantly share code, notes, and snippets.

View hydrargyrum's full-sized avatar

hydrargyrum

View GitHub Profile
@namuan
namuan / floating_button_widget.py
Created January 2, 2020 10:25
PyQt5 Floating button on top of QPlainTextEdit
import sys
from PyQt5 import QtCore
from PyQt5 import QtWidgets
class FloatingButtonWidget(QtWidgets.QPushButton):
def __init__(self, parent):
super().__init__(parent)
@xkikeg
xkikeg / zshhist.py
Last active September 20, 2023 07:55
Convert ZSH history file (.zsh_history file) between original weird encoding and proper UTF-8.
#!/usr/bin/env python3
"""
ZSH history convert script.
When you mistakenly type your password or quite bad command into ZSH,
you may want to remove the entry from the history.
The problem is, the .zsh_history is encoded in a weird format!
If you want to find a command with non-ASCII character, it'll be problematic.