9thport ruby, rails, sysadmin, os x, and other stuff

20Feb/090

changing the host name on redhat linux

This is for archival purposes from a discussion I found:

Edit the following and change where necessary:

/etc/hosts
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0 (depends on NIC name)

then reboot.

Filed under: Sysadmin No Comments
19Feb/090

using the tab button to access graphical user interface buttons (or gui) to make navigation faster

In Mac OS X some dialog boxes or web pages that have buttons or fields are presented at many times throughout the entire use of the system. I myself use OS X all day and in most cases, all night.

Moving between these items with the TAB button has improved my productivity because the TAB button is so much closer than the mouse.

But, this feature is not turned on by default. You might think, "It is turned on and I use it all the time! I don't think you know what your talking about". Well, if that's is how you feel, but are still curious, check out the pic I shot from the Keyboard Preferences:

os x 10.5 keyboard preference pane

os x 10.5 keyboard preference pane

Take notice towards the bottom of the window where the following text of "Full keyboard access:" and the option of "All controls" is selected.

This allows you to TAB around just about everything that is clickable by the mouse! I absolutely love this option and always forget about turning it on.

13Feb/090

screen cheat sheat

I have forgotten all about screen. Here are some reasons why I like using this program:

  1. when your network cuts out, screen keeps the jobs running (very good for vpn users or if need to reload your firewall rules)
  2. split screen of terminals, good for having shells open on a single window and monitoring activity
  3. low memory and blazing fast

My biggest problem is that I never actually dived in to screen and what the powers that it holds. That is all going to change with this post. Lets see how far I can push screen into my daily tasks at work.

Task 1 } Running a long job and logging off

Description:

I have an upgrade command that needs to be executed but I know it will take several hours (even a day or two) to reach completion. Since I am using ssh to login to the server, I would like to log off the computer and shutdown my workstation before I go home (because I am using a laptop). I know some one might say "just make it goto the background" or "use nohup" but these all have potential for being killed if your network gets cut.

Solution:

Screen to the rescue! Use the following steps to start the long process and detach:

  1. % ssh username@hostname
  2. % screen
  3. % ./long_process.sh
  4. press CTRL + A
  5. press D
  6. % exit
  7. your now back at your workstation with ./long_process.sh running its merry little head off

Explanation:

In step 1. we connect to the box. Step 2. we launch the screen program with step 3. launching the long process. Step 4. is where we use screens power to invoke the command mode and in step 5. press the letter D for Detaching from the screen session. Rest of the steps are logging off... just to be complete, I don't really know why I wrote them in.

Task 2 } Reconnect to an existing session

Description:

There is already an existing screen session running and I need to reconnect to it.

Solution:

Lets first list all of the sessions that are active with there status:

$ screen -list
There is a screen on:
41960.ttyp0.rock        (Attached)
1 Socket in /tmp/screens/S-aaron.


Now lets connect to that session:

$ screen -r

Filed under: Sysadmin No Comments
5Feb/090

Chumby sticker seen for my first time in the wild

On my way to work I saw a Chumby sticker!! I was so excited that I took a picture with my iPhone.

I really want to get a chumby for my desk at work. Why at work? Because that's where I will see it the most. Pehaps I could have it at home but I am not in any one place for long amounts of time to have a Chumby be in my area of vision.

Seeing the chumby sticker put such a big smile on my face this morning. I think today will be good no matter what happens.

Filed under: Design, Fun, Tech No Comments