Skip to content

Instantly share code, notes, and snippets.

View Monsterovich's full-sized avatar
🏠
Working from home

Monsterovich

🏠
Working from home
View GitHub Profile
// ==UserScript==
// @name Irina Bot Game list Table sorter and plugin
// @version 1.6
// @grant none
// @match https://irinabot.ru/gamelist
// @match https://irinabot.ru/
// @author Monsterovich
// ==/UserScript==
// выкинуть хостботы из списка
@Monsterovich
Monsterovich / WC3 P2P VPN invitation
Last active October 9, 2023 13:12
Our group in discord: discord.gg/7B2fpcjP54
#==============================
#Sun Aug 27 14:03:10 EET 2023
network.bootstrap.DHT=yes
network.bootstrap.connectTo.0=submarine.strangled.net\:2103
network.bootstrap.connectTo.1=192.168.100.3\:2103
network.bootstrap.tracker=http\://p2p.0g.cx\:6969/announce
network.ip.network=10.6.0.0
network.ip.subnet=255.255.0.0
network.name=Warcraft III network
network.publicKey.0=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvG5uVRWzfl7xp879iR3JZ8doCNp+Skad
@Monsterovich
Monsterovich / hack.c
Last active December 24, 2022 22:54
Audacity slider popup dirty fix
// cc -shared `pkg-config --cflags gtk+-3.0` -fPIC -o audacity-slider-hack.so hack.c
#include <dlfcn.h>
#include <stdio.h>
#include <gtk-3.0/gtk/gtk.h>
void *library_handle = NULL;
void (*gtk_window_resize_impl)(GtkWindow *win, gint w, gint h);
#define GTK_LIB "/usr/lib/x86_64-linux-gnu/libgtk-3.so"
#!/usr/bin/env python3
from gi.repository import GLib
from gi.repository import Gio
import os
import time
def onPrepareForSleep(conn, sender, obj, interface, signal, parameters, data):
if not parameters[0]:
@Monsterovich
Monsterovich / headphone.py
Last active July 17, 2021 06:22
Pipewire headphone jack fix
#!/usr/bin/env python
import os
import sys
from subprocess import Popen, PIPE, STDOUT
import time
HEADPHONE_EVENT = "jack/headphone"
p = Popen(["/usr/bin/acpi_listen"],
stdout=PIPE, stderr=STDOUT, bufsize=1)
@Monsterovich
Monsterovich / cmake_uninstall.py
Last active December 8, 2020 23:15
cmake_uninstall script
#!/usr/bin/python3
import sys
import os
import click
if len(sys.argv) < 2:
exit("Usage: cmake_uninstall <install_manifest.txt>")
if os.geteuid() != 0:
@Monsterovich
Monsterovich / xorg.conf
Created August 30, 2017 18:06
Dell Vostro 3000 xorg.conf (touchpad & 2 displays)
Section "InputClass"
Identifier "touchpad catchall"
Driver "synaptics"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Option "TapButton1" "1"
Option "TapButton2" "2"
Option "TapButton3" "3"
EndSection
@Monsterovich
Monsterovich / acsrect.acs
Created July 13, 2017 15:33
ACSRect library
//
// Defines & Variables
//
#define ACSRECTS_NUM_GLOBALS 6
#define ACSRECTS_X 0
#define ACSRECTS_Y 1
#define ACSRECTS_W 2
@Monsterovich
Monsterovich / .asoundrc
Last active June 26, 2018 13:37
Set different volume levels for each app in ALSA (fuck pulseaudio) + you can record sound from soundcard
#
# Defaults
#
# Step 1: Put this file to $HOME
# Step 2: Configure your application http://www.zimagez.com/zimage/2017-03-1121-55-45.php
# Have fun! http://www.zimagez.com/zimage/2017-03-1121-56-31.php
#
# Defaults
#
@Monsterovich
Monsterovich / scgb_launcher.sh
Last active July 8, 2017 15:31
This script runs scgb groups (v4)
#!/bin/bash
scgbdir='/mnt/srvdata/server/scgb-hosts/'
botexe=$scgbdir'main/scgb.py'
config='/config.py'
groupsfile='groups.txt'
time=120
txtpath=$scgbdir''$groupsfile