Skip to content

Instantly share code, notes, and snippets.

View Nullizer's full-sized avatar
💭
Want a remote job

Nullizer Nullizer

💭
Want a remote job
View GitHub Profile
@Bluefissure
Bluefissure / pal-scripts.md
Last active April 3, 2025 02:48
Some Useful PalWorld Scripts

Pal World Scripts (Linux & Bash)

Remember to replace the folder directory, <AdminPassword>, <RCONPort> to your own.

Also, you need to use crontab to schedule the following scripts if necessary.

Supervisor

I'm using supervisor to restart the service, the example config is as:

@sindresorhus
sindresorhus / esm-package.md
Last active April 26, 2025 12:29
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@probonopd
probonopd / Wayland.md
Last active April 27, 2025 19:14
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.


As 2024 is winding down:

@The-Fireplace
The-Fireplace / WHY NO FORGE.md
Last active October 21, 2024 11:47
A brief summary of why I am not currently supporting Forge

So, as I update mods and switch more of them over to Fabric, I'm sure I'll frequently get asked "Will you port to Forge" or "Why not Forge," so I figured I'd make a document explaining why and link to it instead of typing up the explanation every time.

The Short Version

Maintaining mods for two different mod loaders is time consuming, and when choosing between them, Fabric is the clear choice to me. If I ever get to the point where my mods are all updated, I will consider porting mods to Forge on a case-by-case basis, but it will not be a priority. The lead developer of Forge, LexManos, has essentially told me he will not support features that allow me to update at least one of my mods past 1.12.2, and on top of that, he did so very rudely while treating me like a complete idiot for trying to make it possible to continue using Forge for that mod. I am not the only person he has treated in this manner, and I do not support this kind of toxic behavior.

But how does Fabric compare to Forge?

I've conside

@LambdAurora
LambdAurora / optifine_alternatives_fabric.md
Last active February 3, 2025 09:49
Recommended OptiFine alternatives on Fabric

The list is moving out!

If you share this list, please use this link instead: https://lambdaurora.dev/optifine_alternatives

It may still be only a redirection link, but it will have a better web display of the list soon. And the list being on GitHub/GitHub pages improves load times.

The gist version of this list will stop being updated.

Why?

@nrdmn
nrdmn / vsock-notes.md
Last active April 23, 2025 01:53
vsock notes

vsock notes

about vsocks

Vsocks are a means of providing socket communication (either stream or datagram) directly between VMs and their host operating system. The host and each VM have a 32 bit CID (Context IDentifier) and may connect or bind to a 32 bit port number. Ports < 1024 are privileged ports.

@spajak
spajak / IPv6.ps1
Last active January 8, 2025 03:02
Disable random IPv6 addresses and use SLAAC IPv6 (Windows 10)
# Disable random IPv6 addresses (but keep temporary addresses),
# and use SLAAC address as a preferred IPv6 address in Windows 10
# ------------------------------------------------------------------------------
# UseTemporaryAddresses
#
# Always. The computer always generates temporary addresses by using random numbers.
# Counter. The computer generates temporary addresses by using the interface identifier.
# You typically use this identifier for test purposes.
# Disabled. The computer does not use temporary addresses.
@lilydjwg
lilydjwg / gh-check
Last active March 20, 2025 01:02
gh-check: speed test to known GitHub IPs
#!/usr/bin/python3
import asyncio
import time
import socket
import argparse
import aiohttp
class MyConnector(aiohttp.TCPConnector):
@klzgrad
klzgrad / Traffic analysis survey.md
Last active April 25, 2025 12:25
流量分类调研

为什么流量可以进行分类

这里的“流量”一般定义为中间人观测到的一组由(时间,方向,包大小)元数据组成的序列 [Cai2014]。其源头是应用层的读写操作,经过传输层协议的变换(分片、协议状态机、加密等),流量序列产生一定变化。但是这种变化非常有限,因为流量的发生过程本质是确定性的,随机因素较小,因此对于特定环境中的特定应用(浏览器访问 google.com)各种流量特征体现出相当大的一致性和独特性,这就使“从流量特征识别应用”的监督学习问题成为可能。虽然有若干不利因素使得确定性下降,例如多层次上软件多版本的排列组合爆炸、有状态的缓存、流水线和连接复用、用户随机行为,但是因为版本的幂律分布、应用层读写操作间的依赖关系、流量特征和检测算法的改进等原因,分类依然具有相当的可行性。

分类的对象:流量应用分类与网站指纹攻击

根据分类的对象产生了两个相近但是不同的研究领域。从流量特征中分类应用类型的被称为流量分类(traffic classification),从流量特征中分类所访问网站或者网页的被称为网站指纹(website fingerprinting)。以机器学习的方法而论前者是比后者更弱但本质相同的一个问题。

这两类攻击的威胁类型不同。流量分类威胁的是可用性,如果GFW检出流量是隧道应用然后进行封锁,则破坏了可用性。而网站指纹威胁的是匿名性和隐私,如果从隐秘流量中检出是谁在访问哪个网站,则破坏了匿名性,丝绸之路就是这样被FBI破获的。

@rlei
rlei / sshguard_banned_ips.sh
Last active March 7, 2020 13:08
Generate CSV of country/city/geo location/ISP information of the IPs banned by sshguard. Requires jq (https://stedolan.github.io/jq/).
#!/bin/sh
echo '"country","city","latitude","longitude","ISP","organization","IP"'
sudo iptables-save | grep sshguard | grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+' | xargs -I{} curl -s http://ip-api.com/json/{} | jq -r '[.country, .city, .lat, .lon, .isp, .org, .query] | @csv'