Skip to content

Instantly share code, notes, and snippets.

@TommyB123
TommyB123 / ysi_less.md
Created March 17, 2025 16:56
ysi_less (how to remove YSI from your gamemode and embrace PawnPlus)

Let's Remove YSI

In this very opinionated write-up, we'll go over alternative libraries and plugins that can be used to replace some functionality found in YSI.

Starting

YSI is a set of libraries for SA-MP/open.mp servers that are admittedly useful, but often criticized for their bloated, complicated nature and occasional questionable actions by its main developer. (Sneaking in malicious code to hinder the experience of unassuming SA-MP Android users)

Over the years, people have expressed displeasure when using these libraries since they are over-engineered and can often cause issues that are confusing for less experienced pawn scripters. We'll go over some alternative libraries that are more plug-and-play, are way less hacky and can be used to produce cleaner code. (in my opinion)

PawnPlus

A lot of the libraries and snippets I'll be sending depend on the PawnPlus plugin. PawnPlus is a very neat plugin that greatly expands the potential of pawn scripting in SA

@Pymmdrza
Pymmdrza / useragent-generator.py
Created June 21, 2025 12:09
Generate random user agent in python without any extra packages 📦
# credit by : Pymmdrza.github.io
import random
from datetime import date
OS_CHOICES = {
"Macintosh": ["68K", "PPC", "Intel Mac OS X"],
"Windows": [
"Win3.11",
"WinNT3.51",
"WinNT4.0",
@looztra
looztra / 01-docker-tls.sh
Last active June 21, 2025 12:09
Generate Docker certificates for training on TLS
#!/bin/env bash
# Configuration
export PUBLIC_DNS=<public hostname>
export PUBLIC_IP=<public host IP>
export PRIVATE_IP=<private host IP>
mkdir docker-ca
chmod 0700 docker-ca/
cd docker-ca/
@franklinmoy3
franklinmoy3 / opkg_updater.sh
Last active June 21, 2025 12:06
OpenWRT OPKG update all installed packages
#!/bin/sh
# Example of job definition (as add job using crontab -e):
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
# 30 02 15,28 * * /root/opkg_updater.sh
@Raymo111
Raymo111 / i3lock on wake from sleep or hibernate.md
Last active June 21, 2025 12:03
How to use i3lock to wake from suspend state
@Romern
Romern / spatula-examples.md
Last active June 21, 2025 11:59
Goog-Spatula Header Stuff
@liuran001
liuran001 / config.yaml
Last active June 21, 2025 11:49
mihomo (Clash Meta) 懒人配置
# AFF
# 如果你想支持我,可以通过我的邀请链接购买机场
# 感谢支持
# 1. 倾城极速 邀请码: 0jiB5uAA https://qcjs.ovh/#/register?code=0jiB5uAA
# 2. superbiu 邀请码: fACfjKC8 https://superbiu.com/#/register?code=fACfjKC8
# 一定要填我的邀请码,不填我哭给你看😭
# mihomo (Clash Meta) 懒人配置
# 版本 V1.21-250619
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33
@lidgnulinux
lidgnulinux / Alpine_Linux_minirootfs_install.md
Last active June 21, 2025 11:48
Install Alpine Linux Via Minirootfs Archive.

Install Alpine Linux Via Minirootfs Archive.

Prerequisites.

  • Any live usb bootable.
  • Alpine Linux minirootfs archive, we can get it here. We can choose alpine-minirootfs-3.20.2-x86_64.tar.gz.
  • Some partitions, for root system (/), efi (if you have uefi machine) and swap (optional).
  • Basic commandline knowledge.

Steps.

@ivanjonas
ivanjonas / genshinCenterUxImprovements.js
Last active June 21, 2025 11:41
Genshin-Center.com UX Improvements
// ==UserScript==
// @name UX Improvements
// @namespace Genshin-Center
// @version 1.0.0
// @description Focus on inputs when opening dynamic inventory modals, submit those modals with Enter, and focus on triggering element after dynamic inventory modal is closed.
// @author https://github.com/ivanjonas
// @match https://genshin-center.com/planner
// @icon https://www.google.com/s2/favicons?sz=64&domain=genshin-center.com
// @downloadURL https://gist.github.com/ivanjonas/d52f2351ede998b21512de062e822189/raw
// @updateURL https://gist.github.com/ivanjonas/d52f2351ede998b21512de062e822189/raw
@jcberthon
jcberthon / networkmanager-wifi-powersave.md
Last active June 18, 2025 19:14
NetworkManager Wi-Fi powersaving configuration

NetworkManager WiFi Power Saving

NetworkManager supports WiFi powersaving but the function is rather undocumented.

From the source code: wifi.powersave can have the following value:

  • NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
  • NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don't touch existing setting
  • NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave