Skip to content

Instantly share code, notes, and snippets.

View farneser's full-sized avatar
❤️
i use arch btw

Sasha Chernov farneser

❤️
i use arch btw
View GitHub Profile
@farneser
farneser / CycledEnum.java
Created August 27, 2023 20:23
cycled enum with any type of value
public enum CycledEnum {
Zero(0), One(1), Two(2), Thre(3), Four(4), Five(5);
public CycledEnum next() {
if (this == Five) {
return Zero;
} else {
return CycledEnum.values()[this.ordinal() + 1];
}
@farneser
farneser / generate_name.py
Created July 16, 2023 10:28
Name generating example
#!/usr/bin/python
# -*- coding: utf-8 -*-
import random
# Lists for generating names
syllables = {
'initial': ['Bo', 'Vla', 'Gor', 'Dra', 'Zhi', 'Zla', 'Iz', 'Ko', 'Ly', 'Mi', 'Nik', 'Ol', 'Pav', 'Rad', 'Svyat',
'Tat', 'Ul', 'Fed', 'Hva', 'Tsvet', ],
'middle': ['mi', 'na', 'mir', 'go', 'mi', 'ra', 'da', 'mir', 'mi', 'vi', 'mir', 'mi', 'la', 'mir', 'mi', 'la', 'mi',
@farneser
farneser / arch-change-ttl.md
Last active November 1, 2024 12:30
Change Arch TTL value

Change arch TTL in one command

sudo echo "net.ipv4.ip_default_ttl=65" > /etc/sysctl.d/99_default_ttl.conf

Check TTL value

sysctl --system
@farneser
farneser / windows-change-ttl.md
Last active April 15, 2025 06:01
How to change TTL on windows 10/11 in on command

Change windows 10/11 TTL in one command and reboot

netsh int ipv4 set glob defaultcurhoplimit=65

Check TTL value

ping 1.1.1.1