Chris Jean's Blog

Linux, WordPress, programming, anime, and other stuff.
twitter
rss

Archive for Development

As I mentioned before, I want to switch from using Subversion for project code collaboration and versioning to Git.

I’m switching not because I have some idealogical dread of Subversion or its methods. In fact, I quite like how much easier Subversion has made handling code collaboration. The problem I ran into is that Subversion has become doggedly slow and bloated.

For example, a simple project with a current working size of 2.9MB has a Subversion repository that is a massive 98MB in size. Furthermore, it takes a full four minutes to commit a change, even a simple one-line change to a text file. During this commit process, my server’s dual quad-core processors are essentially maxed. Why the repository has become so amazingly large and why the commits take so long, I’ll never know. The maxing out of my server for four minutes per commit is also unacceptable since there are times where minor changes will need to be made to more than a dozen repositories at a time. Multiply the number of commits by 4 minutes a piece, and not only is a terminal on my system tied up for more than an hour, but my server’s CPU is maxed for just as long.

Beginning last week, I dug into Git and learned what I needed to know. The initial impressions are great; however, Git is not without its problems either. The primary problem with Git is that its syntax is extremely-obscure, IMHO.

Continue reading “Goodbye Subversion, Hello Git”

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.

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”

Did you know that you aren’t limited to working on one thing at a time while on a Linux command line? You can actually “minimize” a program that you are in, get back to the command line, and then return to the program whenever you’d like.

When you run a program or script on the Linux command line (from now on referred to as the shell), you are creating a new job. For those that are used to GUI environments, each of these jobs is somewhat like a window on the desktop. Just as you can have multiple windows and switch between them, the shell is capable of managing multiple jobs and allows you to switch between them.

There is a lot to cover, so let’s start simple by describing what states a shell job can be in.

Continue reading “Multitasking from the Linux Command Line + Process Prioritization”

In many of my Tips ‘n Tricks or tutorial posts, I have commands that involve editing/creating files in Vi. For those that have never used Vi, it can be a daunting experience trying Vi for the first time.

There are many holy wars fought over the best editor to use from the *nix command line. I won’t claim that Vi is the best; rather, Vi is simply what I’m used to, it’s powerful, and it is always available on servers that I work on.

In order to best help those that don’t know how to use Vi but are interested in learning, this will serve as a very brief tutorial on how to get started.

Continue reading “Using Vi/Vim as a Command Line Editor”

I’m playing around with git as a possible replacement for Subversion (svn). I’ll probably blog about my reasons for wanting to switch and also have some tutorials. For now, I wanted to quickly share the fix for a problem I encountered that wasn’t really handled by the documentation.

I set up a bare remote repository to test git out. Everything looked good as I got this going, but then I hit a big snag.

When I tried to push the local repository back to the remote repository, I received the following error:

Continue reading “git: “Project description file hasn’t been set””

In one of my earlier posts, I talked about setting up Ubuntu 64-bit on my Dell Studio 17 laptop. I provided some information on how I set up Flash on my system. This solution used the 32-bit release version of Adobe’s Flash plugin and nspluginwrapper to allow the 32-bit plugin to be used with the 64-bit version of Firefox. I had just a few problems with this solution:

  • Google Analytics would crash the entire browser if I tried to change the date range.
  • Hulu would always take at least a minute to load any video. Full length videos would sometimes take as long as five minutes to load.
  • Youtube would often times not work correctly.
  • Random parts of certain Flash applications would not work at all.
  • The new Hearts of Space Flash player didn’t work.
  • All too often, all Flash apps would fail. This resulted in every instance of Flash being replaced with a light-gray background.

Fortunately, I found a great solution to this problem: an actual 64-bit Adobe Flash Plugin.

Continue reading “Proper Adobe Flash Support on Ubuntu 64-bit”

I touched on this topic in my First Day with Ubuntu at the Office post under Accessing Remove File Systems; however, I thought that this deserved its own topic.

For those that don’t know SSH stands for Secure SHell. In very non-technical terms, SSH allows you to access a system running a SSH server over a network. This other system can be another computer in your home or a remote system on the other side of the planet. SSH will allow you to connect to that other system and communicate with it securely. All the data passed back and forth is encrypted, so you don’t have to worry about people sniffing your passwords or valuable data.

You may be asking what all of that means to you. What it means is that you can connect to and control a computer that is somewhere else with the computer that is sitting right in front of you. If you have a remote webserver running Linux, SSH will let you install software, edit files, change the server configuration, access the database, and more. Did you forget a file on your computer at home? No problem, just SSH into your home computer and send the file to your email account or copy it directly to your office computer.

Hopefully those quick examples of what you can do is enough to whet your appetite.

Continue reading “SSH Tutorial for Ubuntu Linux”

Sorry about the late post everyone. I had a long week and went to bed before making sure a post was queued. Hopefully you’ll forgive me. :)

I’m working on a project where I needed to generate a MIME type given a file name. Not only did I need to create a solution that worked, I also needed the solution to be compatible with PHP 4/5 and not require any additional software to be installed on the host. I thought this would be a simple matter of finding a PHP function that does this. Unfortunately, things were not as simple as this.

Continue reading “Generating MIME Type in PHP is not Magic”

Since beginning work on my DNS Yogi site, I’ve had to do numerous regular expressions to matching all sorts of string bits. I quickly ran into problems when I realized that I need to add support for Unicode characters since certain TLD registrars support registrations with non-Latin characters.

The main issue is that there are multiple regular expression engines. PHP uses a flavor of the PCRE (Perl Compatible Regular Expression) engine. Each engine and varient of an engine has a slightly different way of handling regular expression syntax. I needed to find out exactly how the PHP regular expression engine worked, and finding that information was not easy.

Continue reading “PHP Regular Expression Syntax References”