Skip to content

Instantly share code, notes, and snippets.

View sl5net's full-sized avatar
🏠
Working from home

sl5net

🏠
Working from home
View GitHub Profile
@sl5net
sl5net / gist:06e9e7664603fa9385461aa68aa9720e
Created February 13, 2025 13:49
delete-small-replay-folders.sh
```sh
# ~/.local/share/0ad/replays/0.27.0/delete-small-replay-folders.sh
#!/bin/bash
# Set the size threshold in bytes (50KB = 50 * 1024 bytes)
SIZE_THRESHOLD=$((50 * 1024))
# Function to check if a directory is smaller than the threshold
@sl5net
sl5net / BBC-Radio-HLS.m3u
Created January 22, 2025 11:47 — forked from bpsib/BBC-Radio-HLS.m3u
BBC Radio Streams
#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://as-hls-ww-live.akamaized.net/pool_01505109/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Xtra
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_1xtra/bbc_1xtra.isml/bbc_1xtra-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Dance
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one_dance/bbc_radio_one_dance.isml/bbc_radio_one_dance-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1 Anthems (UK Only)
http://as-hls-uk-live.akamaized.net/pool_904/live/uk/bbc_radio_one_anthems/bbc_radio_one_anthems.isml/bbc_radio_one_anthems-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 2
@sl5net
sl5net / 0ad_TTS_userCfg.py
Created December 31, 2022 09:39
sends the sting of your user.cfg behind AudioTTS.timestamp to espeak
# this speaks what you send from your mode.
# howToUseIt:
from pathlib import Path
home = str(Path.home())
#userCfgPath = home + "/.config/0ad/config/user.cfg" # if github installation or so
userCfgPath = home + "/snap/0ad/current/.config/0ad/config/user.cfg" # if snap installation
# install:
# its for 0ad helpers only 22-1112_2304-06
# i use it as autoKey-script script
ac = window.get_active_class()
if "Pidgin.Pidgin" == ac:
c = clipboard.get_clipboard()
# c = "aa bb cc" # test string
keyboard.send_keys("!mute 1 day -r profanity<home><ctrl>+<right> ") # paste and move to playerName Position
keyboard.send_keys(c.split(" ", 1)[0]) # paste only the first word
@sl5net
sl5net / local.cfg
Last active July 13, 2022 01:59
local.cfg
UserRatingBackup = "1075"
adaptivefps.menu = "43.59925842285156"
adaptivefps.session = "24.601099014282227"
autociv.data.mute = "%7B%7D"
autociv.data.playerReminder = "%7B%22jews%22%3A%22Warning%3AleftAlwaysInSeconds%22%2C%22ELBOTIJA%22%3A%22Warning%3AleftAlwaysInSeconds%22%2C%22._%22%3A%22Warning%3AleftAlwaysInSeconds%22%2C%22todolomeo%22%3A%22Warning%3AleftAlwaysInSeconds%22%2C%22yasa.baris%22%3A%22Warning%3AleftAlwaysInSeconds%22%2C%22Higgs%22%3A%22Warning%3AleftAlwaysInSeconds%22%7D"
autociv.data.playersBox = "%7B%22selected_column%22%3A%22rating%22%2C%22selected_column_order%22%3A-1%7D"
autociv.gamesetup.countdown.enabled = "false"
autociv.gamesetup.countdown.time = "5"
autociv.lobby.chat.subject.hide = "true"
autociv.lobby.gamelist.showHostName = "true"
@sl5net
sl5net / Dead Poets Society, 1989
Created January 29, 2022 11:19
beautify hotkeys
Carpe diem. Seize the day, boys.
@sl5net
sl5net / local.cfg.temp
Last active February 27, 2022 17:41
local.cfg.temp
UserRatingBackup = "1076"
adaptivefps.menu = "43.59925842285156"
adaptivefps.session = "24.601099014282227"
autociv.data.mute = "%7B%7D"
autociv.data.playersBox = "%7B%22selected_column%22%3A%22rating%22%2C%22selected_column_order%22%3A-1%7D"
autociv.gamesetup.countdown.enabled = "false"
autociv.gamesetup.countdown.time = "5"
autociv.lobby.chat.subject.hide = "true"
autociv.lobby.gamelist.showHostName = "true"
autociv.mainmenu.suggestDefaultChanges = "false"
That'll do, pig. That'll do.
autociv.data.mute = "%7B%7D"
autociv.data.playerReminder = "%7B%7D"
autociv.data.stanza = "%7B%7D"
autociv.gamesetup.countdown.enabled = "false"
autociv.gamesetup.countdown.time = "5"
autociv.lobby.chat.subject.hide = "true"
autociv.lobby.gamelist.showHostName = "false"
autociv.resizebar.enabled = "true"
autociv.session.APM.chart.enabled = "false"
autociv.session.APM.enabled = "false"
@sl5net
sl5net / firstLetter.autokey.py
Last active March 20, 2021 22:51
0AD build everything by pressing first letter
#####################################################
# you must be root to use keyboard the following:
# sudo apt install python3-pip
# pip3 install keyboard
# sudo autokey
#####################################################
#####################################################
# Disable Ubuntu Shortcuts:
# Super+L (global shortcuts: use it for audio and then delete it)