This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Create merged input. Merged all output sources. | |
| # Insert this script in /etc/X11/xinit/xinitrc.d/ | |
| if [ "$1" == "-u" ]; then | |
| # Unload the loopback and null sink modules | |
| pactl unload-module module-loopback | |
| pactl unload-module module-null-sink | |
| else | |
| # Exit if already loaded. | |
| if pactl list sources short | grep "combined" &>/dev/null ; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # remove init symlink (or move) | |
| rm /sbin/init | |
| # write preinit | |
| cat > /sbin/init <<EOF | |
| mkdir /run/systemd | |
| touch /run/systemd/journal | |
| exec /lib/systemd/systemd | |
| EOF | |
| # make executable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <gio/gio.h> | |
| #include <stdio.h> | |
| /* gcc glib_screenshot.c -o screenshot `pkg-config --cflags --libs gio-2.0 glib-2.0` */ | |
| static GMainLoop *loop; | |
| /* Response signal handler */ | |
| static void | |
| on_response(GDBusProxy *proxy, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ss -p -x | grep -Eo '".+"' | sort | uniq -c | tr -s " " | sort -Vr | head -n 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import os | |
| import pwd | |
| import grp | |
| import traceback | |
| import pyotp | |
| import json | |
| """ | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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"): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import gi | |
| import socket | |
| import threading | |
| import json | |
| import uuid | |
| import sqlite3 | |
| from time import sleep | |
| machine_id = "unknown" |
NewerOlder