Monthly Archives: April 2011

Rocks Linux Node Install Error, Boots to Grub

People have built great things with rocks
We had a problem recently with one of our nodes that required replacing the motherboard.  After replacing the motherboard, I was unable to install the node on our cluster again.  I would run “insert-ethers” on the head node and then turn on the compute node.  Insert-ethers would detect a new device, however the node would never request a kickstart file.

After many different attempts to remedy the problem, I was finally able to get the node to instal.  This post will describe the steps I took in order to bring life back to the node.

Continue reading Rocks Linux Node Install Error, Boots to Grub

What to Do if Your Gmail Account Gets Hacked

A couple of days ago my Gmail account was hacked.  I was actually lucky though, as I caught it rather quickly.  The person who hacked my account promptly began to send out mass emails to my entire contact list.  The emails being sent out were to 5 or 6 of my contacts per email.

Luckily, I was on Gmail at the time and the first email that the hacker sent was returned with a Mail Delivery Error.  I promptly changed my password.  I checked my “Sent Mail” folder and nothing was there.  It turns out, the hacker also deleted the emails from the sent mail.  But when I looked in the Trash folder, I noticed that only about 10 emails were sent out.  So out of the 1500 or so contacts I have in gmail, only about 50 of those contacts were spammed.

Now you might be thinking to yourself, “well you probably had a weak password.  I don’t have to worry about getting hacked because I have a really strong password.”  I can assure you, my password was not weak.  It was 14 characters long with UPPERCASE letters, lowercase letters, numbers, and symbols.  It definitely wasn’t my strongest password, but it was far from weak.

Continue reading What to Do if Your Gmail Account Gets Hacked

10 Funny Programming Jokes and Quotes

As a person who enjoys computers and programming, I have noticed that there are a lot of jokes and quotes that I find funny that other people don’t.  So for all my fellow programmers out there, I hope you enjoy the following material.

  1. This is my favorite cartoon/joke out of all of them.A programmer's take on the chalkboard punishment
  2. “Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots.  So far the Universe is winning.”
    (Rich Cook) Continue reading 10 Funny Programming Jokes and Quotes

Useful .bashrc Functions

Screenshot of bashrc fileFor those of you that read my other post about useful .cshrc functions, you know that I like to automate as many processes as possible. If there is something redundant that I do frequently, I will script it or make a function to take care of it.

In an effort to assist those of you out there that like to automate processes but use bash instead of C-Shell, I have compiled a list of some useful functions to stick in your .bashrc file. Here is a list of the functions that this post will contain:

  1. Extract: This function will determine the type of archive you are dealing with, and issue the corresponding command to extract it.
  2. Compress: This function will create a .tar.gz archive of whatever files you give.
  3. Swap: This function will swap the names of 2 different files.
  4. Clock: This is just a random function that will display a digital clock in your terminal window and update every second.
  5. Cpg: This function will copy a file to a directory, and also cd you to a directory.
  6. Mvg: This function works like Cpg, but moves the file instead of copying it.
  7. Findit: This function will search for a file with the given pattern in the name.

Continue reading Useful .bashrc Functions

Finding Text on Any Website on the iPad, iPhone, and iPod

Find in Page Javascript

EDIT: Apparently this is now included in iOS 4.2.  Thanks go to Mowg for bringing this to my attention.

One rather frustrating thing that I have noticed with the iPad (and iPhone) is the inability to search for text within Safari.  Well as it turns out, a simple javascript bookmark is all you need to add this functionality to any iOS device (just like my post on viewing source code).

To enable finding text within any website, follow the below instructions:

  1. Open Safari (pretty self explanatory).
  2. Create a new bookmark.
  3. In the Title window, write whatever you want your bookmark to be named (I chose “Find on Page”)
  4. In the address bar add the following javascript code:
    javascript:void(s=prompt('Find text:',''));s='('+s+')';x=new RegExp(s,'gi');
    rn=Math.floor(Math.random()*100);rid='z' + rn;b = document.body.innerHTML;
    b=b.replace(x,'<span id=" + rid + ">$1</span>');void(document.body.innerHTML
    =b);alert('Found ' + document.getElementsByName(rid).length + ' matches.');

NOTE: The entire javascript should be on one line.  As with the post on viewing source code, I did not develop this javascript bookmark. All credit goes to Matthew Panzarino (Edit: link seems to be dead now).

Enhanced by Zemanta