Skip to content

Instantly share code, notes, and snippets.

View jyxjjj's full-sized avatar
🇳🇱
NL

ShenLin jyxjjj

🇳🇱
NL
View GitHub Profile
@jyxjjj
jyxjjj / direct.xml
Created August 20, 2025 05:06
FirewallD randomizing outbound IPv6 source IP selection
<?xml version="1.0" encoding="utf-8"?>
<direct>
<!-- probability: P(i) = 1 / (N - (i - 1)) -->
<rule ipv="ipv6" table="nat" chain="POSTROUTING" priority="0">-m statistic --mode random --probability 0.0625 -j SNAT --to-source 2::::::0</rule>
<rule ipv="ipv6" table="nat" chain="POSTROUTING" priority="0">-m statistic --mode random --probability 0.0667 -j SNAT --to-source 2::::::1</rule>
<rule ipv="ipv6" table="nat" chain="POSTROUTING" priority="0">-m statistic --mode random --probability 0.0714 -j SNAT --to-source 2::::::2</rule>
<rule ipv="ipv6" table="nat" chain="POSTROUTING" priority="0">-m statistic --mode random --probability 0.0769 -j SNAT --to-source 2::::::3</rule>
<rule ipv="ipv6" table="nat" chain="POSTROUTING" priority="0">-m statistic --mode random --probability 0.0833 -j SNAT --to-source 2::::::4</rule>
<rule ipv="ipv6" table="nat" chain="POSTROUTING" priority="0">-m statistic --mode random --probability 0.0909 -j SNAT --to-source 2::::::5</rule>
<rule ipv="ipv6" table="nat" chain="P
@jyxjjj
jyxjjj / SupervisorMonitor.go
Created June 26, 2025 09:30
Supervisor Monitor
package main
import (
"bytes"
"encoding/xml"
"fmt"
"io"
"net"
"net/http"
"strings"
@jyxjjj
jyxjjj / .SwiftBar.Plugin.SSH
Last active June 26, 2025 02:59
SwiftBar SSH
# RENAME functions script with hidden dot `.SSH.functions.sh`
@jyxjjj
jyxjjj / DecryptChromeCookies.php
Last active June 6, 2025 06:35
Decrypt Chrome Cookies
<?php /** @noinspection PhpComposerExtensionStubsInspection */
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Process;
use SQLite3;
class DecryptChromeCookies extends Command
{
@jyxjjj
jyxjjj / MariaDBError.php
Created September 8, 2023 07:00
Temporary MariaDB Error Codes Enum
<?php
namespace DESMG\MariaDB\V11_0_2;
enum MariaDBError: int
{
/** hashchk */
case ER_HASHCHK = 1000;
/** isamchk */
case ER_NISAMCHK = 1001;
@jyxjjj
jyxjjj / performance.sh
Last active January 7, 2025 04:43
<CPU Freq Settings On Linux> (Updated to `Intel Core I3-13100`)
#!/bin/bash
for i in {0..7}; do
# min cpu freq to 3.4GHz
echo 3400000 > "/sys/devices/system/cpu/cpu$i/cpufreq/scaling_min_freq"
# set max cpu freq to 4.5GHz
echo 4500000 > "/sys/devices/system/cpu/cpu$i/cpufreq/scaling_max_freq"
# set cpu preference to performance
echo performance > "/sys/devices/system/cpu/cpu$i/cpufreq/energy_performance_preference"
# set cpu governor to performance
echo performance > "/sys/devices/system/cpu/cpu$i/cpufreq/scaling_governor"
@jyxjjj
jyxjjj / GET.php
Last active June 6, 2025 06:36
PHP cURL Clients
<?php
function GET($url, $user_agent = 'CURL', $proxy_type = CURLPROXY_SOCKS5_HOSTNAME, $proxy = null, $header = null, $timeout = 10)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
$header != null && curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
$proxy != null && curl_setopt($ch, CURLOPT_PROXYTYPE, $proxy_type);
$proxy != null && curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@jyxjjj
jyxjjj / tmooc.py
Last active August 9, 2021 04:08
Tmooc Downloader - To generate TMOOC videos' download links and ffmpeg commands.
#-*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
import re
import time
import os, sys
from urllib import parse