Skip to content

Instantly share code, notes, and snippets.

View 0xDE57's full-sized avatar
🧙‍♂️
RISC-V when?

arbitrary hexcode 0xDE57

🧙‍♂️
RISC-V when?
View GitHub Profile
list applications:
adb shell 'pm list packages -f' | sed -e 's/.*=//' | sort
get path for app:
adb shell pm path com.app.name
extract app:
adb pull /path/to/app.apk
@0xDE57
0xDE57 / fix.txt
Created November 14, 2023 01:53
fix multimonitor on plasma kde wayland sddm manjaro
These files are backups that go in ~/.config/
eg: /home/username/.config/
Fix or replace the files. Then log out session and log back in.
In plasmashell.rc: There should never be more than monitors than are physically connected in [ScreenConnectoers]
You can simply delete all entries and log out and log back in and plasmashell should remake the entries for you.
eg: I have 3 monitors:
[ScreenConnectors]
0=HDMI-A-1
@0xDE57
0xDE57 / gist:5d6c6f9db3e927f2fd4d52d5ba464a02
Created February 8, 2024 05:45
return to old shell UI the shows everything properly. i dont like the stupid new rounded corner right-click context menu UI with icons for cut n paste instead of text.
reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
@0xDE57
0xDE57 / OpenSimplex2S.java
Created October 10, 2024 09:04 — forked from KdotJPG/OpenSimplex2S.java
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;
<!DOCTYPE html>
<html>
<body>
<h1 id="cereal">R U 4 Cereal?</h1>
</body>
<script>
var header = document.querySelector("#cereal")
if (navigator.serial) {
@0xDE57
0xDE57 / convertImage.desktop
Last active March 12, 2025 11:23
Add right-click context menu / service menu options to KDE Dolphin to convert images using imagemagick. place in: /usr/share/kio/servicemenus https://develop.kde.org/docs/apps/dolphin/service-menus/
[Desktop Entry]
Type=Service
MimeType=image/*;
Actions=convertToPNG;convertToJPG
X-KDE-Submenu=Convert Image
[Desktop Action convertToPNG]
Name=Convert -> PNG
Icon=background
Exec=magick %u %u.png
@0xDE57
0xDE57 / list_serial.py
Last active July 12, 2025 07:36
simple script to list all serial ports. if port is populated, device info is printed
import os
import serial.tools.list_ports as list_ports
import stat
from pwd import getpwuid
def list_all_ports():
ports = list_ports.comports()
for port in ports:
print(f"Device: {port.device:<15} Path: {port.device_path}")
if (
@0xDE57
0xDE57 / serial_rx.py
Created July 26, 2025 07:41
function to open serial port and listen to messages. be sure to set correct port and baud rate.
import serial
def listen_serial(port, baud_rate):
try:
ser = serial.Serial(port, baud_rate)
print(f"Opened {port} with baud rate {baud_rate}")
while True:
# Read data from the serial port
if ser.in_waiting > 0: