Monday, December 28, 2009

Paste Special... Unformatted in Office Mac 2008 PowerPoint

Geez. Too much time looking into such a simple thing. I'm a big fan of using the keyboard instead of the mouse -- much faster for me. No one seems to have a good answer for a keyboard mapping of pasting into PowerPoint 2008 for the Mac. Word, people seem to have. As close as I could easily get is using System Preferences -> Keyboard, Keyboard Shortcuts, Application Shortcuts. And none of the Microsoft Applications even show up so one has to use "All Applications". Lame. Here's a screen shot.

Wednesday, December 23, 2009

Ripping ISOs under OSX

sudo umount /dev/disk1s0
sudo dd bs=1m if=/dev/disk1 of=NameOfIso.iso
and, perhaps most importantly:
drutil burn NameOfIso.iso
This last one helps a lot -- mounting via Disk Utility seems to corrupt certain ISOs...

Thursday, December 17, 2009

Small Linuxes (Linuxi?)

For no good reason, other than curiosity, I wanted to install Linux on an ancient IBM thinkpad 240 maxed out with 192M (!) of dram and a 10G hard drive. I was able to install Ubuntu 9.04 on it, but with some work. The laptop will not boot from its USB (1.0!) port automatically. I had in the past taken the drive out, put it in a desktop, and use that configuration to load OSes. This time, I was able to modify the autoexec.bat file on a wakepup floppy to point to the correct vmlinuz and image files on the USB attached CD (the floppy for Ubuntu didn't recognize it, and neither did smart boot manager) That worked well enough, and 9.04 run okay, if slowly. I then upgraded the machine to 9.10. It did nothing but swap, totally thrashing, just running the OS with no applications. No happiness there. I then tried Damn Small Linux, but it wouldn't recognize the video modes and I couldn't find a workable VGA cheat code. Knoppix was up next, with similar results. Puppy Linux installed without a hitch and that's what the machine is running now...

Overall, too much time spent for too little gain. Should have surplussed the machine and bought a $200 slightly more capable used machine. FWIW.

Monday, December 14, 2009

GNU smalltalk 3.1 on OSX 10.6

I tried to get GNU smalltalk running on Snow Leopard, but ran into trouble. First, it segmented but I found a fix online saying to make a change around line 628 in sigsegv/

+    macos* | darwin*)
+ AC_CHECK_FUNC([vm_region], [CFG_STACKVMA=stackvma-mach.c]) ;;

That helped, but then I ran into the following:

(gdb) run --no-user-files --kernel-dir=/Users/beaty/src/smalltalk-3.1/kernel --image=/Users/beaty/src/smalltalk-3.1/ -iQ /dev/null
Starting program: /Users/beaty/src/smalltalk-3.1/.libs/gst --no-user-files --kernel-dir=/Users/beaty/src/smalltalk-3.1/kernel --image=/Users/beaty/src/smalltalk-3.1/ -iQ /dev/null
dyld: Library not loaded: /usr/local/lib/libgst.7.dylib
Referenced from: /Users/beaty/src/smalltalk-3.1/.libs/gst
Reason: image not found

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007fff5fc01065 in __dyld_dyld_fatal_error ()

So, I had to:
export DYLD_LIBRARY_PATH=$HOME/lib:/usr/local/lib:/lib:/usr/lib:$HOME/src/smalltalk-3.1/libgst/.libs:/Users/beaty/src/smalltalk-3.1/sigsegv/src/.libs

At that point, it bus errored. Firing up gdb gave:

Program received signal SIGBUS, Bus error.
0x0000000100048190 in _gst_mem_alloc (h=0x100200ca0, sz=16) at alloc.c:222
222 blk-> = mem->next;
(gdb) where
#0 0x0000000100048190 in _gst_mem_alloc (h=0x100200ca0, sz=16) at alloc.c:222
#1 0x00000001000233bf in _gst_tenure_oop (oop=0x101014890) at oop.c:738
Previous frame inner to this frame (gdb could not unwind past this frame)

And at that point I gave up (partially because it installed without a hitch on a Linux box) and used MacPorts to grab gst. That worked, but I had hope to install only gst instead of all that MacPorts installs along with it. Dunno if this will help anyone, but maybe it will...

Thursday, December 3, 2009

Remove duplicate files on a Unix system

#! /bin/sh -e

if [ "$#" = "0" ]; then WHERE=.; else WHERE=$1; fi
if [ "`uname`" = "Darwin" ]; then MD5='md5 -r'; else MD5=md5sum; fi


find $WHERE -type f -exec $MD5 '{}' ';' | sort |
    while read a
        b=`echo "$a" | cut -c 1-32`
        c=`echo "$a" | cut -c 34-`
        if [ "$b" = "$prev" ];
            rm -v "$c"