Category: Web Development
-
Truncate a WordPress Database To X-Number of Posts
I regularly work with huge MySQL database files (10G-100G) so making copies and importing them locally for use in VVV is extremely cumbersome (at best). Here are some MySQL statements that allow you to truncate all but the most recent 1000 posts in your WordPress database. These are useful because they allow you to truncate…
-
Easy Automatic Facebook Share Counts (Fully Javascript)
Drop this little gem in your site’s header: Then, add elements to your page like so: Remember to change the data-url to whatever URL you are referencing, and viola! You’re done.
-
Web Server iptables Script
Here is an iptables script to set up a solid firewall on a CentOS web server. Remember to change the ip address on line 26 with your IP address, or you will lock yourself out of your own server!
