- https://speakerdeck.com/willroth/50-laravel-tricks-in-50-minutes
- https://www.reddit.com/r/laravel/comments/3to60i/50_laravel_tricks/
- 1. Automatic Model Validation
If you're not familiar: What is fail2ban? fail2ban is an awesome linux service/monitor that scans log files (e.g. auth.log for SSH) for potentially malicious behavior. Once fail2ban is tripped it will ban users for a specified duration by adding rules to Iptables. If you're unfamiliar with fail2ban Chris Fidao has a wonderful (& free!) series about security including setting up fail2ban here.
Recently Laravel released a new feature in 5.1 to throttle authentication attempts by simply adding a trait to your authentication controller. The Laravel throttle trait uses the inputted username, and IP address to throttle attempts. I love seeing this added to a framework out of the box, but what about some of our other apps not built on Laravel? Like a WordPress login? Or even an open API etc.? Ultimately,
#!/bin/bash | |
# USAGE: Will create a .tar.gz with CSVs of all tables in schema. | |
# Configure below and run as root (i.e. the user mysql runs as) | |
# | |
# The script will (or should) SELECT * INTO OUTFILE your tables | |
# and save them into csv files under /tmp dir first, then name them | |
# like the tables and move them thogether into a directory. Then | |
# it will tar everything together and chown you the tarball. | |
# Schema to export: |