TinyApps.Org
Small is beautiful


 HOME

  0. Internet
  1. Text
  2. Graphics
  3. System
  4. File
  5. Misc
  6. Palm
  7. OS X

 BLOG

 DOCS

 FAQ

 RSS (?)




Top-notch Dell sales rep #
Four years ago I wrote about a particularly helpful Dell business rep. Sadly, he was promoted soon after and I've been drifting through a desert of "also-rans" ever since. Until now. Until Geoffrey Hoeinghaus. Geoff helped me track down an issue that five other reps could not resolve, and has been providing legendary service to my clients. You can reach him at Geoffrey_Hoeinghaus at dell dot com, or by phone at 1-800-456-3355 x 9462831.

/misc | Nov 27, 2009

Code collections #
  • CodeCodex - "Browse and use pre-written code; learn new algorithms and methods for common programming tasks ... request code that you'd like to see added; supply code that has been requested."
  • DZone Snippets - "A public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world"
  • Progzoo - Code examples in a number of languages which can be compiled and run in your web browser.
  • refactory.org - "Peer-reviewed code snippets that anyone can edit."
  • Rosetta Code - "Solutions to the same task in as many different languages as possible, to demonstrate how languages are similar and different, and to aid a person with a grounding in one approach to a problem in learning another. Rosetta Code currently has 353 tasks, and covers 160 languages." Includes a list of similar projects.

/misc | Nov 26, 2009

Plutarch's On the Eating of Flesh #
Can you really ask what reason Pythagoras had for abstaining from flesh? For my part I rather wonder both by what accident and in what state of soul or mind the first man did so, touched his mouth to gore and brought his lips to the flesh of a dead creature, he who set forth tables of dead, stale bodies and ventured to call food and nourishment the parts that had a little before bellowed and cried, moved and lived. How could his eyes endure the slaughter when throats were slit and hides flayed and limbs torn from limb? How could his nose endure the stench? How was it that the pollution did not turn away his taste, which made contact with the sores of others and sucked juices and serums from mortal wounds? ...

It is certainly not lions and wolves that we eat out of self-defense; on the contrary, we ignore these and slaughter harmless, tame creatures without stings or teeth to harm us, creatures that, I swear, Nature appears to have produced for the sake of their beauty and grace. But nothing abashed us, not the flower-like like tinting of the flesh, not the persuasiveness of the harmonious voice, not the cleanliness of their habits or the unusual intelligence that may be found in the poor wretches. No, for the sake of a little flesh we deprive them of sun, of light, of the duration of life to which they are entitled by birth and being.
The entire chapter can be found in Volume 12 of Plutarch's Moralia. For those who would like to enjoy on their Kindle, Treo, text-to-speech device, etc, I have put together a plain text version here. Bill Thayer has posted HTML versions of Gryllusa and De sollertia animalium from the same volume.

/misc | Nov 22, 2009

Have ls return human readable formats (KB, MB, GB, etc) #
Like du and df, ls supports the -h switch for using unit suffixes (Byte, Kilobyte, Megabyte, Gigabyte, etc), turning this:
$ ls -l
 505223 aida16en.zip
  10273 atomicwebserver.zip
1359260 camstudio20.zip
into this:
$ ls -lh
494K aida16en.zip
 11K atomicwebserver.zip
1.3M camstudio20.zip

/nix | Nov 16, 2009

Create multiple empty files #
The following examples create three empty files of 1MB each:

Unix:
$ for i in {1..3}; do dd if=/dev/zero of=/path/$i bs=1m count=1; done
or,
$ for i in {1..3}; do mkfile 1m /path/$i; done
Windows:
C:\>for /L %x in (1,1,3) do fsutil file createnew %x 1048576
Notes:
  • mkfile can generate sparse files with the -n option.
  • The Windows for loop set is (start,step,end).
  • See also Generate Files with Random Content and Size in Bash, which introduces this script:
    no_of_files=10;
    counter=1;
    while [[ $counter -le $no_of_files ]];
     do echo Creating file no $counter;
      dd bs=1024 count=$RANDOM skip=$RANDOM if=/dev/sda of=random-file.$counter;
      let "counter += 1";
     done

/nix | Nov 13, 2009

Resume an interrupted file copy #
For those times when you've copied 200 of 210GB and then: the network connection goes down, someone inadvertently unplugs your USB drive, or Totus Copy crashes (as I just experienced), rsync can save you from having to start over from square one:

$ rsync --archive --recursive --compress --partial --progress --ignore-existing --append /source/ /target/

Leopard and Snow Leopard still come packaged with the woefully out of date rsync 2.6.9, which does not preserve metadata or modification times correctly, even when using the -E and -t options. Mike Bombich explains how to download, compile, and install rsync 3.0.6, which does not suffer from these issues.

/nix | Nov 13, 2009

Convert man pages to PDF in Snow Leopard #
$ man -w rsync
/usr/share/man/man1/rsync.1.gz
$ gzcat /usr/share/man/man1/rsync.1.gz | groff -man > rsync.ps
$ open rsync.ps
PostScript file opened and converted by Preview. Save as PDF.

/mac | Nov 13, 2009

Convert between Mac, Unix, and DOS/Windows EOL characters (CR, LF, CRLF) #
Craig Stuart Sapp's flip converts ASCII files between between Mac (OS 9 and ealier), *nix (including OS X), and DOS/Windows newline formats. As the provided OS X binary was compiled in 10.3 for PowerPC, I've compiled a much smaller Intel binary in 10.5.  Screenshot

flip's source code also explains a method for converting line endings via Perl:
Mac to Unix:
   perl -i -pe 's/\015/\012/g' mac-file
Mac to DOS:
   perl -i -pe 's/\015/\015\012/g' mac-file
Unix to Mac:
   perl -i -pe 's/\012/\015/g' unix-file
Unix to DOS:
   perl -i -pe 's/\012/\015\012/g' unix-file
DOS to Unix:
   perl -i -pe 's/\015\012/\012/g' dos-file
DOS to Mac:
   perl -i -pe 's/\015\012/\012/g' dos-file
Here are a few more possibilities from Jacek Artymiak's Filtering files with tr:
Mac -> UNIX: tr '\r' '\n' < macfile > unixfile
UNIX -> Mac: tr '\n' '\r' < unixfile > macfile
DOS -> UNIX: tr -d '\r' < dosfile > unixfile
UNIX -> DOS: '{ print $0"\r" }' < unixfile > dosfile

/nix | Nov 08, 2009

OS X: Batch find and replace text or filenames #
MassReplaceIt 2.9.1 [494k] Batch replace text within files or filenames. Supports regex, masks, undo, and more. For multiline search, newlines must be CR (Mac OS Classic). How to convert EOL characters.  Screenshot

/mac | Nov 08, 2009

Installing CHDK on a Canon PowerShot A540 #
The installation instructions found on the wiki and within the Autobuild CHDK download did not work for my PowerShot A540, but this did:
  1. Plug SD card into card reader and card reader into Windows-based computer
  2. Download CardTricks from http://drop.io/chdksoft
  3. Launch CardTricks (screenshot of the following steps)
    1. Click SD card icon and browse to correct drive letter
    2. Format as FAT (SD card will be erased; make sure to backup any files)
    3. Make Bootable
    4. Download CHDK
    5. CHDK->Card
  4. Unmount SD card and flip write protect switch to on (photos will continue to be written to the card just the same)
  5. Make sure camera is off and insert SD card
  6. Put camera into playback mode (i.e., move Mode Switch from red camera icon to blue playback icon) and turn it on
  7. Print/Share button flashes blue, and CHDK splash screen appears on LCD
  8. To access CHDK features, press the Print/Share button (which serves as the ALT button) followed by the Menu button. See also: What are the key settings and shortcuts?

/misc | Nov 07, 2009

Detailed hardware information for Linux #
"lshw (Hardware Lister) is a small tool to provide detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC machines."
  • Download and install for Ubuntu (or grab the source): sudo apt-get install lshw
  • Help (more detailed man page also exists): lshw -help
  • Some interesting options:

/nix | Nov 05, 2009

Warning when attempting to rename, move or delete folder #
Creating a new folder named "New Folder" on the Desktop was not a problem, but attempting to rename, move, or delete it produced the following warning:
Renaming, moving or deleting 'New Folder' could make some programs not work. Are you sure you want to do this?
A quick registry search for "New Folder" with Nir's RegScanner turned up the culprit:
[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\HijackThis.exe]
@="C:\Documents and Settings\username\Desktop\New Folder"
Deleted the crufty key, logged off and on, problem solved.

/windows | Nov 04, 2009

Newly added to OS X page #
Resize 'Em All 1.0.8 [407k] Batch resize and rotate images  Screenshot Download

/mac | Nov 02, 2009



Categories
/blosxom
/mac
/misc
/nix
/palm
/windows

Blosxom Archive
2010: 9 8 7 6 5 4 3 2 1
2009: 12 11 10 9 8 7 6 5 4 3 2 1
2008: 12 11 10 9 8 7 6 5 4 3 2 1
2007: 12 11 10 9 8 7 6 5 4 3 2 1
2006: 12 11 10 9 8 7 6 5 4 3 2 1
2005: 12 11 10

Blogger Archive
2005: 10 9 8 7 6 5 4 3 2 1
2004: 12 11 10 9 8 7 6 5 4 3 2 1
2003: 12 11 10 9 8 7 6

Ezine Archive
2004: 4 3 2 1
2003: 12 9 8 7 6 5 4 2 1
2002: 12 10 9 8 7 6 5 3 2 1
2001: 12 11 10