Skip to content

Instantly share code, notes, and snippets.

View sulincix's full-sized avatar
🇹🇷

​​ sulincix

🇹🇷
View GitHub Profile
@sulincix
sulincix / pyxidle.py
Created December 1, 2025 09:10
Python X11 idle time
#!/usr/bin/env python3
# https://github.com/g0hl1n/xprintidle/blob/master/xprintidle.c
import ctypes
class XScreenSaverInfo( ctypes.Structure ):
_fields_ = [("window", ctypes.c_ulong),
("state", ctypes.c_int),
("kind", ctypes.c_int),
("since", ctypes.c_ulong),
("idle", ctypes.c_ulong),
("event_mask", ctypes.c_ulong)]
@sulincix
sulincix / install.sh
Last active November 18, 2025 22:18
OpenWRT Usb tethering
# update repository
opkg update
# install packages
opkg install \
kmod-nls-base \
kmod-usb2 \
kmod-usb-core \
kmod-usb-net \
kmod-usb-net-cdc-ether \
kmod-usb-net-rndis \
@sulincix
sulincix / parse.py
Last active November 14, 2025 11:24
Parse nvidia gpu names from nvidia site
mport requests
import json
site = "https://download.nvidia.com/XFree86/Linux-x86_64/580.105.08/README/supportedchips.html"
data = requests.get(site).text
e=False
ret = {}
name = ""
for line in data.split("\n"):
@sulincix
sulincix / read_moditor_name.py
Created October 13, 2025 11:58
Read monitor name from edid file
#!/usr/bin/env python3
# https://en.wikipedia.org/wiki/Extended_Display_Identification_Data
edid_file = "/sys/class/drm/card1-eDP-1/edid"
with open(edid_file,"rb") as f:
edid = f.read()
name = ""
for c in edid[0x4d:]:
if chr(c).isprintable():
name += chr(c)
else:
@sulincix
sulincix / broadchat.py
Created August 6, 2025 14:36
Chat application uses gtk3 and udp broadcast
import os
import gi
import socket
import threading
import json
import uuid
import sqlite3
from time import sleep
machine_id = "unknown"
@sulincix
sulincix / live-build.md
Last active July 29, 2025 06:33
debian-live

live build ile iso yapmak

Gerekli paketlerin kurulması

Gerekli paketleri yüklemek için:

apt install live-build xorriso mtools

profil oluşturma

Öncelikle profil oluşturmamız gereklidir.

@sulincix
sulincix / main.py
Created June 11, 2025 08:51
Input lag calculator
#!/usr/bin/env python3
import gi
import time
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GLib
cur = int(time.time()*10**6)
diff_min = 10**6
@sulincix
sulincix / list.txt
Last active June 5, 2025 09:08
insecure username (extracted from spam ssh attack)
!
!!!
"
">
#
#$
$
$USER
%
&
@sulincix
sulincix / lcd-fix.cpp
Created May 29, 2025 18:08
Simple qt application that may fix lcd bad pixel
#include <QApplication>
#include <QMainWindow>
#include <QPalette>
#include <QTimer>
/* For compile:
g++ main.cpp -o lcd-fix $(pkg-config --cflags --libs Qt6Widgets Qt6Core Qt6Gui) -fPIC
*/
static QMainWindow *mainWindow;
@sulincix
sulincix / Paket-yamalama.md
Last active July 28, 2025 10:43
Debian paket yapımı ve sürdürülmesi

Debianda var olan paketi yamalamak

Öncelikle düzenlenecek olan paketi git üzerinden çekin.

git clone <upstream-git-adresi>

Ardından içine girip gbp ile yama dalı oluşturun.

cd hello
gbp pq import