Programming

Sender Policy Framework – Protect your E-mail from Spam with SPF

You don’t want your domain blacklisted from e-mails right? You didn’t send all those spam messages! Someone just started sending e-mails from your domain without even having access to it! What to do?! This is quite common actually. E-mail wasn’t set up for authentication properly when the SMTP protocols came out. Hence why it is called “Simple” Mail Transfer Protocol, shame that it is standard.... read more

mySQL Tidbits: GROUP_CONCAT and ON DUPLICATE KEY UPDATE Examples

Mysql Tidbits: GROUP_CONCAT You can GROUP_CONCAT multiple result sets from multiple LEFT JOIN’s to create a single result set when using a primary table and relational “meta” table by using DISTINCT. In order to get multiple result sets from this type of action you need to GROUP BY your results. The following example is pretty complex. It takes 3 tables, combines multiple (left joined) rows from table2,... read more

mySQL Find and Replace throughout Entire WordPress Database

Just finished writing this very handy Script for updating all links in a wordpress site should you choose to move your domain. This goes through every column of every table in the database and replaces string searched with the desired string. This code should be placed in “functions.php” in the base directory of the theme you are currently using in WordPress. You should place this code in the functions file... read more

Change WordPress Site URL

I’m almost positive many of you web developers have had to move a WordPress site in your day. Well, sometimes the domain changes, and you realize how much pain you’re in for since that involves scouring the database. Fear not! WordPress has a simpler alternative, a feature that is nearly as awesome as the picture above! Courtesy of the WordPress Codex: Relocate method WordPress supports an automatic relocation... read more

Mass Renaming Files via Command Prompt

Source: http://superuser.com/questions/16007/how-can-i-mass-rename-files-from-the-command-line-or-using-a-3rd-party-tool Thanks to zdan of superuser.com tl;dr? Here’s the script: dir /B > fileList.txt for /f “tokens=1,2,3,4,5 delims=-” %i in (fileList.txt) DO ren “%i-%j-%k-%l-%m” “%i-flowers-%l-%m” rm fileList.txt  Enjoy. Now for the curious, read... read more

Solution: jQuery .append() or .appendTo not working in IE8, IE7, or IE6

The solution to this is more of a warning: when you create elements in the DOM, if they are not closed, IE8, IE7 and IE6 will not allow any modification to that element, including .append() and .appendTo() because they are not considered standard or correct DOM elements, and hence are treated as text. Make sure that you close your elements such as <div></div><a></a>, etc. so the older browsers... read more

The Internet Progresses: Adobe Flash Discontinued

Flash was a language written to display dynamic content and enhance the look and feel of web pages. There are many things that Flash did that couldn’t be done by most browsers during its era. The problem with Flash is that every browser built had to include, or at least support a plugin version of flash, to display the content. Flash constantly gets updated so there have always been many issues with it. There was... read more

How to Connect Website Badge / Link to Google+ Business Page

For those of you who skipped configuring your badge for Google+ Pages and can’t find the option anymore, use the following link: https://developers.google.com/+/plugins/badge/config Type in your page’s ID and you will be able to create it again.  You can see it live here at esotech.org at the footer and also the breadcrumb on inner pages. You will have to add a bit of code to your header, and then use the... read more

Solution: Using Include or Require in PHP but Can’t Find File

The situation is you are trying to use include or require to load a file from a folder in your site, when the file you are calling include or require from is inside a different folder in the site and NOT the document root. The issue is, when you use include outside of your document root, it considers that folder as the document root, so you are forced to give it the real root directory of your website on the server. Your... read more

Java Concepts: Objects; Classes, Variables, and Methods

tl;dr (too long; didn’t read) – Java uses classes which declare variables that store information and are modified/retrieved by methods once an object of that class is instantiated. The next post will contain code complimenting these concepts. // Continue if you want to read more. /* Java is an object-oriented programming language, but just what is an object? To find out, we must first delve into the concept... read more