Committer: Evan Hoose <evan@a-shared-404.com>
Committer: Evan Hoose <evan@a-shared-404.com>
On branch master
#Some useful(?) code snippets.
This is literally just a collection of some bits and pieces that don't fit anywhere else.
##resume_gen.sh
The script I use to generate my resume from a markdown formatted text file.
##isPhoneNumber.php
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.
##shell.rs
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.