Automate MySQL Backup & Send To Email As Attachment On FreeBSD 11

Sharing a very simple script to dump a database, archive it and send it to an email. https://gist.github.com/allaniftrue/0ad52f931f317872b6a070425ea061bd Note:  The part that troubled me a most is the sending of email where sendmail / mail / mailx (I'm about to install mutt) doesn't allow *.tgz attachment even with the uuencode <file>.tgz command.  I don't know … Continue reading Automate MySQL Backup & Send To Email As Attachment On FreeBSD 11

Advertisements

Capturing Laravel’s Error On Axios

Axios is a promised based http client.  Capturing laravel's 422 status error is a bit tricky because the returned data is a dynamic json key.  Here is a simple approach on how we can capture the error status code and throw an error using sweet alert 2. https://gist.github.com/allaniftrue/ca69f9e64f257f88a2983fb55f14025d

Git filename

Stumbled upon a git issue where the images with uppercase can not be committed after changing the filenames to all lowercase. To solve it you just move it to the same folder with the new letter capitalization. git mv FileName.jpg filename.jpg