Archive for Tips 'n Tricks
Now that I know how to do this, it seems so easy and straight-forward. To change the default application files of a specific type are opened with, do the following:
- Right-click a file that you wish to change the default application for and select Properties.
- Click the “Open With” tab.
- Select the desired application’s radio button.
- Additional applications can be added if the one you want is not listed. Use the Add button to find the desired application.
- You can also remove applications from the list by highlighting the application and clicking the Remove button.
- Adding applications to or removing applications from this list changes which applications are available in the “Open With” option when you right-click a file.
- Click the Close button.
Again, it seems so easy and straight-forward now. Go figure.
I’ve spent a little more than a month working with Git now. I can honestly say that while there are many things that I like about Git, there are just as many things that I personally find to be a pain in the butt.
Submodules specifically have managed to be a thorn in my side on many occasions. While the concept of submodules is simple, figuring out how to actually work with them can be a chore. I say “figuring out” because not everything about working with submodules is well documented. I’ll cover two of the more difficult things to figure out: removing and updating submodules from your repository.
Continue reading “Git Submodules: Adding, Using, Removing, and Updating”
I recently worked on a project where I had to sort a set of rows returned from a MySQL query. The problem is that most of the data in the field being sorted is numeric yet the field type is varchar since some of the entries contained characters.
The reason that this is a problem is that MySQL sorts character fields using a method that will produce undesirable results with numeric data. For example, sorting 4, 10, and 50 as character data produces 10, 4, and 50. In most applications, this is highly undesirable.
The solution to this is to force a sorting order that is commonly referred to as a natural sort. Natural sort is just a term that refers to how humans would commonly sort a set of information (numbers as numbers and non-numeric characters alphabetically). Fortunately, this isn’t difficult to achieve in MySQL.
Continue reading “MySQL Natural Sort Order By on Non-Numeric Field Type”
Linux has many great tools built in that help maintain the system without user intervention. One such tool is Cron.
On my Ubuntu 8.10 system, there are many things that are set to run each day: locate database updates, misc cleanup utilities, automatic package updates, log rotations, etc. All of these are managed by the Cron system.
For a while, I needed to manually run the updatedb command to update the locate database, and I never thought about why. The problem is that my daily, weekly, and monthly Cron jobs never run. The reason for this is that these Cron jobs are scheduled to run very early in the morning, when my system is off. Thus, these job schedules never run.
The solution for this is easy. I simply need to change the times these run at to times when my system is on.
Continue reading “Changing When Daily Cron Jobs Run in Ubuntu”
These days, I really want to dabble around more with virtual machines. They have a lot to offer for benchmarking and failover protection. However, I always thought that you needed a host OS to run the virtual machines in. In my experience, this was clunky at best and riddled with problems such as automatted startup of virtual machines, stability of the host OS, and degraded performance.
I’ve used virtual machines lately with Sun’s VirtualBox, a free virtualization platform that can run virtual machines. This has been valuable for testing different distros, but wouldn’t suffice for running virtual servers. At least, it wouldn’t based on my experiences.
I have a friend that has worked professionally with virtualization technology for a few years, and he pointed me to a VMware product called ESXi. Not only is ESXi free, it runs as the native OS in which other OSes can run virtually.
I have yet to test it out, but it shows great potential. If you have any experience with ESXi, I’d love to hear it.
I just started using the Press This feature of WordPress, and I quickly ran into a problem. Each time I’d try to use it, I’d get a 404 error page.
I’m not sure exactly what the issue is, but there is an easy fix that you can find here.
A few days ago, I blogged about changing the timezone on a Linux server. In the post, I mentioned how the zoneinfo files needed to be updated in 2007 due to congress expanding the number of days that Daylight Saving Time covers. However, I did not go in depth about how to update the zoneinfo files.
Since then, I’ve received many search queries from people looking for information about why their server did not properly update when the Daylight Saving Time change hit. For instance, I got queries of “is daylight savings default in centos”, “daylight savings time didn’t change centos”, “dst timezone change centos”, and many more. It’s clear that there are server administrators out there that are very confused about the Daylight Saving Time situation on their server.
Today, I hope to remedy that problem and give server administrators the information they need to update these zoneinfo files. I typically focus in on specific platforms, but today, I’ll try to cover as many distros as I can as well as provide a universal solution.
I’ve had a lot of fun recently posting about how to do stuff on the command line in Linux. My focus is specifically for Ubuntu users, but the information and techniques can be used for any Linux distro.
Since I’m probably going to end up with a lot of content under this topic, I’ve decided to create a dedicated tag: Mastering the Command Line. I’ve gone through my older posts on this topic and tagged them as well. So, make sure to check out Mastering the Command Line if you want to know how to become a command line power user.
Back to today’s topic. You’re starting to learn how to use the command line, but it’s annoying to always have to type in similar commands over and over. If only there were a way to pull up commands that you’ve already run to run again as is or to quickly modify. Today, I’m going to teach you how to do exactly this.
Have you ever seen a bunch of ^M characters in a text file? This odd character at the end of a line can also be represented as a Ctrl+M or <CTRL>M. You don’t know what it is, and you want it to go away.
Today, I’ll help you understand what that odd ^M character is, why it is in some of your documents, and how to get rid of them.
Continue reading “Convert DOS-Formatted Files to Unix-Format in Ubuntu and CentOS”
I’m more or less taking the night off. I’ll leave you some good reading material that should cover just about any reader that comes here.
- Make Linux: Harder – Better – Faster
This page is a great compilation of links on how to improve security, speed, functionality, or appearance of your Linux system. - Firefox Minefield
Very interesting version of Firefox that is in development. Apparently, it is capable of massive speed and gives Chrome a run for its money. - Conky
A highly-customizable graphical system monitor for your Linux desktop. - Armed and Dangerous
A blog I just happened upon today that has many great reads. The topics are varied, but there should be a little something for everyone. I was hooked with the My comment to the FCC on DRM post, as I share many of the feelings that the author does on the subject. - Swift Weasel
This project builds Firefox from source to provide optimized builds for the Linux platform. It’s still in the early stages but has potential.
I hope that my big post yesterday makes up for my weak one today.




