Skip to content

Instantly share code, notes, and snippets.

View Cha14ka's full-sized avatar

Cha14ka Cha14ka

View GitHub Profile
# Show troubleshooting information in error_log.
LogLevel debug
MaxLogSize 0
ErrorPolicy stop-printer
# Allow remote access
Port 631
Listen /run/cups/cups.sock
Browsing Yes
BrowseLocalProtocols dnssd
DefaultAuthType Basic
@Cha14ka
Cha14ka / gi_history.sh
Created February 1, 2024 09:30
Genshin Wish history for Linux
#!/bin/bash
GIPATH=$(ps aux | grep -a -Po 'Z:.+GenshinImpact.exe' | head -1 | sed -e 's/Z://' | sed -e 's/GenshinImpact.exe//' | tr '\\' '/' | sed s/'\W*$'//)
CACHEDIR=$GIPATH/GenshinImpact_Data/webCaches
CACHEDIR=$CACHEDIR/$(ls -t "$CACHEDIR" | grep -a -Po "\d+.\d+.\d+.\d" | head -1)
CACHEFILE=$CACHEDIR/Cache/Cache_Data/data_2
cat "$CACHEFILE" | grep -a -Po '(https:\/\/gs\.hoyoverse\.com\/genshin\/event\/e20190909gacha-v2.+?hk4e_global)\W' | tail -n 1
@Cha14ka
Cha14ka / hsr_rolls.py
Last active September 10, 2023 09:16
#!/usr/bin/python
import re
import subprocess
hsr_process = subprocess.run(
'ps aux | grep "StarRail.exe"',
shell=True,
stdout=subprocess.PIPE
).stdout.decode().split('\n')[0]
@Cha14ka
Cha14ka / gist:fd6f82c431557945c0b563202293d4c2
Created March 7, 2020 22:47
Русский шрифт в Source играх Valve на OS Manjaro (Team Fortress 2, Counter Strike)
sudo pacman -S ttf-arphic-uming ttf-arphic-ukai wqy-zenhei
fc-cache -f -v