Author Archives: brandonio21

I’m Going Full Linux

Running Linux on my machines is my own personal hobby. One of the first things I did with my first laptop was dualboot Ubuntu and Windows. Ever since then, I have installed Linux on every machine I’ve had. Usually, I install Linux thinking that I have no need for any other operating system. Then, a need comes along, and I end up dual-booting Windows and Linux. Currently, my ASUS K55N-DS81 laptop holds the record with about a year running only Linux. However, this streak was ended when I went out of town with only my laptop and needed to do some serious .NET editing in Visual Studio.

Needless to say, the dream still continues. I still want to have atleast a single machine that runs only Linux. One of the main problems I have with my current laptop is its abysmal battery life. I get about 2.5 hours per charge, which is not enough to make it through the day. Thus, I’ve been looking for a replacement laptop. Something powerful enough, but also lightweight and not lacking in the battery department. What I found was the ASUS UX305.

ux305After browsing several Arch Linux forums and webpages, it seems that this laptop is perfect for Linux. Everything works out of the box. This is more than I could ask for given its astonishingly low price of $699.

Laptop selection aside, the struggle comes when installing Linux. The problem isn’t getting everything to work, but rather finding alternatives to all the Windows software that I use on a daily basis. Time and time again, the troublesome piece of software proves to be Visual Studio. I do a lot of development for work in Visual Studio, so it is a relatively mandatory piece of software. Recently, however, I stumbled upon MonoDevelop and its fantastic GTK# Window Designer. After trying it out for a few hours, I have determined that it is a worthy alternative to Visual Studio’s Form Designer. I look forward to seeing how it compares when using it on a daily basis.

That being said, the laptop is arriving in two days. I plan to heavily document my Linux installation process and all other things in order to create a sort-of ongoing guide for anyone who wishes to pickup this laptop and install Linux on it. I will not give up on this Laptop. I will not dual-boot. I am going full Linux.

The Importance of Jewelry in Relationships

While growing up, I never thought much about jewelry. Mainly, I thought it was a way to look “cool” and express yourself. I used to wear necklaces, earrings1, rings, and watches just to make myself look a little older and look a little “cooler”. Girls, I thought, did the same. They wore jewelry just to look a little more elegant and a little more pretty. Sometimes it worked, sometimes it didn’t. But I’m not here to discuss the semantics of beauty and jewelry.

In relationships, I always saw jewelry as a huge marketing scheme. After all, the idea of a diamond ring as something mandatory for a proposal was the result of one company’s ad campaign2. As we go about our day, we are constantly barraged with slogans like “Every kiss begins with Kay”3 and “Your personal jeweler, Ben Bridge” trying to lure us into the world of expensive, pricey jewelry.

There’s more to it than just marketing, most people would agree. Wearing jewelry is an expression that you are wearing something dear to you that was given to you by someone you love. A diamond ring, a heart necklace, a silver earring – all to show others that you’re proudly taken and proudly in love. It works well, too. Walking around, it is not difficult at all to spot men or women in dedicated relationships by the ring that they wear on their ring-finger.

There is more to just following trends, looking good, and showing others that you’re taken, however. Jewelry serves the purpose of reminding the wearer that they are indeed in a relationship. Why would someone in a relationship need to remind themselves of this? The following anecdote sums things up perfectly4:

One day, Peter locked himself out of his house, so he called around to find a locksmith. It took him a while to find one who was certified by the city to unlock doors. The locksmith finally pulled up in his truck and picked the lock in about a minute.

“I was amazed at how quickly and easily this guy was able to open the door” … In response to Peter’s amazement, the locksmith told Peter that locks are on doors only to keep honest people honest. “One percent of people will always be honest and never steal,” the locksmith said. “Another one percent will always be dishonest and always try to pick your lock and steal your television. And the rest will be honest as long as the conditions are right – but if they are tempted enough, they’ll be dishonest too. Locks won’t protect you from the thieves, who can get in your house if they really want to. They will only protect you from the mostly honest people who might be tempted to try your door if it had no lock.”

After reflecting on these observations, I came away thinking that the locksmith was probably right. It’s not that 98 percent of people are immoral or will cheat any time the opportunity arises; it’s more likely that most of us need little reminders to keep ourselves on the right path.

Now before you begin to disagree with me because there is no way that relationships are relatable to locked doors and locksmiths, consider the possibility. In relationships, there are probably around one-percent of people who will be faithful to their significant other no matter the circumstance. They will stay true to them in life and in death. Conversely, there are probably another one-percent of people who are purposefully looking to cheat on their significant other – to feel the rush of breaking the rules. Thus, this leaves the remaining ninety-eight percent who will remain true to their significant other “as long as the conditions are right”.

What kind of conditions am I talking about? Well, if a relationship is healthy and happy, there is probably no reason to change anything – the conditions are right; however, say that there is a little bit of trouble – one person has a little too much alcohol – anything can happen! This kind of disloyalty in a relationship is the disloyalty that happens on a daily basis. People seemingly “accidentally” cheat on their significant others quite often, and almost always because the conditions were a little bit off.

In The (Honest) Truth About Dishonesty, Dan Ariely discusses this phenomenon at length, saying that it does not only apply to locked doors, but also to tests, tax returns, and most other situations where a bit of honesty is required. Through several experiments, Ariely shows that there is a way to prevent this dishonest behavior – to have a reminder that keeps us on the right path. This reminder can be in any form, Ariely claims. According to his studies, swearing on a bible prevents lying, signing a “I will not cheat” statement prevents cheating, and signing a “I verify that these taxes are correct” prevents tax return fudging.5

The catch with Ariely’s claims, however, is that the reminder has to take place before the opportunity to be dishonest arises. For instance, when doing taxes, the signed verification at the end of tax submission would be much more effective if it was placed at the beginning, reminding people to fill out the forms honestly. The same goes for relationships – the reminder to remain loyal to your significant other would have to take place before the opportunity for disloyalty arises.

This is where jewelry plays a major role. Since jewelry is something that is worn all day and something that is visible, it serves as a constant reminder to the wearer that they are indeed in a relationship and that they should not do anything to jeopardize this. Following the logic of the above anecdote and Ariely’s well-argued claims, if one were to constantly be reminded of their relationship by the ring on their finger, they would be far less likely to be dishonest.

By making this claim that jewelry in a relationship reduces dishonestly, I’m not saying that every relationship is in jeopardy of having some sort of cheating occur – I’m mainly pointing to the possibility and saying that jewelry may reduce even the slightest chance by simply reminding the wearer that they should not be dishonest to their significant other. If you are currently wearing jewelry given to you by your significant other, you should not be offended that they think you may cheat, but you should be happy because they are trying to mitigate even the slightest possibility. Jewelry is a constant reminder and a constant warning and may prevent instances of heartbreak due to this.

 

 


1. For the record, I do not have my ears pierced. I used to wear magnetic earrings.

2. For more information about this, see New York Time’s fantastic article about De Beers, Frances Gerety, and the way that they influenced the American jewelry market. http://www.nytimes.com/2013/05/05/fashion/weddings/how-americans-learned-to-love-diamonds.html?_r=0

3. Stern Advertising has done a fantastic job raising the public’s awareness of Kay Jewelers. View the official Stern page here: http://www.sternadvertising.com/our-work/kay-jewelers-2/

4. Anecdote is from Dan Ariely’s The (Honest) Truth About Dishonesty. Full citation:
Ariely, Dan. The (Honest) Truth About Dishonesty. New York: HarperCollins Publishers, 2012. Print.
Specific anecdote, “Lessons from Locksmiths” is on page 38.

5. These experiments and conclusions are mainly discussed in Chapter 2: “Fun with the Fudge Factor”.

Reverse DNS (rDNS) and DigitalOcean

As you may know from my previous post, I recently made the switch to Digital Ocean for my VPS needs. So far, everything has been great. However, I encountered a problem the other day regarding Reverse DNS (rDNS) for my VPS. The error occurred when I attempted to send an email to someone with a @cox.net email address. I got a reply containing a failure message. The message contained details about an invalid rDNS name.

After searching the Digital Ocean forums, I learned that by default, Digital Ocean configures rDNS for all hosting accounts. I couldn’t, for the life of me, figure out why mine was not working.

Then I read a small post that stated something along the lines of

In order for rDNS to be configured properly, the name of your droplet must be the same name as the URL that is being used to point to the droplet’s IP.

After changing the name of the droplet to reflect the primary domain name, everything worked out and emails started sending.

So now you know: Name your droplets with their corresponding URLs.

The Switch from HostGator to DigitalOcean

Introduction and History

About 6 years ago, I was in desperate need of a reliable webhost. I had a small personal website that I needed to be online most of the time, and I preferred to have something that was cheap, yet customizable. The solution that I found was HostGator’s shared hosting. The service was fairly cheap, had full access to MySQL servers, mail servers, and everything else that I needed. I stayed on their shared hosting plan for about two years. Then, I upgraded to a HostGator VPS.

I stayed on this VPS until about 2 weeks ago. The VPS was running CentOS and had WHM and cPanel installed. It was mostly managed, meaning that everything was installed and managed by the HostGator team and changes that I needed to make were usually much faster if I contacted the HostGator team directly instead of attempting to make the changes myself. This served my purposes very well since at the time I knew next-to-nothing about web server management. However, as I learned more about the way that web servers and UNIX systems worked, I desired to manage my own web server. Thus, I made the decision to switch to an unmanaged Digital Ocean VPS. There were also a few benefits of doing this.

The Benefits of Making the Switch

  1. The most notable benefit of switching away from any service to a Digital Ocean droplet is the decrease in price. I was able to nearly triple all of the specs of my webserver and still pay less per month. I could use this extra money to donate to some of the Open Source projects that I decided to use or to pay more skilled individuals to build a new website for me. Whatever I decide to use it for, paying less for more is something that should never be passed up.
  2. Speed is also a great benefit. Since Digital Ocean’s droplets all run on SSDs, there is a noticeable speed difference when working with my Digital Ocean VPS compared to my HostGator VPS. I’m not trying to say that my HostGator VPS was unbearably slow in any fashion, but rather than the Digital Ocean VPS is just so much faster.
  3. An unmanaged VPS is great. Instead of relying on other people to setup my system and maintain my system, with a Digital Ocean VPS, I am in control of everything. I get to choose what operating system I use, what software I install, and how frequently things get updated. It’s a nice shift from having people manage the entire webserver. Of course, there are some drawbacks to this. For instance, when a customer’s product spontaneously decides to malfunction, it is very difficult to work on a solution without knowing anything about the webserver itself. In this particular example, it is definitely useful to have people who know the server more than you; however, the goal is to learn through these experiences and ultimately know as much as the server-managers know.
  4. The cool factor is, well, cool. When you tell people that your VPS is from Digital Ocean, there is some sort of coolness to it. People seem to respect those who have an unmanaged VPS, especially from Digital Ocean. It’s a plus, I guess.

The Process of Switching

The great part about setting up a Digital Ocean VPS is that they charge by the hour; thus, there is no reason to fear wasting your money on a server only to spend hours setting it up (and ultimately failing). On top of this, they allow their servers to be dynamically resized and upgraded, which allows you to simply purchase the cheap server, mess around with it, and then upgrade when everything is ready.

With that being said, the first step of switching to a Digital Ocean VPS would be to set one up. I did exactly this. I chose the smallest VPS available, perused the options of software, and chose what I was comfortable with: CentOS 6.5. Despite running Arch Linux on my own machine and having previous experience with Ubuntu, I knew that CentOS had a lot of options available to it as far as webserver management software was concerned. The first steps were to pick that webserver management software.

The Web Panel

Like I said previously, my old VPS had WHM installed to manage all of the server software, packages, and cPanel accounts. Then, cPanel was used to manage individual websites. This software setup was perfect for my needs. In addition to myself, I also had several clients who paid for hosting on my VPS. These clients, of course, needed to manage their own website, so I needed some sort of web panel with strong admin/client separation.

The first WebPanel I ended up trying was Sentora, which is an Open-Source fork of the once legendary zPanel. Upon installing Sentora and having a look, however, it seemed to lack all of the features I wanted in a webpanel. Namely, Sentora lacked the ability to assign domain names to user accounts (Or maybe I simply did not see the option). This is something that was completely necessary for me so that I could keep track of all the domains that were hosted on my server. Although it had a beautiful design and seemed to be functional, I had to leave it.

What I ended up going with instead CentOS Web Panel, which was very similar in design and functionality as WHM and cPanel’s Paper Lantern theme. The installation of the software was very straightforward and the steps were explicitly outlined on the CentOS Web Panel website. After installing the software, it’s very easy to setup the nameservers, FTP accounts, and other domain names on the server. With CWP, everything just seemed to work, which was a plus.

The WebPanel also featured a decent admin/client separation in its design. When one logged in with an admin account, the options available were very different from the options available when logged in with a client account. This is exactly what I was looking for. There are a few drawbacks to the webpanel, however. Since the software is free and in its early stages, it is not the most efficient webpanel available and feels slow or clunky when typing in information or editing fields. On top of this, the team is a little slow to update the associated versions of PHP, MySQL, phpMyAdmin, etc. However, you can’t ask for too much from free software. That is, afterall, the best part of CWP. It’s free.

CentOS Web Panel Admin Page

CentOS Web Panel Admin Page

The NameServer Switch

Since I know nothing about how nameservers work, this was the hardest part of getting everything setup for me. I essentially had to switch my namesevers from the preconfigured HostGator setup to my own custom setup. Luckily, CWP has native support for this. Basically, the first thing that I had to do was go to my domain name registrar and configure my root domain (http://brandonsoft.com) to be a nameserver. I then pointed both the NS1 and NS2 subdomains to the IP address of my new Digital Ocean VPS. Once this was complete, I configured the ns1 and ns2 A Records on Digital Ocean’s DNS Management panel. Once this was complete, I made sure to change CWP’s nameserver options to reflect the IP Address of my Digital Ocean server. After waiting about a day for all of these changes to take effect, everything worked perfectly. Since all of the domain names that were hosted on my HostGator account were already pointing to my nameserver (whose IP Address was just changed), they automatically began to point to the new location.

The Data Migration

Now that all of the software was installed and all of the domains pointed to the right location, the process of migrating data could begin. This was a daunting task, of course, since I had about 10 websites worth of data whose files and databases needed to stay in tact, preferably without any noticeable change. Luckily, the process was actually rather easy to do. Of course, I made many mistakes along the way, so here are the steps that I took that ended up working properly:

  1. In the individual cPanels of all of the accounts hosted on my HostGator VPS (Which I still could access through the old IP Address of the server since the domain names were no longer attached), I performed a full backup and sent the .tar.gz files to the /home directory of the new Digital Ocean VPS using cPanels built in “backup-over-SCP” with the root account. This took a while, but I got a handy-dandy email notification when each account finished backing up.
  2. After all backups were completed, the .tar.gz files were named something like “-.tar.gz”. In order to quickly migrate the accounts into my new CWP setup, I had to change the naming scheme to “-cpmove.tar.gz”. Once this was complete, I could login to the admin account of CWP and create new accounts using the “migrate from cPanel” functionality, which automatically filled in the necessary information.
  3. Unfortunately, at the time of my migration, CWP’s “migrate from cPanel” functionality was not working properly. Thus, the migration didn’t actually transfer any data. However, it did seem to setup a MySQL user and a home directory in the same username that was provided in the .tar.gz backup file. Now that a home directory was created, the rest of the backup process could be completed. I started by (Still logged in with the root account) using chown to change the ownership of the “.tar.gz” backup files and then used cp to copy them into the user’s home directories. After this was complete, I logged into CWP and made sure that SSH Shell access was enabled for all of the users on my VPS so that the next step could be completed.
  4. The next step was to actually process the backup file. This could be done by SSHing into the server using the newly created user’s SSH credentials. Once logged in, I extracted the backup file using tar -xvf. This put everything into a nice backup folder. Inside of the backup folder, the entire user’s mail, MySQL data, and file hierarchy from the old HostGator VPS was maintained. In order to get their site up and running as fast as possible, I copied backup/homedir/public_html into their ~/public_html directory. This put their website online and made it viewable to others.
  5. Finally, all I had to do was restore the user’s MySQL data. There were two processes that had to be completed. The first of which involved restoring all of their tables. This could be done by navigating to the ~/backup/mysql folder and using MySQL to process all the *.create files and then all the *.sql files. This created all the tables and then populated them with their data. The command calls looked like
mysql -u -p < TABLENAME.create
mysql -u -p TABLENAME < TABLENAME.sql

Once this was completed for all of the files in the ~/backup/mysql directory, we would need to restore the MySQL user accounts and passwords that existed on the old HostGator VPS so that it would seem like nothing was changed. This could be completed my finding the file ~/backup/mysql.sql and calling its queries as the root MySQL user, as such:

mysql -u root -p < mysql.sql

After this is completed, everything should be setup.

The Final Moments

After all of these steps were completed, the entire server was successfully migrated. There were a few issued I encountered; mainly, the site would stop working after scheduled backups ran since the backup files ate up disk space and prevented the MySQL server from running properly. After backups were disabled, however, this issue was fixed.

After running the server for around 2 weeks without any issues, I decided to close my HostGator account. So far, I have encountered no issues and everyone on the VPS seems to be happy with CWP (Some people even said it was less confusing than cPanel!). The next steps I am going to take are customizing CWP to be branded for my company, and as I complete this task, I will post a guide.

Hopefully this post has helped you migrate your server or inspired you to do so!

Staying Organized in 2015

Every day I do my best to keep myself organized. I keep my files in their own folders, I keep my desktop clean, I keep my calendar free and relevant, I clean up my phone contacts fairly often, I keep a task list. However, after about a month, none of this seems to matter. I’m not sure how many people experience this, but it seems that no matter how hard I try, I always end up being lazy for about a week and that ruins everything. I save all my downloads to my desktop, I don’t put pictures in their correct folders, I don’t name files in my usual naming convention. All of this leads to chaos. My task list is currently running rampant with tasks that were never actually meant to be completed. I need to bring this to an end. Here’s how I plan on doing it.

E-mail

One of the main problems with my organization has been e-mail. For the past 6 or so years, I have been using Mozilla Thunderbird as my primary e-mail solution. All of my email accounts were imported into my portable version of Mozilla Thunderbird which was saved in my Dropbox so that it would be synced across all my devices. This, honestly, worked quite well. Recently, however, I have been running many operating systems (Android, Linux, Windows) and having all my files synced across these devices is a challenge, especially when one file is a .exe file. Thus, after months of searching for a solution, I have decided to go with a web-based solution. I have decided to use Gmail.

Although it’s not surprising in the least (everyone uses gmail), I never knew that you could import POP3 mail accounts into Gmail and send/receive mail as if they were your primary Gmail address. The integration is seamless and all of my mail goes into one easy-to-use unified inbox, just like in Thunderbird. I’m a happy camper. What makes this even better, though, is that it syncs with the Android Gmail app, so that all of my emails (and imported accounts) are synced to my Android device.

I have also made a commitment to myself to delete emails that I didn’t need immediately. This way, my email inbox is never cluttered with a bunch of stuff that I will get to eventually. That phrase is long gone.

Schedule Management

I love calendars. I’ve always had one of those little date-books where I wrote down what I needed to do and what was in store for me every day of the week. Today, however, carrying around a little pocketbook isn’t all that feasible. It is the digital age, and my calendar must correspond accordingly. Thus, I have become an avid user of Google Calendar. Another completely unique decision. I’ve tried Google Calendar in the past, but I never really kept up with it because I would forget to look at the calendar and/or schedule events on the calendar. To circumvent this, I use a few methods. First off, my calendar lives in a pinned tab in my Google Chrome, so it is always there watching me and alerting me of any upcoming events. On top of that, I’ve found that its icon actually reminds me to schedule events and keep track of what I should be doing. I’ve done the same sort of thing on my phone. I use Today Calendar to display a nice little Agenda widget on my homescreen so that whenever I look at my phone I see exactly what’s next on my plate. I now understand why people hang calendars on their walls. Having a calendar constantly staring you in the face really helps you stay focused and stay on top of the things that you want to accomplish.

Along with my calendar, I have also started heavily using task lists. Of course, there is a task list built into Google Calendar, Google Tasks. Why not use that? So I am. It’s perfectly simple. I simply type in what I need to do and it sits there, right next to my calendar, telling me that I need to do it. No gimmicks, no fancy user-interface, no fancy animations – Just a task list. It’s just what I need. On my phone, I use the Tasks app to follow my tasks. Of course, it’s the same deal on my phone.. it simply lists the tasks that I need to complete. Although it’s not much, it definitely helps me stay focused.

Item Organization

A big part of staying organized is staying clutter-free. This means organizing everything in your daily life. Whether it be having a special place to put pens or organizing books by author’s last name, anything can help. There are many things that I have decided to do to keep my stuff organized.

  • I make my bed every morning. I know this is more of a personal issue, but I am convinced that hopping into a completely made bed at night actually helps me sleep better. On top of that, it makes my room look clean and tidy even when it’s not.
  • I do my dishes every night. Again, this is a more personal issue, but it also helps me stay much more organized. When I wake up in the morning, I can get started with my morning routine almost immediately. I don’t need to worry about washing my bowl for cereal or not having a clean spoon to use. It’s great.
  • I control my phone’s files. Especially with pictures, my phone is a mess. All these photo apps (Snapchat, Instagram, Facebook, Twitter, etc.) all put their pictures in their own separate directories. This makes accessing photos very difficult if I am looking for a specific picture. Thus, I am using Redirect File Organizer to move all of my pictures to a single directory. It really helps. On my computers I am doing something very similar. I am making sure that I don’t save anything to my desktop and I put the files where they belong the first time. It’s amazing how much frustration this saves.
  • Notebooks are also a recurring problem for me. I love pens, I love stationary, and I love notebooks. I have a ton and they are very unorganized. Thus, I have decided to take the advice of the label-freaks around the world and label my notebooks and arrange them in alphabetical order. I have also done the same with my books. Say what you want, these small changes work wonders.
  • Music is another thing that I find myself being stressed about often. Instead of having my music collection neatly organized, I just have a list of songs. This is something that has been changing as of late. I am now an avid user of Spotify and I make sure to put all of the songs that I wish to keep into playlists that reflect when I want to listen to them. So far, things are going great.

Overall, being organized is a great thing. It eases a lot of stress and makes daily life a lot smoother. I highly recommend taking a week of your time to sit down and really organize everything. You won’t regret it.