29
2014
WordPress Syntax Highlighters, and how to Switch From One to Another
If you’ve been to this site before, you’ll probably notice that I’ve switched from the syntax highlighter that I’d used to display code to something a ton cleaner (the credit does not go to me, the new syntax highlighting plugin came from this TutsPlus article). Until a few hours ago, I used SyntaxHighlighter Evolved, which looked great, and was super easy to use, however, there were some issues with using it on a website displaying code that people […]
24
2014
Download Files with PHP (From a List)
Ever have one of those days where you get a new codebase on your desk, but realize that you’re missing ALL THE IMAGES? (face slap). I’ve had plenty of those, and here’s how to stop slapping yourself and just use PHP to download files from a list in a text file! The Directory Structure Easy enough, but just to be safe, the following is the directory structure used for this: process.php attachment.txt files/ Process.php The […]
24
2014
PHP Error Reporting and Why You Should Care
If you’re a PHP developer, and you prefix questionable function calls with the “@” symbol, you should be aware that I’m onto you! If the first line of code you write after <?php is “error_reporting(0);”, then we shouldn’t be friends anymore. Error reporting in PHP is really really really important, and you should probably also stop reading, because this article will just fill your soul with rage. Keep in mind, this article isn’t about whether or […]
20
2014
My favorite tools for Web Development
The question that I get asked more than any other is, “What tools do you use to code?”, so I figured I’d spread some software/knowledgebomblove and lay out my workflows! I’ll also break it down by the actual order of my workflow (since that’s a bit easier for me to write/remember anyway): Textmate I code by hand, and since I code by hand, Dreamweaver isn’t even a thing that exists on my computer. I use […]
Recent Snippets
- htaccess : Only allow access to specific wordpress upload types if logged in
- MySQL : Query WordPress Database for Invalid Media Filenames
- PHP : Get Actual IP Address with PHP
- JavaScript : Allow Tab in Textarea
- PHP : Clean sanitized database contents on output
- htaccess : Force www. prefix in URIs
- PHP : Force File Download with Correct Content Type
- Wordpress : Disable upgrade notification