Skip to content

Instantly share code, notes, and snippets.

View omitobi's full-sized avatar
👑
The faithful shall receive the crown of life from Jesus

omitobi omitobi

👑
The faithful shall receive the crown of life from Jesus
View GitHub Profile
@omitobi
omitobi / jwtRS256.sh
Created July 5, 2024 12:01 — forked from ygotthilf/jwtRS256.sh
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@omitobi
omitobi / delete_older_than.php
Created July 19, 2024 07:42 — forked from tdebatty/delete_older_than.php
A simple PHP function to delete files older than a given age. Very handy to rotate backup or log files, for example...
<?php
/**
* A simple function that uses mtime to delete files older than a given age (in seconds)
* Very handy to rotate backup or log files, for example...
*
* $dir String whhere the files are
* $max_age Int in seconds
* return String[] the list of deleted files
*/