Skip to content

Instantly share code, notes, and snippets.

View catb0t's full-sized avatar
💭
hmm

Cat Stevens catb0t

💭
hmm
View GitHub Profile
@catb0t
catb0t / cpulimit-apps
Last active September 4, 2025 16:30
automatically cpulimit heavy apps on battery power, like Floorp (Firefox) and Pulsar (Atom)
## as root, create mode 0644 /etc/acpi/events/cpulimit-apps
event=ac_adapter
action=/etc/acpi/actions/cpulimit-apps.bash %e
@catb0t
catb0t / launch-editor.bash
Last active September 3, 2025 20:49
Launch-editor - Launch your favourite editor in a saved directory, or type a new directory to be saved
#!/bin/bash
# Requires Python3 and `tput` from ncurses-bin
launch-editor () {
EDITOR="pulsar"
history_file="$HOME/.launch-editor_history"
have_history=0
number=1

factoring and symbolic algebra

factor gets its name from the fact that factor code is easy to factor. factoring is, like in elementary algebra, a compression scheme whereby common information is separated. consider the following:

lyrics from the hit dmx song, party up
y'all gonna make me lose my mind
up in here, up in here
y'all gonna make me act a fool
up in here, up in here
@Cajivah
Cajivah / tidal_login.py
Last active April 29, 2026 09:28 — forked from nsyntych/tidal_login.py
Login to tidal API using PKCE and update strawberry player settings to support Hi-Res Lossless playback
#!/usr/bin/python3
import tidalapi
import json
from pathlib import Path
from configparser import ConfigParser
strawberry_conf_file_path = str(Path.home()) + "/.config/strawberry/strawberry.conf"
strawberry_conf_file = ConfigParser()

Additional settings for Tokyo Xtreme Racer, HDR, VSM, Streaming, Weather, Time of Day and more

This UE4SS script will allow you to adjust render settings in Tokyo Xtreme Racer.

Updated for v1.0.1 Release :)

This allows you to:

  • Enable Virtual Shadow Maps, more crisp and accurate shadows
  • Disable textures streaming. Game will load all texture assets on level load to reduce CPU overhead at a cost of memory usage. Requires 8GB GPU or better.
  • Enable Lumen reflections
@nsyntych
nsyntych / tidal_login.py
Created October 21, 2024 22:41
Login to tidal API using PKCE and update strawberry player settings to support Hi-Res Lossless playback
#!/usr/bin/python3
import tidalapi
import json
from pathlib import Path
from configparser import ConfigParser
strawberry_conf_file_path = str(Path.home()) + "/.config/strawberry/strawberry.conf"
strawberry_conf_file = ConfigParser()
@themanyone
themanyone / SETUID.md
Created October 4, 2024 07:40
make a script always run as root

How to make a script always run as root

Operation not permitted. Could it be because it is a bash script?

The error message Operation not permitted can occur because you are attempting to set the setuid bit on a Bash script.

Most modern Unix-like operating systems, including Linux, ignore the setuid bit on scripts for security reasons. Setting setuid on scripts can lead to various security vulnerabilities, such as privilege escalation attacks, which is why the operating system typically disallows it.

Why setuid Doesn’t Work on Scripts

@klange
klange / _.md
Last active September 30, 2026 13:28
15 Years of ToaruOS

15 Years of ToaruOS

This is a repost and update to an imgur album with screenshots of ToaruOS throughout its development, as imgur is no longer a viable platform for maintaining this collection.

Early Development

My first commit in the ToaruOS repository, ecd4fe2bc170b01ad700ff76c16da96993805355, was made on January 15th, 2011. This date has become ToaruOS's "birthday". It would be another six years and two weeks before ToaruOS's first real release, 1.0.

1 - eL4aHBZ - Humble Beginnings

interface val Auth
fun val apply[B: Auth val](): B ? =>
this as B
fun val add(that: Auth): AuthSet =>
AuthSet(this, that)
class val AuthSet is Auth
let _a: Auth
let _b: Auth
@jemc
jemc / comp-sci-notation.md
Last active January 17, 2022 18:42
An informal glossary of formal notation commonly used in academic papers relevant to computer science

Overview

Laypersons who are not trained in the relevant formal notation may sometimes feel lost when trying to read academic papers on computer science.

This gist is intended to be a short introductory "cheat sheet" for some of the symbols we may encounter in such papers, to help make the work more accessible to a broader audience, particularly those working in the software industry looking to gain a deeper understanding into formal computer science.

In addition to this introductory glossary of symbols, it may also be helpful to reference this glossary of terms so that the formal usage of certain words can be known to the reader.

One can also read a great bit more detail on this topic in The Formal Semantics of Programming Languages, a text introducing a lot of details in formal notation.