Tuesday, October 18, 2016

SNOOZ: Sound. Sleep.

I was on the Snooz Kickstarter page today, revisiting the project’s details and timeline progress. The device, which is a white-noise generating machine, recently became available for pre-order. Snooz is meant to be an alternative to having a TV or a stationary fan running at bed time. In my case, I bought it for my wife so we can get the TV out of the bedroom.

Whilst on the comments page I read the following comment, posted recently by Ken Tran:

I'm not a fan of the new fabric design. ...

Snooz machine
I must disagree. If you take a look at the original design, which is all plastic and no style, I must say it is fugly. It is all utilitarian - not something I rally want to look at or see when I walk into the room. The final design, seen on the right, is something that beacons to be explored, looked at, utilized.

I am a big fan of Bang & Olufsen. They use fabric from Kvadrat in their line of products. Incorporating soft materials like fabric or leather in something which is meant to be placed close to one’s head, or become part of the rooms appeal makes a huge difference. I am glad that Snooz went the Band & Olufsen way and made the device some much more aesthetically pleasing to the eyes.

Tuesday, August 16, 2016

Validate Email Address [JavaScript]

The following is a quick and dirty way to validate form input, using JavaScript, from a user to confirm that they are entering a value, which could be interpreted as an email address. The function below is meant to quickly and simply ensure that the value provided by the user contains the at '@' symbol and a period '.', nothing more!

// Vanilla JavaScript
function validateEmail(emailAddress)
    if (emailAddress.value.indexOf('@') == -1 || emailAddress.value.indexOf('.') == -1) {
        alert("Invalid Email!");
        return false;

The validateEmila function relies on the global method indexOf. That method returns the first position at which the specified string value occurs.

Keep in mind that this is not a complete and exhaustive method of validating an email address. There are better and more comprehensive ways to do so. For example, make sure that the email address doesn't contain any spaces, symbols, HTML characters, or that it starts with a letter, not a digit.

Tuesday, March 31, 2015

Messing with WordPress SPAM Bots

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.

Friday, July 11, 2014

Balloon Flowers of 2014

We have Balloon Flowers (platycodon grandiflorus) in a half barrow pot. They are one of my favorite flowers that we have around the house. Simply because of how the flower forms. It starts as a small ball, which slowly grows into the shape of a hot air balloon, and once it opens it looks like it had exploded.

[gallery type="rectangular" link="file" ids="2611,2612,2622,2615,2613,2614,2616,2617,2618,2619,2610,2620,2621"]

I planted the flowers from the pictures above about seven years, ago.

Wednesday, May 28, 2014

Backyard Garden - May 28th, 2014

The weather is finally "stabilizing" to where the temperature is more consistent and higher, like it should be for this time of the year. Also it is not raining every single day, or hailing, like it has in the last few weeks. So now the flowers are starting to come out and they look really nice.

[gallery type="rectangular" link="file" ids="2585,2584,2583"]

Saturday, November 23, 2013

How to protect wp-login.php using .htaccess and .htpasswd?

If you own or maintain a WordPress based website you might or might not be aware that the wp-login.php page in your root directory and the wp-admin directory are under constant attacks by malicious bots. This tutorial will show you how to password protect the wp-login.php file through the use of .htaccess and .htpasswd.

A quick side note before I continue - to improve your website’s security create a new administrator account, a non-standard username. Once that is done, delete the admin account. WordPress will automatically resign all posts and pages to any other user of your choosing.

For this primer, we will assume that your WordPress installation is in the root directory of your website. With most shared web hosting companies the path to your account’s web directory will be something similar to /home/client_account_id/public_html, where public_html is the web root directory. To view the exact path SSH into your hosted account and executing pwd, short for print working directory.

Friday, November 22, 2013

Task list when setting up a new web server. [LAMP]

This is my to-do list when preparing to deploy a new web server. The majority of the time I use Ubuntu as the operating system, though I have used Fedora and CentOS in the past. I also manage RedHat Enterprise Linux servers at work. These tasks are mainly for a web server. Setting up just a file server is a lot less work; while setting up a proper mail server is significantly more work, since they are a constant pain to configure and maintain. With a mail server you have to think of local vs external user access; logging and connection encryption; how you are going to store files; user interface and its security; MX black lists, SPAM, and open relays.

Sunday, October 06, 2013

How to setup Coda 2 to push to GitHub?

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:
  1. git push failed remote: Remote anonymous access to repository denied
  2. git push origin master Username: fatal: Could not read password
The 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.