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 (?)




vi for nano lovers #
For the very occasional vi / vim user who just wants to edit a config file on a remote server, thank you very much:
Switch to insert mode (from which you can enter text)
i

Switch to command mode (from which you issue the commands below)
ESC

Quit without saving changes
:q!

Save (write) the file
:w

Save (write) the file and quit vi
:wq

Delete characters under and after cursor (like Del key in most apps)
x

Delete characters before the cursor (like Backspace key in most apps)
X

Find previous
?

Find next
/

Cursor up, down, left, right (arrow keys may also work)
k, j, h, l

/nix | Mar 31, 2009

Bypass Dell Inspiron 1100 battery check during BIOS update #
Installing Ubuntu (or any Linux distro for that matter) on a Dell Inspiron 1100 requires updating the BIOS to version A32 for video to work properly (8.10 instructions).

Unfortunately, the BIOS flashing utility (I1100A32.exe) will halt if it does not detect a charged battery:
ERROR
Battery must be installed.

ROM update not performed.
Press any key to exit.
Perhaps there are some documented command line switches or arguments? Apparently not:
A:\>I1100A32 /h

 Flash BIOS Update Program - Version A32
 Copyright 1990-2003 Dell Computer Corporation.  All Rights Reserved.

usage: I1100A32
The scanty documentation was equally unhelpful, as were my attempts to reverse engineer the flasher with IDA Pro and OllyDbg. Running strings for a clue to some switch or other proved fruitless as well.

UPDATE 1: I finally found the hidden switches in I1100A32.exe with a standard hex editor - they were "encrypted" with a ROT-1 Caesar cipher!! The first group is from the DOS app, the second group from Windows (both versions are included in the EXE, which can be split using DualEXE Manipulator):

OPQBVTF GPSDFJU KBCJM EXJN OWSBN XJQFOWSBN WFSCPTF QSHCPPU CPPU SFBEH[GJMF SFBESPNGJMF XSJUFSPNGJMF XSJUFIESGJMF OPSFCPPU JOGP GBDUPSZ TFSPVU C:711 GPSDFUZQF NJOJWV
...
DMBTTJD SFQPSUTUBUVT OPSCVSFTVMUT SCVSFTVMUT XSJUFSPNGJMF XSJUFIFYGJMF XSJUFIESGJMF XJQFDMFBO XJQFBMM WFSCPTF QSHCPPU OPSFCPPU OPQBVTF JOGP GPSDFUZQF GPSDFJU GBDUPSZ FEWV CPPU

Let's rotate them: $ tr '\60-\72\101-\172' '\57-\71\100-\171'

NOPAUSE FORCEIT JABIL DWIM NVRAM WIPENVRAM VERBOSE PRGBOOT BOOT READGZFILE READROMFILE WRITEROMFILE WRITEHDRFILE NOREBOOT INFO FACTORY SEROUT B9600 FORCETYPE MINIVU
...
CLASSIC REPORTSTATUS NORBURESULTS RBURESULTS WRITEROMFILE WRITEHEXFILE WRITEHDRFILE WIPECLEAN WIPEALL VERBOSE PRGBOOT NOREBOOT NOPAUSE INFO FORCETYPE FORCEIT FACTORY EDVU BOOT

Additional information on these switches can be found here and here. Don't play with these unless you know exactly what you are doing and are willing to take responsibility for your actions.

UPDATE 2: Didier Stevens kindly updated his open source XORSearch app (which helps uncover obfuscated strings) to support ROT encoding. Usage example: C:\>XORSearch -f file.with.list.of.strings.to.find file.with.obfuscated.strings

Thankfully, Christopher Muto had posed the following question to alt.sys.pc-clone.dell back in 2004:
   does anyone know of a way to flash the bios on an
   inspiron 3800 that does not have a battery?
Even more fortuitously, Bill Joy had responded:
   I have heard of a /forceit option when executing
   the flash. Another option I have seen is /jabil
   when forcing it to flash when it thinks it has an
   incompatible BIOS update -- maybe try it if the other
   option does not work?

   Since these batteries are available on eBay for only
   $40-50, it is probably not worth the risk of damaging
   your system.
Throwing caution to the wind, I decided to give the /forceit option a try (readers: do so at your own risk and joy). Lo and behold, the evil battery check was miraculously bypassed! Hallelujah!

/misc | Mar 29, 2009

Who needs a database when you've got sed and awk? ;-) #
As a simple text-based site, TinyApps.Org is ideal for parsing with *nix text processing commands. Here is a one-liner to calculate the average file size of the Palm apps:

grep -o "\[.*\]" palm.html | sed 's/[^0-9]//g' | awk '{s+=$1}END{print s/NR}'

Let's break it down:

First, grep will return all patterns within palm.html matching an open bracket, followed by anything, followed by a close bracket. The -o option (only-matching) instructs grep to show only the part of a matching line that matches the pattern (as opposed to returning the entire line). This gives us output like:
[58k]
[62k]
[296k]
...
Next, we'll use sed to (s)ubstitute any non-numeric character with nothing, (g)lobally:

sed 's/[^0-9]//g'

which returns:
58
62
296
...
Finally, we'll use awk to total and average the numbers:

awk '{s+=$1}END{print s/NR}'

{s+=$1} sums the first (and only) column. {print s/NR} prints the sum divided by NR (an awk variable that returns the Number of Records (i.e., lines) read so far).

And the result is:
112.324
This worked beautifully on all of the other app pages as well (osx.html, internet.html, etc) save for one: system.html. On that page, one of the entries reads: "[various sizes]". This is the only instance in all of the app pages where a number is not listed within the brackets. As a result

grep -o "\[.*\]" system.html | sed 's/[^0-9]//g'

displays a blank for that line:
...
1454
     <-- Note the blank line here
30
...
which means that awk divides (in this case) 18729 by 55 records instead of the correct 54.

In order to remedy this problem, we will add a second command to sed, separated from the first by a semicolon:

sed 's/[^0-9]//g;/./!d'

/./!d deletes any line which does not contain at least one character, thus removing the single blank line. Now awk will divide the total by the correct number of lines to arrive at the true average (346.833). The full one liner is now:

grep -o "\[.*\]" palm.html | sed 's/[^0-9]//g;/./!d' | awk '{s+=$1}END{print s/NR}'

Do you have a faster/leaner/tinier method? Or perhaps another interesting one liner? Please share the goodness!

/nix | Mar 28, 2009

Random harvest #
  • UBIK "is a minimal, console only, utility for managing small fragments of info like your book or CDROM collection, URLs, etc, from the commandline." (via the author, Mike Sanders)
  • MemPad "is a plain text outliner and note taking program with a structured index. All pages are stored in a single file." Like a mini version of Treepad. (via Mike Mills)
  • Gaijin.at freeware apps - A rich bounty of neat little tools, from port mapping, to USB write blocking, to offline registry viewing - a must-visit for tiny app fans.
  • Comparing and merging folders in OS X: via Terminal, Xcode's free FileMerge, and Changes, a very cool shareware app that handles conflicts (like filename collisions) well.
  • PixaMSN v0.61 - Tiny open source MSN Messenger clone. "It consists of a small executable file and nothing else. Nothing is written to your hard disk, nothing is stored in your registry." (via Corrado)

/misc | Mar 28, 2009

Regular expression builders and tutors #
  • Windows
  • Mac OS X
    • RegExhibit - "Shows you what your regular expressions match as you type on a sample text you provide"
    • Reggy - "Open-source OS X regular expression tester/viewer"
  • Platform-independent (and my favorite)
    • txt2regex - "A regular expression wizard that converts human sentences to regex." It is a single, self-contained bash script - just download and run.

Wikipedia lists an assortment of regular expression apps, including many web-based offerings.

/misc | Mar 28, 2009

Calculate wattage for your PSU #
eXtreme Power Supply Calculator Lite helps you estimate what size power supply might be appropriate for your hardware. Although it is a simple web-based app, the following notice appears at the top in red caps: "ATTENTION: FOR PERSONAL, NON-COMMERCIAL USE ONLY". There is a Pro version for $1.99 which presumedly permits commercial use, though this is not explicitly mentioned in the comparison table.

/misc | Mar 22, 2009

Bypass Seagate DiscWizard's brand check #
Seagate Discwizard is now based on Acronis True image 11, which offers cloning (proportional if desired), backup/restore, and wiping of disks. Normally, an internal Seagate/Maxtor brand drive is required for the boot CD to function (otherwise the following message appears: "Error - To use the product, at least one Seagate or Maxtor device should be installed in your system"). This is an unfortunate bug for users of Seagate/Maxtor external devices. Thankfully, fmyhr has posted a workaround on Seagate's Community Forums that was provided by one of their techs: at the error screen, hold down Alt while typing "t" then "o" (for "tech override") and then click OK.

/misc | Mar 21, 2009

Command line time tracker #
Michael Stumpf kindly informs us of Trevor Caira's Timebook, "a small utility which aims to be a low-overhead way of tracking what you spend time on. It can be used to prepare annotated time logs of work for presentation to a client, or simply track how you spend your free time. Timebook is implemented as a python script which maintains its state in a sqlite3 database."

/nix | Mar 15, 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