avatar

Andres Jaimes

WordPress Snippets

As a WordPress developer I have collected / created / curated many snippets that I’ve used in my projects. I hope you find them useful.  General HTML / WordPress tags Get your template’s directory <link href="<?php echo get_template_directory_uri(); ?>/style.css" rel="stylesheet" media="screen"> Check if this is the home page <?php if (is_home()) { ... } ?>  Remove the wp_generator tag in the Head section of your HTML I recommend you to add this line for security reasons.

How to create a Finder Alias on Mac

A Finder alias is a special kind of shortcut or link to a folder. You can place this alias anywhere, being the Desktop a common place. You can even create an alias from a shared folder on a server. To create an alias: Open Finder and look for the folder you want to create an alias for. Press Option + Command while you click and drag the folder to the desktop.

Working with dynamic arrays in Delphi

One advantage of Delphi’s dynamic arrays is that they are automatically freed once they go out of scope. That simplifies memory management and gives you more flexibility on your applications. You can declare a dynamic array like this: Customers: array of string;  Before adding an element, you have to call the SetLength function to specify the number of elements you are going to use (3 in this case): SetLength(Customers, 3);  Now you can go ahead adding values:

IIS tips and tricks

Running multiple versions of the .NET framework in IIS When you install a new .NET framework in your IIS server some applications can stop working showing you the following error: Server Application Unavailable In the event viewer you will find this: the same IIS process. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process. This happens because different .NET frameworks can run in the same server, but cannot share the same application pool, so, to solve this: