Skip to content

Instantly share code, notes, and snippets.

View jaeyson's full-sized avatar
🎯
Focusing

Jaeyson Anthony Y. ⚗️ jaeyson

🎯
Focusing
View GitHub Profile
@jaeyson
jaeyson / 01. Download Locations for FFmpeg.md
Created January 4, 2026 12:31 — forked from AbsoluteDestiny/01. Download Locations for FFmpeg.md
Some FFMpeg commands I need to remember for converting footage for video editing. http://bit.ly/vidsnippets
@jaeyson
jaeyson / signing-git-commits.md
Created December 29, 2025 06:18 — forked from phortuin/signing-git-commits.md
Set up a GPG key for signing Git commits on MacOS (M1)

Based on this blogpost.

To sign Git commits, you need a gpg key. GPG stands for GNU Privacy Guard and is the de facto implementation of the OpenPGP message format. PGP stands for ‘Pretty Good Privacy’ and is a standard to sign and encrypt messages.

Setting up

Install with Homebrew:

$ brew install gpg
@jaeyson
jaeyson / towards_impeccable_rust.md
Created October 12, 2025 14:56 — forked from bsodmike/towards_impeccable_rust.md
Towards Impeccable Rust by Jon Gjengset, session at Rust Nation UK (27th March 2024)

Towards Impeccable Rust

Testing

  • Miri
  • Test for error conditions

Embrace chaos (fuzzing)

  • Async/sync chaos Turmoil / shuttle
  • Value checks: quickcheck / proptest
  • Logic chaos: cargo-mutants
@jaeyson
jaeyson / README.md
Created October 7, 2025 11:12
Redis/Valkey

Redis/Valkey changes, difference from the default Redis configuration.

If no max. is set, Redis/Valkey can use all the RAM. We want to avoid this and limit the RAM usage of the Redis server. If you want to limit the Redis process and to what extend, that is up to you. Don't forget to change the max memory policy (the default policy is not what you want). More info: https://valkey.io/topics/lru-cache/

I also bind only to IPv4. And created a valkey socket file with 777 permissions. And use io-threads (default is also 4 in Valkey).

@jaeyson
jaeyson / 20-mysqli.ini
Created October 7, 2025 11:10
PHP 8 configs
# conf.d/20-mysqli.ini
extension=mysqli.so
[mysql]
mysql.allow_local_infile=On
mysql.allow_persistent=On
mysql.cache_size=2000
mysql.max_persistent=-1
mysql.max_links=-1
@jaeyson
jaeyson / 99-sysctl.conf
Created October 7, 2025 11:09
Kernel tuning sysctl (Incl. Network tuning)
# etc/sysctl.d/99-sysctl.conf
# This control is used to define how aggressive the kernel will swap memory pages.
# We will lower the number to decrease the amount of swap.
vm.swappiness = 10
# This variable controls the tendency of the kernel to reclaim the memory which is used for caching of directory and inode objects.
vm.vfs_cache_pressure = 200
# This value in 100'ths of a second define when dirty data is old enough to e eligible for writeout by the kernel flush threads.
vm.dirty_expire_centisecs = 500
@jaeyson
jaeyson / README.md
Created October 7, 2025 04:39
Scrapper for Mapbox Studio for getting a custom font

Getting your custom font (once uploaded to the MapBox Studio interface), by downloading the actual pbf files. You need to fill-in your font name, username and the access token, see: https://www.mapbox.com/account/.

@jaeyson
jaeyson / README.md
Created October 7, 2025 04:39
Lumen/Laravel Nginx configuration example

In this Nginx configuration Lumen is actually installed within /home/mydomainfolder/html/admin/api/, so this is the root folder of Lumen installation. The public folder within this api directory is created by Lumen.

Replace <your_domain> with your actual domainname in Nginx (or use localhost for development).

Change /var/www/mydomainfolder/html to your actual website location on disk.

Change /var/run/php-fpm/php-fpm.sock to the correct PHP fpm socket file (eg. it could also be /var/run/php/php7.3-fpm.sock for example)

@jaeyson
jaeyson / daemon.json
Created October 7, 2025 04:38
Example of changing DNS of Docker (using daemon.json). Place new file, called daemon.json in /etc/docker
{
"dns": ["192.168.1.20", "1.0.0.1", "1.1.1.1"]
}
@jaeyson
jaeyson / README.md
Created October 7, 2025 04:37
Pull/push all your Git repos Bash script

Process multiple Git repos from top-level script (pull_push_all.sh).

The pull_push_all.sh will perform git pull & push only on main/master branch. And will list any untracked files. Last but not least, the script will give a warning when the current checked-out branch is NOT main or master. That project will be skipped in this case.

The goal of this script is to sync your Git projects with the remote Git server, especially once you got a lot of Git projects.

NOTE 1: This script will NEVER automatically commit changes.

NOTE 2: Processing each repo will take less than 1 second. Efficiently: O(n)