#Some useful(?) code snippets.
This is literally just a collection of some bits and pieces that don't fit anywhere else.
The script I use to generate my resume from a markdown formatted text file.
PHP function to validate a phone number from untrusted input. That's all it does. I'm not a PHP expert, so I'd recommend you check over it yourself.
Rust function to execute a command in a shell. Just pass it an &str for the
command, and it'll push it on to
sh -c. It'll only work in POSIX compatible
environments, and if you take untrusted user input it could result in command
injection. Also, it'll hold the thread until the command finishes.