Skip to content

Instantly share code, notes, and snippets.

View ayewo's full-sized avatar

Saïd ayewo

View GitHub Profile
@Ichoran
Ichoran / ThreadLocalLoom.scala
Created October 16, 2024 06:29
Benchmark to test whether ThreadLocal creation (via DynamicVariable) really impacts Loom threads
//> using scala 3.5.0
//> using dep com.github.ichoran::kse3-basics:0.3.11
//> using dep com.github.ichoran::kse3-flow:0.3.11
// Run with scala-cli --power --jmh --jvm=21 ThreadLocalLoom.scala
// If you change the classes that have to be benchmarked, you may have to rm -r .scala_build
package threadlocalloom.bench

Disable the annoying Mozilla Firefox update popup on macOS that gets showns multiple times a day (more than half a dozen times):

mkdir -p /Applications/Firefox.app/Contents/Resources/distribution
cat <<EOF > /Applications/Firefox.app/Contents/Resources/distribution/policies.json
{
  "policies": {
    "DisableAppUpdate": true
  }
}
EOF
App OSS? Supported OS Recording Mode Core Features Language
OpenAdapt macOS, Windows Intermittent Workflow automation, remote AI Python
Rewind macOS, Windows (soon) Continuous - includes audio Perfect recall (remote AI) Swift
Perfect Memory[^1.1] Windows Intermittent[^1.2] Perfect recall (local AI)[^1.3] -
ScreenDiary[^2.1] Linux Intermittent Perfect recall (no AI) Python
EssentialApp[^3.1] macOS Continuous - last 5m Coding assistant[^3.2], Perfect recall (remote AI)[^3.3] Swift
RetroClip[^4.1] macOS Continuous - last 5m Instant replay videos[^4.2] -
@kdrag0n
kdrag0n / README.md
Last active July 29, 2023 04:46
Fast, polling-free approach to kill and wait for all processes to exit. Rust + Tokio, pidfd + epoll + timer
@kconner
kconner / macOS Internals.md
Last active May 6, 2025 05:33
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@simonbs
simonbs / GitHub Sponsors Widget.js
Created January 31, 2022 15:19
Shows the total number of GitHub sponsors and the latest sponsors in a widget using the Scriptable app
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: brown; icon-glyph: hand-holding-usd;
// To use this script, you must create a personal access token on GitHub with the `read:org// scope.
// Follow the instructions on the link below to create your personal access token.
//
// https://github.com/settings/tokens
//
// Run the script when you ahve created your personal access token. It'll prompt you to enter the token and store it securely in the keychain on the device.
@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active April 28, 2025 21:31
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
@ivanistheone
ivanistheone / txt2mp3.sh
Last active January 5, 2023 14:55
This script converts a plain text file, e.g. article.txt into a mp3 audiobook using the MacOS text-to-speech accessibility command-line tool `say`. Adjust the `VOICE` and `RATE` parameters to customize to your liking. Note this requires running on MacOS.
#!/usr/bin/env bash
set -e
# This script converts any text file into a mp3 audiobook using the MacOS
# text-to-speech accessibility command-line tool `say`.
# Adjust the `VOICE` and `RATE` parameters to customize to your liking:
VOICE="Alex"
RATE="295" # pretty fast
if [ $# -eq 0 ]; then
@RagedUnicorn
RagedUnicorn / cloud_init_debugging.md
Last active January 22, 2025 12:55
Debugging tipps when working with cloud-init

Cloud-Init Debugging

Cloud-init combined with terraform can be a powerful tool to provision instances on startup. Debugging scripts that are run by cloud-init however are not the easiest to debug.

Logs

Usually on an Ubuntu machine a lot of what is happening can be found in the syslog

cat /var/log/syslog
@joeytwiddle
joeytwiddle / async-await-forEach-alternatives.md
Last active May 3, 2025 15:01
Do not use forEach with async-await

Do not use forEach with async-await

TLDR: Use for...of instead of forEach() in asynchronous code.

For legacy browsers, use for...i or [].reduce()

To execute the promises in parallel, use Promise.all([].map(...))

The problem