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 / das.rb
Created June 2, 2026 00:56 — forked from ckahle33/das.rb
# gem install mechanize
require 'mechanize'
class Download
def initialize(site, email, pass)
@options = {site: site, email: email, pass: pass}
end
def call
@jaeyson
jaeyson / c89cc.sh
Created April 4, 2026 09:23 — forked from alganet/c89cc.sh
c89cc.sh - standalone C89/ELF64 compiler in pure portable shell
#!/bin/sh
# ISC License
# Copyright (c) 2026 Alexandre Gomes Gaigalas <alganet@gmail.com>
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
@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)