Skip to content

Instantly share code, notes, and snippets.

View teroyks's full-sized avatar

Tero Ykspetäjä teroyks

View GitHub Profile
@teroyks
teroyks / 2026-03-12.log
Created March 12, 2026 19:39
Telia 5G network connection
Timestamp Thread Type Activity PID TTL
2026-03-12 18:07:00.281950 Ping failed: The request timed out. (5003ms)
2026-03-12 18:07:25.848486 Ping succeeded (568ms)
2026-03-12 18:10:00.287840 Ping failed: The request timed out. (5007ms)
2026-03-12 18:10:30.286310 Ping failed: The request timed out. (5006ms)
2026-03-12 18:10:55.540061 Ping succeeded (259ms)
2026-03-12 18:12:00.289258 Ping failed: The request timed out. (5006ms)
2026-03-12 18:12:30.286642 Ping failed: The request timed out. (5006ms)
2026-03-12 18:13:00.286989 Ping failed: The request timed out. (5006ms)
2026-03-12 18:13:25.519130 Ping succeeded (238ms)
@teroyks
teroyks / README.md
Last active September 1, 2025 08:56
hashtag regex

Hashtag Regular Expression

A regex that matches 10 or more consecutive hashtags (after some other text). I use this to filter out spammy Mastodon posts.

Explanation

@teroyks
teroyks / README.md
Last active January 11, 2024 14:21
GitHub Colorize Project View

GitHub Colorization Bookmarklet and Custom Style

A bookmarklet for visualizing different card types in the GitHub project view better.

To create the bookmarklet, use a minifyer (like Minify for VS Code), or a tool like Bookmarklet builder.

Add the minified code as a bookmarklet (start with javascript:).

Alternatively, use the custom style file with e.g. Stylus. This is the preferred option if you’re able to install an extension to the browser (the bookmarklet requires activation every time but does not require installing anything).

@teroyks
teroyks / .gitignore
Last active April 25, 2023 12:03
Quarto Makefile
/.quarto/
/_book/
/.render-timestamp
@teroyks
teroyks / nitter_bookmarklet.js
Last active September 18, 2023 14:46
Redirect a Twitter URL to Nitter
javascript:(() => { const nitter_instance = 'nitter.net'; const current_url = window.location.href; window.location.href = current_url.replace(/(mobile\.)?twitter\.com/, nitter_instance); })();
@teroyks
teroyks / Activate Env.md
Last active January 20, 2022 10:43
Activate venv somewhere in the directory tree

Find and Activate venv

Tries to find and activate a virtual environment either in the current directory or the closest one in the hierarchy.

Example:

  • in /foo/bar/baz
  • first, checks if /foo/bar/baz/venv/bin/activate is found (and uses that if it is)
  • next, tries /foo/bar/venv/bin/activate
  • after that, /foo/venv/bin/activate
@teroyks
teroyks / valid_email_addresses.txt
Created December 14, 2021 16:03
Examples of valid email addresses that often trick validators
max.kaßner@bücher.de
kissa@localhost
"@"@example.com
"Joonas Koivunen"+pojat@example.com
@teroyks
teroyks / README.md
Last active November 17, 2021 09:17
Output a running count of lines

linecounter2 is an alternate version that goes to the previous line, erases it and rewrites with new info. Might be useful if you need the newline character at the end of the string (for example to flush an output buffer).

@teroyks
teroyks / pathlib.ipynb
Last active January 12, 2021 17:20
Pathlib Essentials
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@teroyks
teroyks / keybase.md
Created March 14, 2020 12:56
Keybase proof

Keybase proof

I hereby claim:

  • I am teroyks on github.
  • I am teroyks (https://keybase.io/teroyks) on keybase.
  • I have a public key ASCJsSjGzCiVzu4TCshLQwbWuCMYqmoTzxyWN5FsWozHVwo

To claim this, I am signing this object: