Search This Blog

Subscribe to this blog

Follow by Email

Short but Sweet!

Because I am using the more tag in my entries, to limit the amount of text displayed on the initial page view, my home page is having a lot of blank space. To solve this problem I am using a Perl script to display quotes as filler for the white space. The script reads quotes from a play text file. I know Word Press has some plug in which can display quotes as well. I might explore it in the future and use it as a substitute to the Perl script.Right now the Perl script will display a different quote on every page load. It is randomly picked from the text file. I am using the same script to display quotes at the top of both the Clan -(MP)- and Jus2 Investing web sites. On the Clan -(MP)- web site the quotes are displayed between the logo and the site menu. On the Jus2 Investing website the quotes are displayed on the right of the logo.

Below is the script source code. It is from the Perl Cookbook. You should have only one quote per line in your quote database file.

Popular posts from this blog

I am currently working on a project which will allow users to register their Wi-Fi enabled, non-web browser enabled, devices on the network. These are devices like printers, Apple TV, and Xbox*. One of the data points that have to be collected from the user is the device MAC address. The project customer wants that address to be properly formatted when they see it in the support ticket.

We have several options. We can format the address either on the back-end after the form has been submitted. Or we can format it on the front end via a separate text field for each character pair, but that is too many fields to handle. A better solution is to use a single field and format the user input at the time of input or upon submit. In those cases, the former is better because the data will already be formatted when the overall form input is being validation after the user clicks the “Submit” button.

We are going to format the user input as it is being provided, thus having proper data when vali…

Setting up a new site in Coda 2 and cloning a GitHub remote repository is not that big of a deal. Where you will most likely run into problems is when you try to push your changes to the GitHub remote repository. Below I will show you how to update the Git config file in your local repository so you do not run into one of the following errors:git push failed remote: Remote anonymous access to repository deniedgit push origin master Username: fatal: Could not read passwordThe GitHub repository address I am going to use is that of Source Code DNA: https://github.com/thetitan/sourcecodedna.git. I will assume that you have already setup your Coda 2 site profile and cloned your repository, you have made some changes, and now you are ready to push those changes to your projects GitHub repo.

If you have a WordPress based blog, or otherwise use WordPress as a CMS for your website, you are either getting a lot of bad user accounts being created or noticing a lot of knocking on your wp-login.php page. WordPress has a nice feature which allows you to install WordPress in a directory other than the root one. For example, your site is served from http://blog.example.com, but WordPress can be installed in http://blog.example.com/wpcms. In past versions of WordPress, prior to 3.8 or maybe be older than that, unless you knew the exact path to where WordPress was installed you could not get to the dashboard. That has changed! Now even if WordPress is installed in some random directory, if you navigate to http://blog.example.com/wp-login.php you will be redirected to the actual WordPress login page. Convenient, but not helpful when dealing with SPAM bots.