Skip to content

Instantly share code, notes, and snippets.

09-11 16:11:34.549 2675 2675 I {OngoingActivityDataHelper}: setBaseActivityComponentName:ComponentInfo{com.sec.android.app.launcher/com.sec.android.app.launcher.Launcher}
09-11 16:11:34.549 2675 2675 D InterruptionStateProvider: no Heads up : edgelighting enabled app. 0|org.proninyaroslav.libretorrent|-1|null|10496
09-11 16:11:34.551 1468 1551 I SurfaceFlinger: Capture layer list: Wallpaper BBQ wrapper 7_systemlock#116(seamlessTransition:0)
09-11 16:11:34.552 1468 1551 I SurfaceFlinger: Capture layer list: com.sec.android.app.launcher/com.sec.android.app.launcher.Launcher$_8448#290439(seamlessTransition:0)
09-11 16:11:34.556 8448 8448 I HoneySpace.FloatingAnimator: [Player:A(33.905)] container x: 98.76117, y: 311.0, scale : 0.13611111
09-11 16:11:34.557 8448 8579 I VRI[Launcher]@af0b33a: mWNT: t=0xb400007821e466d0 mBlastBufferQueue=0xb400007881e125d0 fn= 82 HdrRenderState mRenderHdrSdrRatio=1.0 caller= com.android.systemui.shared.launcher.ViewRootImplCompat.mergeWithNextTransaction:4 com.hone
W/SocketClient( 1178): write error (Broken pipe)
W/SocketClient( 1178): write error (Broken pipe)
W/SocketClient( 1178): write error (Broken pipe)
W/SocketClient( 1178): write error (Broken pipe)
W/SocketClient( 1178): write error (Broken pipe)
D/dalvikvm(16629): GC_CONCURRENT freed 4260K, 53% free 5343K/11284K, paused 2ms+1ms, total 8ms
D/dalvikvm(16629): GC_FOR_ALLOC freed 58K, 51% free 5535K/11284K, paused 1ms, total 1ms
I/dalvikvm-heap(16629): Grow heap (frag case) to 7.945MB for 2536932-byte allocation
D/dalvikvm(16629): GC_CONCURRENT freed <1K, 29% free 8012K/11284K, paused 0ms+0ms, total 3ms
D/dalvikvm(16629): WAIT_FOR_CONCURRENT_GC blocked 3ms
@parkerlreed
parkerlreed / ctp500_print.py
Last active July 9, 2025 18:53
Print to the CTP500 thermal printer from Linux using Bluetooth
import sys
import bluetooth
from PIL import Image
import numpy as np
def convert_image_to_escpos_raster(filepath, width=384, dither=False):
# Load RGBA image and separate alpha mask
img_rgba = Image.open(filepath).convert("RGBA")
alpha = img_rgba.getchannel("A")
import sys
import bluetooth
from PIL import Image, ImageOps
import numpy as np
import os
def convert_image_to_bitpacked(filepath, width=384, height=390):
# Load the image with RGBA mode to preserve alpha
img = Image.open(filepath).convert("RGBA")
#!/usr/bin/env python
import sys
import os
import re
import requests
import subprocess
from datetime import datetime, timezone
import shlex
# Relaunch in Konsole if not already in a terminal
@parkerlreed
parkerlreed / ptz_video.py
Created April 6, 2025 19:41
V380 camera viewer and PTZ control
import time
import pygame
import cv2
import numpy as np
from onvif import ONVIFCamera
from threading import Thread, Lock
# ---- Config ----
IP = '192.168.86.21'
RTSP_URL = f'rtsp://{IP}/live/ch00_1'
@parkerlreed
parkerlreed / gist:fc86a67231203d1d9e8bf3abaf8c8ce8
Last active March 12, 2025 13:19
Quest 3 DP alt out not working still on March 12th v74 PTC
[parker@parker-framework ~]$ adb logcat -c
[parker@parker-framework ~]$ adb logcat | grep msm-dp
03-12 09:13:23.075 0 0 I [drm:dp_power_clk_enable][msm-dp-info][13911]core: on link:off strm0:off strm1:off
03-12 09:13:23.076 0 0 I : [drm:dp_display_host_init][msm-dp-info][13911][OK]
03-12 09:13:23.077 0 0 I : [drm:dp_display_host_ready][msm-dp-info][12604][OK]
03-12 09:13:23.134 0 0 I : [drm:dp_panel_read_sink_caps][msm-dp-info][12604]fec_en=0, dsc_en=0, widebus_en=1
03-12 09:13:23.135 0 0 I [drm:dp_link_process_request][msm-dp-info][12604]event: DP_LINK_STATUS_UPDATED
03-12 09:13:23.136 0 0 I [drm:dp_power_clk_enable][msm-dp-info][12604]core: on link:on strm0:off strm1:off
03-12 09:13:23.142 0 0 I : [drm:dp_ctrl_link_train][msm-dp-info][12604]link training #1 successful
03-12 09:13:23.145 0 0 I : [drm:dp_ctrl_link_train][msm-dp-info][12604]link training #2 successful
[Gui]
ExportCloudsDialog\assemble=true
ExportCloudsDialog\assemble_samples=0
ExportCloudsDialog\assemble_voxel=0.01
ExportCloudsDialog\bilateral=false
ExportCloudsDialog\bilateral_sigma_r=0.1
ExportCloudsDialog\bilateral_sigma_s=10
ExportCloudsDialog\binary=true
ExportCloudsDialog\cam_proj=true
ExportCloudsDialog\cam_proj_decimation=1
#!/usr/bin/env python
import sys
import bluepy.btle as btle
import crcmod
from PyQt6.QtWidgets import (
QApplication, QWidget, QPushButton, QVBoxLayout, QSlider, QLabel, QColorDialog
)
from PyQt6.QtCore import Qt
from PyQt6.QtGui import QColor
@parkerlreed
parkerlreed / led.py
Last active March 2, 2025 06:53
Vivitar Studio Light RGBW control
#!/usr/bin/env python
import bluepy.btle as btle
import crcmod
import sys
# Bluetooth device MAC address
DEVICE_MAC = "FC:58:FA:46:B1:77"
# Define CRC-16 function using crcmod
def calculate_crc(data):