For one reason or the other, I have often had a need to find matches in large data sets, usually containing significant quantities of text. One example was a 100k chapters of stories (totaling about 1.5Gb, unformatted) that I wanted to be able to search. While this is quite small when compared to even the… Continue reading Full Text Searching
Month: September 2010
Change Permissions of Specific File Types
To change the file permissions for all PHP files to 754: find . -type f -name ‘*.php’ -exec chmod 754 {} \; To find all files with permissions 754: find . -perm -754 To find all files that are not writable by the owner: find . ! -perm -u+w
Fix Line Breaks
To convert all files: $ find . -type f -name -exec dos2unix {} \; To convert specific files (by type): $ find . -type f \( -name “*.php” -o -name “*.txt” -o -name “*.css” \) -exec dos2unix {} \;
On the obsolescence of the Human species
Humans aren’t the fastest, strongest, biggest, smallest, or most efficient creatures. The only advantage we have is a well developed cerebral cortex. Of course, superior intellect can allow us to compensate for the areas which we lack. We currently have a problem with said superior intellect however. If we are unable to evolve to overcome… Continue reading On the obsolescence of the Human species
Living Networks
The average person is likely to consider computers to be simply tools to accomplish a task – inanimate silicon circuits. But, is that entirely true? I recently encountered an instance where network connectivity had dropped considerably, but appeared to be gradually improving without anyone doing anything to actually address the problem. It was mentioned to… Continue reading Living Networks
Diagnosing a computer that won’t POST
Today, I was asked to diagnose a computer that wouldn’t POST over the phone. POST is the power-on self-test – it is self-check cycle that the computer goes through before ‘starting’ – it usually checks the motherboard (for short circuits), CPU, RAM, and graphics card for some basic level of functionality. Basically, this computer would… Continue reading Diagnosing a computer that won’t POST
Setting up a RAID on EC2
At home, I have my operating system drive setup in RAID 0 (striped). The advantage of this, of course, is that read and write speed is appreciably increased (my benchmarks show the array to be about 1.7x as fast as either drive on its own (mind you, I am using older drives, and they are not quite… Continue reading Setting up a RAID on EC2
Balancing Chemical Equations Using Matrices
There are some days when technology just doesn’t agree with one, so today’s post is more scientific in nature. There are many instances when chemical equations need to be balanced, and perhaps mentioning them outside of school is geeky enough, but this isn’t going to be a science lesson. Most of us learned how to… Continue reading Balancing Chemical Equations Using Matrices
Fixing Headphones
When the computer is on – there is music playing. Probably not an uncommon statement – I find, however, that it is frowned upon to be playing music at 2 am, or other such times. Headphones are the natural answer (NOT the earbud kind). I have used a pair of Sony MDR-XD100’s for the past… Continue reading Fixing Headphones
Migrating an AMI to use an EBS-root
As some of my sites run code not permissible on shared hosting plans, I have previously used a dedicated server, and more recently (the past year), have used Amazon EC2. My original images ran in the m1.small category (the default), but with the addition of the t1.micro category last week, I decided to migrate to… Continue reading Migrating an AMI to use an EBS-root
Hello world!
The typical first program output seems as good as any for a starting post on what will hopefully become a tech site.