iMac G5 SATA hard drive keeps disappearing #
Same symptom, different causes:
- Question mark on boot. Partition/format drive, run hardware tests (passed), install OS X - OK
- After a week or two, question mark returns. Replace SATA cable - OK
- After another week or two, question mark returns. Hard drive has failed (verified on another Mac) - install new hard drive and repeat step 1 - OK
- After yet another week or two, question mark returns. Set jumper on hard drive to limit feature set to SATA revision 1.0 (SATA 1.5 Gbit/s) - OK (over
a month 23 months and counting!)
See also:
/mac | Dec 25, 2011
Instant, free file sending / sharing sites #
- WeTransfer - entire site requires Flash; uses SSL
- YouSendIt - "Select File" button requires Flash; uses SSL
- Let's Crate - no Flash (or SSL, apparently). See Sahil Lavingia's other cool project, Gumroad, which makes selling digital content ridiculously easy.
- Ge.tt - no Flash (or SSL, apparently). (via Bjorn Larsen)
/misc | Dec 20, 2011
Combine multiple HTML files into a single PRC ebook #
and generate a table of contents automatically with Mobipocket Creator. Additional keywords: batch, concatenate, convert, HTML2PRC, Kindle.
UPDATE: Concatenate multiple HTML files into a single EPUB file
/eink | Dec 03, 2011
Open source file system drivers for Windows #
Bo Brantén has crafted a number of tiny file system drivers, including:
- FileDisk - use one or more files to emulate physical disks
- HttpDisk - use HTTP to mount disk or CD/DVD images from a web server
- SwapFs - use a Linux swap partition in Windows for temporary storage like a RAM disk
(via Gary Chernipeski)
/windows | Dec 01, 2011
One hand clapping #
- Let thy speech be better than silence, or be silent. -- Dionysius of Halicarnassus
- Silence is the corner-stone of character. -- Charles Alexander Eastman
- Soon silence will have passed into legend. Man has turned his back on silence. Day after day he invents machines and devices that increase noise and distract humanity from the essence of life, contemplation, meditation. Tooting, howling, screeching, booming, crashing, whistling, grinding, and trilling bolster his ego. -- Jean Arp
/misc | Dec 01, 2011
Using wget on Amazon to download search results #
Neither Google nor Amazon index used book descriptions from sellers, making it difficult to find unique or mislisted volumes. In order to download these comments for searching with ack, wget was tried:
wget "http://www.amazon.com/gp/offer-listing/0131103628/?condition=used"
...
HTTP request sent, awaiting response... 204 NoContent
...
Hrm. How about omitting the User-Agent header?
wget --user-agent="" "http://www.amazon.com/gp/offer-listing/0131103628/?condition=used"
...
HTTP request sent, awaiting response... 200 OK
...
Bingo. If there is more than one page of listings (i.e., more than 15 used books available), all pages can be downloaded via something like wget -i urls.txt --user-agent=""
, where urls.txt contains one URL per line:
http://www.amazon.com/gp/offer-listing/0131103628/ref=olp_page_1?startIndex=0&condition=used
http://www.amazon.com/gp/offer-listing/0131103628/ref=olp_page_2?startIndex=15&condition=used
http://www.amazon.com/gp/offer-listing/0131103628/ref=olp_page_3?startIndex=30&condition=used
/nix | Dec 01, 2011
Address Book .abbu & iCal .icbu Archives #
are normally created via File > Export. These archives are actually nothing more than folders, disguised as files, containing copies of:
~/Library/Calendars/longstring.calendar/Events
~/Library/Calendars/longstring.calendar/Info.plist
in .icbu archives, and
~/Library/Application Support/AddressBook
in .abbu archives. Which makes scripting something up to compress, encrypt, and remotely back up your contacts and calendar very simple.
/mac | Nov 27, 2011
Downgrading from Lion to Snow Leopard on the latest Mac hardware #
(See also Install Snow Leopard on a 2011 Mac Mini)
Booting a new MacBook Pro (Late 2011) from a retail 10.6.3 disc resulted in a black screen and a repeating 3 beep pattern. This is due to missing Sandy Bridge drivers. Apple will ship a 10.6.6 (iMac) or 10.6.7 (MacBook Pro) installer disc* upon request which includes the necessary drivers to boot the latest models.†
As I could not wait for the disc to arrive, here is the process I followed to downgrade a new MacBook Pro (Late 2011) from Lion to Snow Leopard (see notes below for a faster method):
- Install 10.6.3 to Firewire drive connected to white MacBook (13-inch Late 2007)
- Boot white MacBook from Firewire drive with 10.6.3 and update to 10.6.8
- Boot new MacBook Pro from Firewire drive running 10.6.8
- Clone Firewire drive to internal SSD with Carbon Copy Cloner or SuperDuper!
- Boot MacBook Pro from SSD - success!
Here is an abbreviated version of Apple's Mac OS X versions (builds) for computers showing only the latest models:
Latest model | Introduced | OS originally included | OS included later |
iMac (Mid 2011) | May 2011 | 10.6.6 | 10.6.7,10.7 |
Mac Mini (Mid 2011) | Jul 2011 | 10.7 | |
Mac Pro (Mid 2010) | Aug 2010 | 10.6.4 | 10.7 |
MacBook Pro (Late 2011) | Oct 2011 | 10.7.2 | |
MacBook Air (Mid 2011) | Jul 2011 | 10.7 | |
See also Finding your Mac OS X version and build information.
Notes & Updates:
/mac | Nov 24, 2011
Carve / extract resources from Palm PRC files #
🌱 prc2bin 1.0 [14k] + Takes a Pilot resource database (PRC) file and extracts each resource into a separate file. 📺 💾
/palm | Nov 14, 2011
American Censorship Day: Nov 16, 2011 #
On 11/16, Congress holds hearings on the first American Internet censorship system. This bill can pass. If it does the Internet and free speech will never be the same. Join all of us on the 16th to stop this bill.
- Website Blocking - The government and corporations can order service providers to block websites for infringing links posted by any users.
- Risk of Jail for Ordinary Users - It becomes a felony with a potential 5 year sentence to stream a copyrighted work that would cost more than $2,500 to license, even if you are a totally noncommercial user, e.g. singing a pop song on Facebook.
- Chaos for the Internet - Thousands of sites that are legal under the DMCA would face new legal threats. People trying to keep the internet more secure wouldn't be able to rely on the integrity of the DNS system.
Americans can send a wake up call to their representatives in a few seconds via the EFF's Stop the Internet Blacklist Legislation page.
/misc | Nov 14, 2011
Bluetooth Internet Sharing with Snow Leopard, Treo 755P, and Missing Sync #
It's easy to connect your Treo 755P to the Internet via Bluetooth thanks to Missing Sync for Palm OS. Just open "Internet Sharing Assistant" under Missing Sync's Help menu and follow the few simple steps for configuring the Treo. No need for enabling "Share my Internet connection with other Bluetooth devices" in System Preferences > Bluetooth > Advanced... or "Internet Sharing" in System Preferences > Sharing. The only caveat is that you may have to setuid on pppd (sudo chmod u+s /usr/sbin/pppd
) to resolve Error: PPP Timeout (0x1231) when connecting. Be aware of the risk involved with setuid:
chmod u+s /usr/sbin/pppd
What this does is make pppd run with root privileges even if the binary is run by an ordinary user. This allows a normal user to run pppd with the necessary privileges to set up the network interfaces and the kernel routing table.
Programs that run 'set uid root' are potential security holes and you should be extremely cautious about making programs 'suid root'. A number of programs (including pppd) have been carefully written to minimize the danger of running suid root, so you should be safe with this one, (but no guarantees).
(from the Linux PPP HOWTO)
Once more:
Programs that use this bit must be carefully designed to be immune to buffer overrun attacks. Successful buffer overrun attacks on vulnerable applications allow the attacker to execute arbitrary code under the rights of the process being exploited. In the event a vulnerable process uses the setuid bit to run as root, the code will be executed with root privileges, in effect giving the attacker root access to the system on which the vulnerable process is running.
(from Wikipedia)
Tested under Missing Sync for Palm OS 6.0.6 and OS X 10.6.8. Additional keywords: reverse DUN, tethering.
/palm | Nov 08, 2011
Interval alarms for Palm OS #
- Timer 0.1 [8k] {S} Sound alarm at regular intervals 📺
- Meditation Timer 1.3.1 [15k] Beeps/vibrates at regular intervals (1 minute to 99 hours). Stops after 1-999 stages or counts forever. 📺
- PocketDoan 3.4.1 [100k] Single and multi-stage meditation timer with audio, vibration, and LED alerts. 📺
UPDATE 1: Vinodh Kumar Markapuram kindly sent a copy of his Chimester app for posting at my request:
- Chimester 1.8 [22k] Can be set to play a MIDI/WAV file, vibrate, or activate the LED on the hour or any 15 minute increment thereof. Find in Prefs > Other after installation. 📺 💾
UPDATE 2: Two more reminder apps from Redwood Creative Computing Company:
- SilentCue 1.2 [54k] Vibrates Palm device at custom interval ranging from 1 to 60 minutes. 📺
- Chime 1.2 [781k] Sounds (via voice, chime, or vibration) on the hour, half hour, or quarter hour during a given day/time range. 📺
/palm | Nov 06, 2011
HTML2Markdown and much more #
Pandoc can convert from:
- markdown
- reStructuredText
- textile
- HTML
- LaTeX
to:
- plain text
- markdown
- reStructuredText
- HTML
- LaTeX
- ConTeXt
- PDF
- RTF
- DocBook XML
- OpenDocument XML
- ODT
- GNU Texinfo
- MediaWiki markup
- textile
- groff man pages
- Emacs org-mode
- EPUB ebooks
- S5 and Slidy HTML slide shows
In addition to source code, *nix, OS X, and Windows binaries are available.
/nix | Nov 03, 2011
Batch export IncrediMail 2 mail folders #
to eml files with the open source Reynardware Incredimail Converter 0.53 (aka incredimail-converter-reynardware). A few notes about the process:
- Default location of IncrediMail email data under Windows XP: C:\Documents and Settings\username\Local Settings\Application Data\IM\Identities\{longstring}\Message Store\
- IncrediMail email messages are stored in proprietary IMM files
- Attempting to "Export a Complete Directory" caused Reynardware Incredimail Converter to crash (known bug), but "Export a Single Database" (i.e., export a single mail folder / IMM file) worked beautifully. Simply specify an IMM file in the "Incredimail Database" line (e.g., C:\Documents and Settings\username\Local Settings\Application Data\IM\Identities\{longstring}\Message Store\Inbox.imm, point "Attachment Directory" to C:\Documents and Settings\username\Local Settings\Application Data\IM\Identities\{longstring}\Message Store\Attachments, and click "Convert".
- Once the conversion is complete, find your eml files in a new subdirectory inside MessageStore. The subdirectory will be named after the IMM file.
- Reynardware Incredimail Converter 0.6 is in the works, offering Unicode and multi-platform support.
UPDATE: Just stumbled onto the RIC help file, which contains some interesting details:
Technical Background on the Incredimail Xe Database
An Incredimail Xe database consists of three files. The first Incredimail file is where all the emails are stored and has an extension of .imm. It should be noted that the .imm files do not contain any attachments, just the raw email. The second Incredimail file contains index information for the .imm file and this file has an extension of .imh, or also known as the header file. The information in this header file includes the sender, receiver, subject, etc. The final piece is the attachment directory. The attachment directory contains all the attachments which Incredimail receives. This includes your pictures, documents, programs, etc. All three pieces, .imm, .imh, and the attachment directory, must be present for ReynardWare Converter to properly convert a Incredimail Xe Database.
Technical Background on the Incredimail 2 Database
An Incredimail 2 database is almost exactly the same as the Incredimail Xe database except there are no longer any .imh files. The header files are replaced with one SQLite 3 database file called containers.db. This database file contains the same information as the .imh files in the Incredimail Xe format.
/windows | Nov 01, 2011
Optimizing PDFs for E Ink displays #
briss crops PDFs via a simple page stack view.
cut2col "is a utility for converting 2-column to 1-column pdf documents. This is done by cutting each page into 4 pieces and merging them together so that they can be viewed on a tiny e-book reader."
K2pdfopt "optimizes PDF/DJVU files for mobile e-readers (e.g. the Kindle) and smartphones. It works well on multi-column PDF/DJVU files."
Mangle optimizes, sorts, and organizes images for the Kindle. Article
papercrop optimizes PDF documents for ebook readers.
PDFCropper "is a program designed for preparing normal sized PDFs (A4, B4, Letter, etc.) to be readable on relatively small devices..."
PDFRead converts "PDF and DJVU documents for reading on eBook devices. It does this by creating an image out of each page, enhancing the image and then collating the images in a device-specific format."
PDF Scissors crops PDFs for ebook readers like the Kindle.
See also Cropping PDFs from last year.
Related
Edit PDF metadata, bookmarks, page labels and more with BeCyPDFMetaEdit.
jPDF Tweak is a veritable Swiss Army knife for PDF files, allowing you to make printable booklets, add bookmarks and effects, change metadata, and perform a slew of additional functions like: combine, watermark, rotate, encrypt, and sign.
Extract images from PDFs with pdfimages for Linux, PDF-Images for OS X, or Some PDF Images Extract for Windows. Learn how images are stored in PDF files.
Updates
/eink | Oct 31, 2011
Outbound firewall for OS X #
TCPBlock v2.10 [837k] Outbound / application firewall. Runs in whitelist or blacklist mode. Support for filtering TCP and UDP. 📺 (via AddictiveTips)
See also Little Snitch, Hands Off!, and Radio Silence.
/mac | Oct 31, 2011
Mac OS X P2V #
Paragon Virtualization Manager for Mac OS X is a free P2V (physical to virtual) converter for Leopard and Snow Leopard (do not install under Mavericks - it will render the system unbootable (though booting into Safe Mode and running the uninstaller will fix the problem)). Images can be created for Fusion 3+, Parallels 5+, and VirtualBox 4+.
Paragon's disclaimer reflects the confusion around OS X 10.5 and 10.6's EULA: "Please make sure that you do not violate the licensing agreement of your operating system and other installed software by virtualizing your system." Injunctions like these were not a problem for Steve apparently.
- Before converting, copy /System/Library/CoreServices/SystemVersion.plist to /System/Library/CoreServices/ServerVersion.plist; now you've got a server version according to About This Mac and the login screen (reminiscent of NT 3.51's ProductType registry setting discovered by Mark Russinovich).
- If the previous step is skipped, Fusion will return "The guest operating system is not Mac OS X Server. This virtual machine will power off." when attempting to boot. All is not lost however, as another free Paragon tool, Paragon Virtual Disk Mounter Beta, can mount VMDK (as well as VDI, VHD, pVHD, and VHDX) images for editing.
- If the image was created under a different user account, you may need to change ownership and permissions of the VMDK file before importing; BatChmod makes it easy.
- To import the VMDK file, create a custom virtual machine, choose your OS X version, select "Use an existing virtual disk", and navigate to your file.
- Before booting the virtual machine, comment out or delete the line firmware = "efi" in /Users/username/Documents/Virtual Machines.localized/imagename.vmwarevm/imagename.vmx, otherwise it won't boot.
- If, instead of copying SystemVersion.plist to ServerVersion.plist, you created an empty ServerVersion.plist file as suggested elsewhere, VMWare Tools (among other apps) will not install ("VMWare Tools can't be installed on this disk. VMWare Tools requires Mac OS X version 10.5 or higher.")
- Arnim van Lieshout (employed by VMWare but acting in a private capacity) kindly explained how to install the non-server version of Snow Leopard into a new Fusion virtual machine.
- See also Installing Snow Leopard OS X 10.6.3 via retail DVD into VMWare Fusion 8 as a guest OS.
/mac | Oct 24, 2011
A few of Muhammad Muquit's open source tiny apps #
- mailsend 1.14 - Command line SMTP mailer. *nix port also available.
- hod v1.6 - Hexadecimal and octal data dumper. SimpleTech SimpleShare NAS port also available.
- mbasecalc 1.2 - Programmers' calculator (binary, octal, decimal, and hexadecimal). Clone of basecalc (see chapter 14 of O'Reilly's XLIB Programming Manual). *nix and OS X ports also available.
(via MoonPoint)
/windows | Oct 23, 2011
Create cruft-free ZIP files in OS X #
HardCoreZipper 2.1.3 [465k] Drag-and-drop to create ZIP files free from OS X cruft like dot underscore and Icon\r files. 📺
/mac | Oct 22, 2011
MultiMarkdown Composer #
is a tiny text editor built for MultiMarkdown by its creator, Fletcher Penny. Sadly, MMC is only available via the App Store (a FAQ and some screenshots can be found here). Just the same, anyone who writes on a Mac needs to check it out; MMC is the kind of app that simply makes you smile: 📺
(via MacSparky)
/mac | Oct 20, 2011
Recently-added apps #
- Dillo 3.0rc1 [1328k] {S}+ "Multi-platform graphical web browser known for its speed and small footprint." 📺
- 🌱 EVACopy 6 [298k] {S}+ Backup with versioning, archiving, and incremental copy of large databases, including Outlook PST files. 📺
- TLPD (Too Long Path Detector) [268k] {S}+ Recursively scans directories for path+file names exceeding a given number of characters (255, 257, 260, etc). 📺
Too large to be listed, but honorable mention goes to QtWeb Internet Browser, a "lightweight, secure and portable browser ... based on Nokia's Qt framework and Apple's WebKit rendering engine."
/windows | Oct 19, 2011
eml to mbx converters #
- eml2mbox.sh is an eml to mbox conversion utility in shell. Despite having been posted 8 years ago, thoran kindly sent a copy of his script (the posted version had been inadvertently truncated). Worked a treat moving eml files recovered from a corrupt dbx file to mbox and from there into Apple Mail.
- eml2mbox is a cross-platform (Ruby) eml to mbox converter. Simply copy it to a directory containing eml files and run
ruby ./eml2mbox.rb
to generate an mbox file in the same directory containing all of the email messages.
- IMAPSize, by the author of eml2mbox, is a freeware Windows app for managing IMAP accounts that also includes eml2mbox (under the Tools menu).
- eml2mbx is a green, standalone Windows app that "packs separate plain text e-mail files (including all attachments) into mbox files".
UPDATE 1: If you need to go the other way (from mbox to eml, as when migrating from Thunderbird to Outlook) check out Eric Fookes' free Aid4Mail MBOX Converter. 💾
UPDATE 2: eml2mbx choked when attempting to create an mbox file over 2GB. IMAPSize had no problem with the same conversion.
UPDATE 3: Edgar kindly shared that he had some trouble with eml2mbox.sh under macOS 10.12 and had to change the /tmp references to a temporary directory within his home folder. (This was likely due to System Integrity Protection (SIP).)
/misc | Oct 18, 2011
Acronis True Image 2011 Problems and Fixes #
- Cloned a 120GB PATA hard drive to a 320GB PATA hard drive. Both were connected via PATA to USB adapters (the source drive was connected via WiebeTech's write-blocking Forensic UltraDock to ensure it wasn't accidentally overwritten).
- After cloning, the 320GB drive was connected to the primary IDE channel
- Upon booting, flashing white cursor on black screen
- Checked jumper, EIDE cable, etc - still wouldn't boot
- Ran fixboot and fixmbr from CD-based Windows XP Recovery Console - still no joy
- Tried a "reverse clone" (bad name choice); i.e., connect source PATA drive to USB adapter and destination PATA drive to EIDE cable, then clone again - success!
- Video card settings also needed tweaking, as the graphics were black & yellow and virtually unreadable:
- Pressed F11 at the boot choice menu and entered "quiet acpi=off noapic" (without quotes) to no avail
- 3836: Acronis Bootable Media of Acronis True Image Home Boots into Garbled or Low Resolution GUI held the answer: after pressing F11, enter "vga=ask" (without quotes). Choose a video mode with 16-bit color and at the root prompt enter /bin/product to start True Image.
/windows | Oct 16, 2011
Newly added to OS X page #
Excel to CSV Converter 1.3 [103k] Batch convert XLS & XLSX files to CSV (requires Excel) 📺
/mac | Oct 12, 2011
Find ALL CAPS 8.3 filenames which may contain digits #
Given a directory of files like this:
AD2IWFB6.txt
An_Important_File.txt
BB0IA29Q.txt
C2MMT30I.txt
CANTDELETETHISONE.txt
Y9S29CC0.txt
z.doc
ZZQ0LII7.txt
list the ALL CAPS files which are eight characters long, with or without numbers included, and ending in ".txt" like so:
$ ls -1 | ack ^[A-Z0-9]{8}\.txt$
AD2IWFB6.txt
BB0IA29Q.txt
C2MMT30I.txt
Y9S29CC0.txt
ZZQ0LII7.txt
(find -regex had a problem with the regular expression, so just went with ack instead. ack -g REGEX didn't match the regex either, perhaps because it matches based on both the relative path and filename?)
Delete the matching files by simply piping to xargs:
$ ls -1 | ack ^[A-Z0-9]{8}\.txt$ | xargs rm
/nix | Oct 07, 2011
Find and copy files to a single directory, automatically renaming to avoid collisions #
xxcopy c:\ h:\ /SG /IN:*.doc /IN:*.txt
Copies all doc and txt files from c: and its subdirs to the root of h:, renaming when necessary to avoid filename collisions. (The /SG switch gathers files into a single directory, sorted with newest file first.)
If filename collision is not a concern, something like this bash one-liner will do:
find . -type f \( -iname "*.doc" -o -iname "*.txt" \) -exec cp {} /mnt/ \;
UPDATE:
Here's a bash one-liner by Johannes Weiß that prevents filename collisions by prepending "z-" to duplicate filenames:
target="/tmp/target"; find ./ -type f -iname "*.doc" | while read line; do outbn="$(basename "$line")"; while true; do if [[ -e "$target/$outbn" ]]; then outbn="z-$outbn"; else break; fi; done; cp "$line" "$target/$outbn"; done
Successfully tested under bash 4.3 and OS X's antiquated bash 3.2.
Another option for finding, copying, and automatically renaming identical filenames is Automator. Since the Finder automatically increments identical filenames when copying, this workflow will do the trick:
Files & Folders > Find Finder Items (select directory to search and set Name to "contains" with desired extension (e.g., .png)) > Copy Finder Items (select destination directory and DO NOT check "Replacing existing files") > Run
Actually, it turns out that not even Automator is required; simply open a Finder window, perform a search of the source folder for desired file extension, highlight the results, and drag to desired destination - identical filenames will be incremented automatically.
More on flattening folders:
/windows | Oct 06, 2011
VNC client for Kindle #
KindleVNC allows not only remote viewing but also remote control of your computer running a VNC server. Very polished and well-thought-out. Tested with OS X's standard VNC server ("Screen Sharing" on port 5900). (via MobileRead)
/eink | Oct 02, 2011
Execute a command every x seconds indefinitely #
As cron's smallest increment is one minute, here are two methods for executing a command every five seconds:
$ watch -n 5 echo "foo"
$ while true; do echo "foo"; sleep 5; done
/nix | Sep 29, 2011
Rename files using a list #
C:\temp>dir /b
89-bar.htm
a.htm
foo42.htm
C:\temp>type ..\list.txt
foo42.htm 001.htm
89-bar.htm 002.htm
a.htm 003.htm
C:\temp>for /f "tokens=1,2 delims= " %a in (..\list.txt) do ren %a %b
C:\temp>ren foo42.htm 001.htm
C:\temp>ren 89-bar.htm 002.htm
C:\temp>ren a.htm 003.htm
C:\temp>dir /b
001.htm
002.htm
003.htm
- If you save the for loop as a batch file, be sure to use double percent signs (e.g., %%a instead of %a).
- In this example, filenames contained no spaces, so delims was set to space. This could be changed to comma, bar, etc.
- For a dry run, prepend echo to ren %a %b.
- Be sure list.txt has DOS/Windows line endings (CR+LF)
- See also:
/windows | Sep 22, 2011
Learn programming concepts using Bash shell #
Mendel Cooper's Advanced Bash-Scripting Guide is "an in-depth exploration of the art of shell scripting... suitable for classroom use as a general introduction to programming concepts". Revision 6.4 was released just a few weeks ago in several formats.
UPDATE: The consensus in this Stack Overflow thread is that the examples in ABS are "misleading or antiquated".
/nix | Sep 18, 2011
Chuang Tzu's funeral #
When Chuang Tzu was about to die, his disciples began planning a splendid funeral.
But he said: "I shall have heaven and earth for my coffin; the sun and moon will be the jade symbols hanging by my side; planets and constellations will shine as jewels all around me, and all beings will be present as mourners at the wake. What more is needed? Everything is amply taken care of!"
But they said: "We fear that crows and kites will eat our Master."
"Well," said Chuang Tzu, "above ground I shall be eaten by crows and kites, below it by ants and worms. In either case I shall be eaten. Why are you so partial to birds?"
From The Way of Chuang Tzu by Thomas Merton
/misc | Sep 15, 2011
Sequence expressions in wget and curl #
Given a range of JPGs to batch download:
http://example.com/manga/manga_06p01.jpg
http://example.com/manga/manga_06p02.jpg
...
http://example.com/manga/manga_06p99.jpg
one approach using wget would be:
wget 'http://example.com/manga/manga\_06p'{00..99}'.jpg'
Bash 4 is required for brace expansion using a range. Unfortunately, the expression fails to expand at all when read from a file (e.g., wget -i urls.txt
).
curl, on the other hand, does not depend on Bash for sequencing:
curl -O 'http://example.com/manga/manga\_06\_p'\[00-99\]'.jpg'
so it will correctly parse sequences in a properly-formatted text file (e.g., urls.txt):
url = "http://example.com/manga/manga_06_p[00-99].jpg"
url = "http://example.com/manga/manga_07_p[00-99].jpg"
url = "http://example.com/manga/manga_08_p[00-99].jpg"
like so:
curl --remote-name-all -K urls.txt
Update 1: Cookies
For sites that require a login, cookie.txt export makes it easy to grab the necessary cookies.txt file from Google Chrome's cache. Then it's simply a matter of:
wget --user-agent="" --force-directories --load-cookies cookies.txt 'https://example.com/upvoted?id=miles&comments=t&p='{1..10}
or
curl --header "User-Agent:" --cookie ./cookies.txt --remote-name 'https://example.com/upvoted?id=miles&comments=t&p='\[1-10\]
If filenames need to be made unique (e.g., downloaded files have the same name and would otherwise be overwritten), curl has variable renaming built-in:
curl --output "index\_#1.html" 'https://example.org/blog/'\[2012-2015\]'/index.html'
Update 2: Headers
Omit the User-Agent header in curl via -H 'User-Agent:'
and in wget with --user-agent=""
.
References
/nix | Sep 12, 2011
Windows XP hosts file being ignored #
Don's comment in Windows 7 Hosts File Ignored resolved it: simply set the System attribute on hosts (C:\>attrib +s %systemroot%\system32\drivers\etc\hosts). See also What can cause a DNS lookup to ignore a hosts file entry? and How to refresh hosts file without rebooting.
/windows | Sep 12, 2011
Portable CPU temperature monitor #
CPU Thermometer 1.2 is an open source, portable application for monitoring CPU temps. Requires .NET Framework.
/windows | Sep 12, 2011
Ghost / phantom / invisible appointments in Dentrix 11 Appointment Book #
are caused by "Long Appointments", i.e., appointments scheduled for more than 240 minutes. Messages like Operatory is already scheduled for requested time! and Provider is already doubled scheduled for requested time. Another scheduling is not permitted. are common when trying to add appointments in an apparently available time slot. (Yes, "doubled scheduled" is in the original - should be "double scheduled" or perhaps "double booked", which would sound more natural.)
To resolve this issue, download
ftp://ftp.dentrix.com/Pub/DENTRIX/11/ac.dtx. Rename it to abconv.exe and move to C:\Program Files\Dentrix\. Before running, make sure Dentrix is closed on all stations (including the server) and that you have multiple backup copies of your data.
Running the tool should remove the ghost appointments and allow those times/operatories to be scheduled again. Check the log file (C:\Program Files\Dentrix\Doc\EXPORTS\ABConv33.log by default) for lines containing "Long Appointment" and manually adjust appointments in Appointment Book to under 240 minutes if necessary.
Sample output from ABConv33.log:
Appt Book Conversion Problem Log - 04/22/11
Error Patient Name Date Time Length Provider
Long Appointment Doe, John 01/05/2011 8:0 300 NAME
Long Appointment Doe, John 01/06/2011 8:0 300 NAME
...
Additional notes:
- ftp.dentrix.com/Pub/DENTRIX/11/ also contains the CDT 2007 update installer (cdt2007update.exe) and DTX11PerfUpd.exe, which I'm told is a performance update only recommended if Dentrix is particularly sluggish.
- One of the Dentrix reps I spoke with recommended purging appointments over two years old (File > Purge Appointments...). The dialog box is a bit confusing; instead of a date range, a single date is entered, and all appointments prior to that are purged. I was told that the information still resides in Ledger and that a note is put in Office Journal, but have not tested it yet.
- As for the "Long Appointment" issue, Dentrix G4 apparently offers Events to schedule longer time blocks.
/windows | Sep 11, 2011
Remotely enable Remote Desktop under Windows XP #
- In regedit, click File > Connect Network Registry...
- Type the remote computer name, click Check Names and then OK
- Enter remote admin password if prompted
- Click HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server for the remote computer and change the value of fDenyTSConnections to 0.
- If a reboot of the remote PC is required: shutdown -m \\ remotepcname -r
The above steps can also be done via SSH or PsTools in case the Remote Registry service is disabled or you've only got terminal-based access to the machine. See Jim's Remotely Enabling Remote Desktop Protocol From the Command Line for more information (it's also the source for most of the commands below).
If Windows Firewall is enabled on the remote PC, and no exception has been previously setup for Remote Desktop, you'll need to create one. We'll get a remote command prompt with PsExec from PsTools and check the firewall state:
C:\>PsExec.exe \\remotepcname -u user -p "pass with spaces" cmd
PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Windows\system32>netsh firewall show state
Firewall status:
-------------------------------------------------------------------
Profile = Standard
Operational mode = Enable
Exception mode = Enable
...
Ports currently open on all network interfaces:
Port Protocol Version Program
-------------------------------------------------------------------
137 UDP IPv4 (null)
139 TCP IPv4 (null)
138 UDP IPv4 (null)
445 TCP IPv4 (null)
No exception exists for 3389 (the default Remote Desktop port), so we'll create one:
C:\Windows\system32>netsh firewall set portopening protocol = TCP port = 3389 name = "Remote Desktop Protocol" mode = ENABLE
Ok.
C:\Windows\system32>netsh firewall show state
...
Ports currently open on all network interfaces:
...
138 UDP IPv4 (null)
3389 TCP IPv4 (null)
445 TCP IPv4 (null)
...
Now the remote PC can be accessed normally via Remote Desktop.
/windows | Sep 10, 2011
Some Lion love #
While its basic flaws keep me from using Lion full-time, 10.7 introduces some neat new features like:
- Using the FaceTime camera to add signatures to PDFs in Preview
- All window edges allow resizing
- Quicklook previews within spotlight search results
- Finder merging of folders and files
After FileVault 2, my favorite feature is the vastly improved Japanese support. Text to Speech now reads kanji/hiragana/katakana and the popup dictionary is far more useful.
Here is Kyoko reading the following passage:
「原材料の全てが特殊な人造毛で作られています。その為、動物の毛に比べ耐久性に優れ、毛抜けや毛切れもなく、しかも弾力があり、先端も鋭いため、ハネ、ハライ等、文字の基本の勉強に最適です。また、人造毛でありながら、墨含みを良くする為の工夫もなされ、初級入門者が安心して使っていただけます。動物の毛を使わない自然環境に優しい筆として特に注目されています。」(brush shown in photo is for a different item)
While her English could use some brushing up, Kyoko's Japanese is surprisingly natural for a text to speech engine (students should still be wary of mistakes like hito miyatsuko instead of jinzou, etc).
To setup a "Start Speaking" keyboard shortcut: System Preferences > Keyboard > Keyboard Shortcuts > Application Shortcuts > + > enter "Start Speaking" for Menu Title (without quotes) > Tab to the Keyboard Shortcut text box and press desired shortut keys.
The popup dictionary (accessed via Cmd+Ctrl+D) now displays much more information (most importantly, the reading in hiragana):
Snow Leopard | Lion |
| |
Serious students of Japanese may want to overlook Lion's other shortcomings, as it offers the most complete and comprehensive computer environment for learning the language. (Don't forget kanji Traditional Chinese input via touchpad introduced in Snow Leopard; while "Trackpad Handwriting" no longer appears in the Input Sources menu, it can be accessed via Control+Shift+Space once "Chinese - Traditional" has been checked.)
/mac | Sep 10, 2011
Still running DOS apps? Check out Tame. #
Tame improves the performance and reliability of DOS apps under modern versions of Windows, addressing issues such as:
- excessive CPU usage
- system date changes
- console being forced to full screen mode
- excessive or incorrect use of file locks
- lack of multi-user support
- printing delays
- BIOS dependencies
Tame supports Windows NT 4.0 to Windows 7 (32-bit) as well as Citrix Winframe and MetaFrame. Review and tips: Tame: The Essential Utility for WPDOS under Windows XP, Vista, or Windows 7.
/windows | Sep 09, 2011
Stop whatever you're doing and check out Jim Cameron's MoonPoint #
What a treasure trove of sysadmin information Jim has put together! I stumbled upon his excellent Remotely Enabling Remote Desktop Protocol From the Command Line the other day, and have been hungrily devouring posts ever since. No feed is currently linked, but Blosxom users will know where to find the Easter Egg: http://support.moonpoint.com/blog/blosxom/index.rss.
/misc | Sep 09, 2011
Word and Excel document shortcuts slow to open #
Double clicking Word and Excel application icons on the Desktop opened the apps immediately, but double clicking file shortcuts on the Desktop caused them to hang for a minute or more. The cause was an unavailable network printer (due to a recent router change); swapping its ethernet cable for a USB cable fixed the problem immediately (Windows XP automatically changed the printer port from a static IP address to USB when it was plugged in). (Thanks to those who posted in Word and Excel files slow to load, especially jimlloyd3392.)
/windows | Sep 07, 2011
Lightweight CMS written in PHP and reminiscent of Blosxom #
"Stacey is a lightweight content management system.
No database setup or installation files, simply drop the application on a server and it runs. Your content is managed by creating folders and editing text files. No login screens, no admin interface." RSS/Atom support; requires PHP 5+.
/blosxom | Sep 04, 2011
DentriXlink DenKey error #
Environment: Dentrix 11 (practice management), Gendex VixWin Pro 1.5 (dental imaging), and DentriXlink to link the two.
Issue: Occasionally (but most often on first launch) when clicking the gray "GX imaging" button from Dentrix/DentriXlink, the following error was returned (screenshot):
DenKey - Error
Could not connect to the tool.
System returned: 16394
Clicking OK and then clicking the gray button again would launch VixWin correctly, but a permanent solution was found by editing this line in C:\Program Files\Dentrix\VixWin.ini:
ConnectTimeout=999
to read:
ConnectTimeout=10000
/windows | Sep 01, 2011
Why, in my day... #
Cathode ($20) is a vintage terminal emulator for Mac OS X that allows you to tweak curvature, color, transparency, bit-rate, noise, jitter, interlace, horizontal scan rate, and more.
/mac | Aug 29, 2011
Lion is Apple Vista #
Feels like a constant struggle with the UI, from the obtrusive scroll bars, to the clunky Apple Mail search, to the useless empty space at the top and bottom of windows when scrolling, to the iCal and Address Book train wreck... The last straw was an email spontaneously disappearing from the inbox (long after importing, indexing, and encrypting had completed) only to reappear a short while later. Really wanted Lion to work out, especially since FileVault 2's whole disk volume encryption was performing beautifully, with very little impact on system performance. Ended up going back to Snow Leopard after several hours.
UPDATE: I've been using and supporting OS X since 10.0, and a huge fan from 10.2 to 10.6. Lion goes completely off the rails. Frustration is the overwhelming feeling, especially with the three apps I use most: iCal, Address Book, and Apple Mail.
REVIEWS
- Why I Seriously Regret Upgrading To Mac OS X Lion "Features like Launchpad don't translate well to the desktop, and they feel bloated and unnecessary. Apple also decided to update classic apps like iCal and Mail, making them less and attractive and more difficult to use."
- I hate Mac OS X Lion. Here's why. "Yesterday, I completely erased my hard disk and reinstalled Lion’s predecessor, Snow Leopard. I hate Lion so bad that I wish it were still shipped in a box so I could punch it right in its grinning, cardboardy box. And I’m not the only one."
- OS X Lion: Causing hair loss as you use your Mac. One follicle at a time. "With OS X Lion, we've challenged the accepted way of doing things by introducing new features that challenge the user."
- Mac OS X Lion: This Is Not the Future We Were Hoping For "Now there's gross faux wood panelling in Photo Booth. The Address Book is a real world hardbound address book. iCal is a bloody pseudo-calendar made of paper and leather. The question is: Why is Apple reproducing things that are obsolete already? Do people still use calendars made of leather and paper? Do people use agendas? Seriously, does anyone under 18 even know what these are?"
- Apple launches OS X Lion with features from Windows 3.1 "OS X Lion also adds some other groundbreaking features, like disabling support for apps coded for the PowerPC Macs of old and introducing a new scrolling system that makes no sense at all."
- OS X 10.7 Lion is more painful than Vista "Having lived with the pain of Vista pre-SP1, I can tell you that the problems currently facing Apple with Lion are worse. Much worse."
- Back To The Mac "Yesterday, after months of using Lion and its developer previews, I formatted the internal SSD on my 13 inch MacBook Pro and reinstalled Mac OS X 10.6 Snow Leopard. I did not go back to 10.6 for the compatibility Rosetta provides, or the performance gains of an earlier operating system. I reinstalled Snow Leopard because I don't need the iOS features Lion brought back to my Mac, and can't see the point of compromising my productivity for an operating system that doesn't know what it wants to be."
- Apple started decaying before Steve Jobs' death "Lion's disregard for users' taste and preferences permeates throughout. It looks more like a design philosophy than an accident."
- OS X Lion is one broken big cat "Stay far away from OS X Lion if you value your sanity."
TWEETS
- toddhellings: You know what OS X Lion is missing? The Windows logo.
- davely: I think calling OS X Lion "Apple's Vista" is really unfair. This is more like Apple's Win ME.
- shadowbottle: The "All My Files" view sucked in Windows 7 when it came out and it sucks just as bad in OS X Lion. Resources better used on Address Book.
- popcube: Lion、かぎりなくWindows Vista並にダメな子ちゃんかもなぁ。戻そうかな。イライラの方が多い。Lion待ちと言ってた連中は、後悔するがよい。今のところ差し引き赤字だ。
- jisyack1077: lion=VIsta,snow leopard=xp,tigar=2000なかんじ。だから今のところ、lionにアップデートしない。
- yamj: MacOS X Lionを使って5日目。どうやらLionはWindowsでいうVistaみたいな存在だったみたいだ。Snow Leopardに戻そうかな...
MITIGATION
These alternatives sync with iCal and/or Address Book:
- BusyCal - iCal replacement
- Contact Book - Address Book replacement (does not seem to be much of an improvement, as the UI is very similar to Lion's Address Book)
- Outlook 2011 - Apple Mail, iCal, and Address Book replacement (SP1 brings better syncing)
- SOHO Organizer 9 - iCal and Address Book replacement
- Daylite - iCal and Address Book replacement
- Bento - iCal and Address Book replacement
More tips for living with Lion:
- Hold Alt/Option key while clicking arrow to disable iCal page turning animation. UPDATE: Steve Bell's iCal Classic Page Flip plugin disables the page flip animation altogether; unfortunately, it depends on SIMBL, which reportedly causes problems in Lion (as of version 0.9.9).
- Now that the 3-pane view is gone (Apple even went to the trouble of removing it from the Debug menu as of 10.7.1), an ugly workaround is to launch two instances of Address Book (use open -n /Applications/Address\ Book.app/ twice) and drag between the two. Another approach is to use "Present People Picker Panel" found in the Debug menu (which can be enabled via defaults write com.apple.addressbook ABShowDebugMenu -bool YES). Frankly, PPPP has a better UI than Address Book itself. (Hat tip to Lukas Chrostowski)
- Restore color icons in Finder sidebar
- Restore color icons in iTunes
- Lion Tweaks 1.3 - Simple GUI for applying common tweaks (unhide the user Library folder, change iCal and Address Book skins, disable local Time Machine backup, etc)
/mac | Jul 27, 2011
42-line blog engine in Bash #
___.sh is a "recursive, multimarkdown, sed & bash static HTML blog 'engine'" by Nicolas Hoibian. See it in action.
/blosxom | Jul 25, 2011
OS X: throttle application CPU utilization #
- For process IDs that remain constant, check out Will Nolan's open source cputhrottle, "a small OS X command-line utility designed to limit the CPU usage of a process to which it attaches."
# cputhrottle pid %CPU
- GUI options:
- Jean-David Gadina's ProcessRenicer - Activity Monitor on steroids
- fuyu's AppPolice - menu bar app that can quickly limit CPU usage of any running process
- To specify a process name instead of an ID (as when a PID for a given process keeps changing), cpulimit might work, but it caused a kernel panic on my machine running 10.6.7. Another option is to loop Aidan Findlater's renice oneliner from a root prompt:
$ sudo su -
# while true; do renice +15 -p `ps ax | grep processname | grep -v grep | awk '{print $1}' | tr 'n' ' '`; done
- UPDATE: St. Clair Software's App Tamer 2.7.2 does the job of reining in errant apps admirably, and is compatible with OS X/macOS versions from 10.9 all the way to 12.4 (they also considerately still offer version 1.3.2 for OS X 10.5 - 10.7).
Windows users will appreciate Claus' Windows CPU throttling techniques.
/mac | Jul 23, 2011
NFO viewer for OS X #
Looking for a simple NFO viewer for OS X, I found the cross-platform, open source NFO Viewer and started to install:
$ sudo port install nfoview
After over 30 minutes of dependency installs and still no end in sight, I resumed the search. This time I hit upon NFOViewer, "a Mac OS X application for viewing documents containing ASCII art ('nfo', 'asc' or 'diz' documents)." On the plus side, it is a Universal Binary and renders NFO files neatly. On the minus side (for some), source code does not appear to be available despite the app being hosted on SourceForge. Just the same, if you need to view an NFO file now, NFOViewer may be the better choice.
/mac | Jul 19, 2011
Save all terminal text with script #
Script makes a typescript of everything printed in the terminal (saved to a file named typescript in the current directory by default):
$ script
Script started, output file is typescript
$ echo 'this is being recorded!'
this is being recorded!
$ exit
exit
Script done, output file is typescript
$ head typescript
Script started on Sun Jul 17 07:25:25 2011
bash-3.2$ echo 'this is being recorded!'
this is being recorded!
bash-3.2$ exit
exit
Script done on Sun Jul 17 07:25:51 2011
/nix | Jul 17, 2011
When you need a quick & simple calculator in Bash... #
$ bc -lq
1+1
2
quit
or
$ echo $((1+1))
2
or
$ echo $[1+1]
2
/nix | Jul 17, 2011
How safe are your secrets? #
Tomaž suggests a simple but possibly unsettling experiment:
# export HISTFILE=/dev/null
# grep secret_that_shouldn't_be_on_disk /dev/sda /dev/sdb
Binary file /dev/sda matches
Binary file /dev/sdb matches
"If grep returns no hits, great. Your secret is safe from this particular attack. In my case however the fun part was in finding out why exactly the password that supposedly never leaves volatile RAM appeared in clear on all of the computer's hard drives (and the machine in question doesn't even have swap enabled)."
/nix | Jul 17, 2011
Is it possible to recover data from a drive overwritten with zeros once? #
While The Great Zero Challenge was not very convincing, Daniel Feenberg's Can Intelligence Agencies Read Overwritten Data? and Craig Wright's Overwriting Hard Drive Data are. See also Disk Wiping - One Pass is Enough - Part 2 (this time with screenshots) (though it mainly addresses ordinary, software-based recovery).
UPDATES:
/misc | Jul 17, 2011
Free shell scripting guide from Apple #
At 260 pages, Apple's Shell Scripting Primer is really more of a book than a guide. Originally published in 2006 and updated as recently as last month, it is available as a PDF and is accompanied by a zipped file of sample scripts. Chapters include:
Chapter 1 | Before You Begin |
Chapter 2 | Shell Script Basics |
Chapter 3 | Shell Input and Output |
Chapter 4 | Flow Control, Expansion, and Parsing |
Chapter 5 | Result Codes, Chaining, and Flags |
Chapter 6 | Subroutines, Scoping, and Sourcing |
Chapter 7 | Paint by Numbers |
Chapter 8 | Regular Expressions Unfettered |
Chapter 9 | How AWK-ward |
Chapter 10 | Designing Scripts for Cross-Platform Deployment |
Chapter 11 | Advanced Techniques |
Chapter 12 | Performance Tuning |
Chapter 13 | Shell Script Security |
Appendix A | Special Shell Variables |
Appendix B | Other Tools and Information |
Appendix C | Starting Points |
Appendix D | An Extreme Example: The Monte Carlo (Bourne) Method for Pi |
Appendix E | Historical Footnotes and Arcana |
/nix | Jul 14, 2011
Unix in an EXE #
"MobaXterm is an enhanced terminal with an X server and a set of Unix commands (GNU/Cygwin) packaged in a single portable exe file. ... [I]ncludes a multitab native Windows terminal, a new X server based on X.Org ... and a lot of new GNU Unix commands." Reminiscent of these guys (Unix Tools is apparently now "No-install Unix Tools for Windows").
/windows | Jul 12, 2011
Test your mail client's leakiness #
Since first being mentioned here in '04, email tracking services have beefed up their arsenal considerably. Thankfully, Mike Cardwell has put together Email Privacy Tester, a mail client leak test (remember the old firewall leak tests?). It checks for over 30 possible tracking methods, all of which seem to depend on HTML. The safest and easiest solution is still to enforce plain text email.
See also: HTML email considered harmful and Just say no to HTML email and proprietary attachments.
/misc | Jul 10, 2011
Howard Thurman breaks it down #
- "Don't ask what the world needs. Ask what makes you come alive, and go do it. Because what the world needs is people who have come alive."
- "There is something in every one of you that waits and listens for the sound of the genuine in yourself. It is the only true guide you will ever have. And if you cannot hear it, you will all of your life spend your days on the ends of strings that somebody else pulls."
- "Follow the grain in your own wood."
/misc | Jul 09, 2011
Extracting email addresses from a file #
Back in 2002, bookface-ga kindly replied to my question about using awk to extract email addresses from a file:
Given a simple address book (ab.txt) with poor formatting:
john doe john@example.com 555-111-1212
sally@example.co.uk 555-555-1212 sally doe
515-1212 joe blow joe@example.info
jane doe jane@example.com bob doe bob@example.com
etc...
How can just the email addresses be extracted to a new file using awk?
$ awk '
{
for(i=1;i<=NF;i++){
if($i ~ /@/){
print $i
}
}
}
' ab.txt
john@example.com
sally@example.co.uk
joe@example.info
jane@example.com
bob@example.com
While simply extracting fields containing the 'at' symbol suited the data set perfectly, Patrick Mylund Nielsen's EmailsFromFile is far more comprehensive. "It follows a regular expression pattern based on the RFC 2822 standard and should thus return all valid email addresses regardless of how they appear in the file." Which means that even a jumbled mess like this:
john@example.com,sally@example.co.uk|8135551212/some random info
joe@example.info;sue@example.museum 42!42!42!
is parsed perfectly:
$ emailsfromfile.py sloppy_file.txt
joe@example.info
sue@example.museum
john@example.com
sally@example.co.uk
EmailsFromFile is licensed under the WTFPL, and is reproduced below for posterity. (Be sure not to miss Patrick's other tools; Windows admins will especially appreciate Failsafe MSI, a "shell script that enables and starts the Windows Installer service in safe mode".)
UPDATE: emailregex.com has loads of other examples, including this surprisingly accurate grep one-liner: $ grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" filename.txt
#!/usr/bin/env python
'''
emailsfromfile.py -- Get all unique email addresses from a file
by Patrick Mylund Nielsen
http://patrickmylund.com/projects/emailsfromfile/
License: WTFPL (http://sam.zoy.org/wtfpl/)
'''
__version__ = '1.1'
import sys
import os
import re
import codecs
# Regular expression matching according to RFC 2822 (http://tools.ietf.org/html/rfc2822)
rfc2822_re = r"""(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])"""
email_prog = re.compile(rfc2822_re, re.IGNORECASE)
def isEmailAddress(string):
return email_prog.match(string)
def main(filename, separator='\n', encoding=None):
separator_replace = {
'space': ' ',
'newline': '\n',
}
if not os.path.isfile(filename):
raise IOError("%s is not a file." % filename)
results = set()
with codecs.open(filename, 'rb', encoding) as f:
for line in f:
results.update(email_prog.findall(line))
for k, v in separator_replace.iteritems():
separator = separator.replace(k, v)
print(separator.join(results))
if __name__ == '__main__':
args = len(sys.argv) - 1
if 0 < args < 4:
main(*sys.argv[1:])
else:
print("Usage: python %s <filename> [separator] [encoding]" % sys.argv[0])
print("The default separator is a newline. To separate by space, literally enter 'space' as the separator.")
/nix | Jul 06, 2011
Free standalone and bootable antimalware #
eScanAV Anti-Virus Toolkit (MWAV) (similar to Microsoft Safety Scanner) and eScan Rescue Disk (similar to Standalone System Sweeper) are new to me, but according to Virus Bulletin, eScan ranks higher than ESET, Microsoft Security Essentials, Kaspersky, and many others in VB's Reactive And Proactive (RAP) testing. And speaking of malware, don't miss Claus' detailed description of his recent cleanup campaign.
/windows | Jul 02, 2011
Backup to drive label instead of drive letter #
Create Synchronicity is an open source backup and synchronization application that supports both drive labels and drive letters (like Ulrich's Back4Sure). And like Back4Sure, it is clean, simple, and unable to backup in-use files. Requires .NET Framework 2.0 or higher (though there have been problems with version 4).
/windows | Jul 02, 2011
suckless.org - tiny unix apps #
suckless.org is the "home of wmii, dwm, libixp, and other quality software with a focus on simplicity, clarity, and frugality." From the Manifest: "The more code lines you have removed, the more progress you have made. As the number of lines of code in your software shrinks, the more skilled you have become and the less your software sucks."
Embodies many of the principles Mike Gancarz extolled in The UNIX Philosophy:
- Small is beautiful.
- Make each program do one thing well.
- Build a prototype as soon as possible.
- Choose portability over efficiency.
- Store data in flat text files.
- Use software leverage to your advantage.
- Use shell scripts to increase leverage and portability.
- Avoid captive user interfaces.
- Make every program a filter.
/nix | Jul 01, 2011
PNG metadata viewer #
TweakPNG 1.4.1.1 [319k] {S}+ A low-level PNG image file manipulation utility 📺
/windows | Jun 26, 2011
Setup a virtual network lab #
"Marionnet is a virtual network laboratory: it allows users to define, configure and run complex computer networks without any need for physical setup. Only a single, possibly even non-networked GNU/Linux host machine is required to simulate a whole Ethernet network complete with computers, routers, hubs, switches, cables, and more. Support is also provided for integrating the virtual network with the physical host network. As Marionnet is meant to be used also by inexperienced people, it features a very intuitive graphical user interface."
(via 0ddn1x: tricks with *nix)
/nix | Jun 24, 2011
Windows Search within Outlook 2010 does not search contact custom fields #
Outlook 2010's Instant Search apparently only searches default fields. But as Neil points out, if you search from the Start Menu's search box instead, custom fields (and everything else in Outlook) is included.
/windows | Jun 23, 2011
Search / find inside of OS X package files and more #
- EasyFind "finds invisible files and files inside packages (something Spotlight doesn't do)."
- Find Any File "can find files that Spotlight doesn't, e.g. those inside bundles and packages and in inside folders that are usually excluded from Spotlight search." Hold Option while clicking Find to search as root.
/mac | Jun 15, 2011
ISyncInvalidRecordException ISyncSession record validation failure #
Missing Sync for Palm OS reported the following after syncing:
It sounded like a phone number was in an email address field.
When asked how to find the affected contact record(s), a Mark/Space tech replied that he did not know of any way to identity the specific record based on the ID number, and that I should "reset the Sync History of Sync Services and try again".
Instead, I decided to create a Smart Group in Address Book (Address Book > New Smart Group... > Card > has changed in 7 days > OK). Sure enough, I found the contact record which had a phone number in the email address field, removed it, synced again, and the problem was solved.
Anyone know how to find the affected contact from just the ID? Poking around in ~/Library/Application Support/SyncServices/Local and ~/Library/Application Support/AddressBook with grep and ack did not turn up any clues. mail@tinyapps.org
/mac | Jun 14, 2011
Printer properties cannot be displayed. The print spooler service is not running. #
Following a defender.exe malware infection, all printers disappeared and the Windows print spooler would stop as soon as "Add a printer" was clicked. Eric01 posted a solution in the Print Spooler Keeps Stopping thread: delete any subkeys from HKLM\SYSTEM\CurrentControlSet\Control\Print\Providers other than LanMan Print Services and Internet Print Provider.
UPDATE: According to Sophos, Troj/FakeAv-DWG creates or modifies the following registry keys:
- [HKLM\SYSTEM\CurrentControlSet\Control\Print\Printers]
"DefaultSpoolDirectory"="%SYSDIR%\spool\PRINTERS"
- [HKLM\SYSTEM\CurrentControlSet\Control\Print\Providers\3d3c3]
"Name"="C:\DOCUME~1\username\LOCALS~1\Temp\2.tmp"
- [HKLM\SYSTEM\CurrentControlSet\Control\Print\Providers]
"Order"="LanMan Print Services Internet Print Provider 3d3c3"
Related:
/windows | Jun 11, 2011
Build a custom Windows 7 PE image without Windows AIK or a Windows 7 install DVD #
Make_PE3 can create a custom Windows 7 PE ISO image from a system simply running Windows 7 - no install DVD or WAIK required (though either can be used if desired).
(via AgniPulse)
/windows | Jun 10, 2011
Browse like it's 1990 #
Telehack is a simulation of a stylized ARPANET/Usenet, circa 1985-1990. It is a full multi-user simulation, including thousands of files from the era, a collection of adventure and IF games, a working BASIC interpreter with a library of programs to run, simulated historical users, and more.
Connected to TELEHACK port 36
It is 5:34 pm on Thursday, June 8, 2011 in Mountain View, California, USA.
There are 52 local users. There are 24181 hosts on the network.
Type ? for a command list.
Type HELP for a more detailed command listing.
Type control-C to interrupt any command.
May the command line live forever.
Command, one of the following:
ac basic calc dir finger help
hosts ipaddr joke login netstat newuser
octopus ping rain score starwars telnet
traceroute type usenet users zrun
.help
ac <areacode> lookup an areacode or areacode-prefix
basic start the basic interpreter
calc [expr] calculator
dir list files
finger show users on current system
finger <user> show information about <user>
finger @<host> show users logged into <host>
help print this list
hosts show list of major network hosts
ipaddr show current ip address
joke show random joke from unified joke database
login [user] login or create a new telehack account
netstat show connected hosts
newuser create a new telehack account
octopus octal/hex/binary/ascii key dumper
ping <host> test a host for availability
rain animated raindrops display
score zrun score leaderboard
starwars ascii movie
telnet <host> connect to a remote NETSTAT host for login (try guest)
traceroute <host> show path to <host>
type <file> print contents of file
usenet usenet archive circa 1981-1999
users show user table
zrun show list of available z-code games
zrun <game> run a z-code game
Type ? for a command list at any prompt.
Type ^C to interrupt any command.
Type MORE telehack.txt for more info.
More commands available after login.
/misc | Jun 09, 2011
Flashing question mark on MacBook Pro due to bad SATA cable #
A flashing question mark on boot generally indicates a problem with the startup volume, but for an inordinate number of MacBook Pros, the error is caused by a bad SATA cable. This can be verified† by removing the drive, connecting it to an adapter, and booting via USB or Firewire (if you get the prohibitory sign, try Safe Mode).
iFixit has a swell repair guide as well as the cable itself (shipped at warp speed).
† Of course, it is also possible that the problem may be with the logic board rather than the cable, but given the large number of complaints about the latter, it is the more likely suspect.
/mac | Jun 06, 2011
Reminders #
Two selections from Thich Nhat Hanh's Peace Is Every Step: The Path of Mindfulness in Everyday Life, published by Parallax Press:
Present Moment,
Wonderful Moment
In our busy society, it is a great fortune to breathe consciously from time to time. We can practice conscious breathing not only while sitting in a meditation room, but also while working at the office or at home, while driving our car, or sitting on a bus, wherever we are, at any time throughout the day.
There are so many exercises we can do to help us breathe consciously. Besides the simple "In-Out" exercise, we can recite these four lines silently as we breathe in and out:
Breathing in, I calm my body.
Breathing out, I smile.
Dwelling in the present moment,
I know this is a wonderful moment!
"Breathing in, I calm my body." Reciting this line is like drinking a glass of cool lemonade on a hot day—you can feel the coolness permeate your body. When I breathe in and recite this line, I actually feel my breath calming my body and mind.
"Breathing out, I smile." You know a smile can relax hundreds of muscles in your face. Wearing a smile on your face is a sign that you are master of yourself.
"Dwelling in the present moment." While I sit here, I don't think of anything else. I sit here, and I know exactly where I am.
"I know this is a wonderful moment." It is a joy to sit, stable and at ease, and return to our breathing, our smiling, our true nature. Our appointment with life is in the present moment. If we do not have peace and joy right now, when will we have peace and joy—tomorrow, or after tomorrow? What is preventing us from being happy right now? As we follow our breathing, we can say, simply, "Calming, Smiling, Present moment, Wonderful moment."
This exercise is not just for beginners. Many of us who have practiced meditation and conscious breathing for forty or fifty years continue to practice in this same way, because this kind of exercise is so important and so easy.
Breathing Room
We have a room for everything—eating, sleeping, watching TV—but we have no room for mindfulness. I recommend that we set up a small room in our homes and call it a "breathing room," where we can be alone and practice just breathing and smiling, at least in difficult moments. That little room should be regarded as an Embassy of the Kingdom of Peace. It should he respected, and not violated by anger, shouting, or things like that. When a child is about to be shouted at, she can take refuge in that room. Neither the father nor the mother can shout at her anymore. She is safe within the grounds of the Embassy. Parents sometimes will need to take refuge in that room, also, to sit down, breathe, smile, and restore themselves. Therefore, that room is for the benefit of the whole family.
I suggest that the breathing room be decorated very simply, and not be too bright. You may want to have a small bell, one with a beautiful sound, a few cushions or chairs, and perhaps a vase of flowers to remind us of our true nature. You or your children can arrange flowers in mindfulness, smiling. Every time you feel a little upset, you know that the best thing to do is to go to that room, open the door slowly, sit down, invite the bell to sound—in my country we don't say "strike" or "hit" a bell—and begin to breathe. The bell will help not only the person in the breathing room, but the others in the house as well.
Suppose your husband is irritated. Since he has learned the practice of breathing, he knows that the best thing is to go into that room, sit down, and practice. You may not realize where he has gone; you were busy cutting carrots in the kitchen. But you suffer also, because you and he just had some kind of altercation. You are cutting the carrots a bit strongly, because the energy of the anger is translated into the movement. Suddenly, you hear the bell, and you know what to do. You stop cutting and you breathe in and out. You feel better, and you may smile, thinking about your husband, who knows what to do when he gets angry. He is now sitting in the breathing room, breathing and smiling. That's wonderful; not many people do that. Suddenly, a feeling of tenderness arises, and you feel much better. After three breaths, you begin to cut the carrots again, but this time, quite differently.
Your child, who was witnessing the scene, knew that a kind of tempest was going to break. She withdrew to her room, closed the door, and silently waited. But instead of a storm, she heard the bell, and she understood what was going on. She feels so relieved, and she wants to show her appreciation to her father. She goes slowly to the breathing room, opens the door, and quietly enters and sits down beside him to show her support. That helps him very much. He already felt ready to go out—he is able to smile now—but since his daughter is sitting there, he wants to sound the bell again for his daughter to breathe.
In the kitchen, you hear the second bell and you know that cutting carrots may not be the best thing to do now. So, you put down your knife and go into the breathing room. Your husband is aware that the door is opening and you are coming in. So, although he is now all right, since you are coming, he stays on for some time longer and sounds the bell for you to breathe. This is a beautiful scene. If you are very wealthy, you can buy a precious painting by van Gogh and hang it in your living room. But it will be less beautiful than this scene in the breathing room. The practice of peace and reconciliation is one of the most vital and artistic of human actions.
I know of families where children go into a breathing room after breakfast, sit down, and breathe, "in-out-one," "in-out-two," "in-out-three," and so on up to ten, and then they go to school. If your child doesn't wish to breathe ten times, perhaps three times is enough. Beginning the day this way is very beautiful and very helpful to the whole family. If you are mindful in the morning and try to nourish mindfulness throughout the day, you may be able to come home at the end of a day with a smile, which proves that mindfulness is still there.
I believe that every home should have one room for breathing. Simple practices like conscious breathing and smiling are very important. They can change our civilization.
/misc | Jun 04, 2011
Extending Microsoft Standalone System Sweeper #
(UPDATE: Standalone System Sweeper has a new name: Windows Defender Offline. Unfortunately, Microsoft has restricted WDO to prevent the extended functionality described below.)
Following closely on the heels of the recently released Microsoft Safety Scanner (which is reminiscent of Trend Micro's classic SysClean), Microsoft has released their Standalone System Sweeper to the general public (download page). As mentioned previously, this bootable antimalware tool has been restricted to those with access to the Microsoft Desktop Optimization Pack (MDOP) / Diagnostics and Recovery Toolset (DaRT) as part of a TechNet, MSDN, or other subscription service (though the DaRT 7 beta is now available to anyone that completes a short questionnaire (Windows Live ID required)).
The newly-released Standalone System Sweeper has several benefits and drawbacks compared to DaRT:
+ no need to build a WinPE image, as it is bundled in the download
+ works on a wide variety of Windows hosts (unlike DaRT, which, with 3 or 4 different verions, is very particular about which OS it runs on)
- additional DaRT tools (Locksmith, File Restore, Disk Commander, etc) not included
- no obvious way to access standard Windows tools (chkdsk, cmd, regedit, diskpart, robocopy, etc) even though they are included in the disc image
Here's how to work around that last one:
- Click Home
- Click drop down arrow next to Help icon
- Click Check for updates > Browse...
- Click Computer > X: > Windows > System32
- Right click cmd (or notepad, taskmgr, etc) > Run as Administrator
Virus definitions (mpam-fe.exe) can be downloaded from Microsoft (choose the 32 or 64 bit versions next to the Security Essentials logo).
If you want to work with the registry, see Michael Pietroforte's instructions for using regedit as an offline registry editor.
/windows | May 30, 2011
Restore off-screen application windows #
🌱 ForceWindowVisible 1.1 [30k] {S}+ Force application windows to appear on screen (even the recalcitrant ones that insist on remaining off screen after switching from multiple monitors back to single). 📺
/windows | May 30, 2011
A simple weblog generator written in Python #
Pelican, by Alexis Métaireau, calls to mind similar engines like Blosxom and Ode; blog entries can be created in any text editor and a simple CLI tool (re)generates the static pages. Support for Disqus comments, themes, and PDF output. (Via Brian Lane's post on HackerNews. See also the creator's original announcement.)
UPDATE: Bert JW Regeer points to an even simpler Python script by Oben Sonne called Poole. Example site
/blosxom | May 29, 2011
Batch convert month names to numbers in filenames #
This bash oneliner renames files formatted as Monthyyyy (January2003, March2011, etc) to mm-yyyy (01-2003, 03-2011, etc):
$ for i in * ; do mv $i $(echo $i | sed -e "s/January/01-/" -e "s/February/02-/" -e "s/March/03-/" -e "s/April/04-/" -e "s/May/05-/" -e "s/June/06-/" -e "s/July/07-/" -e "s/August/08-/" -e "s/September/09-/" -e "s/October/10-/" -e "s/November/11-/" -e "s/December/12-/") ; done
"Good, Watson, good! But not, if I may say so, quite good enough!" -- Sherlock Holmes in The Valley of Fear
Indeed, we'd be better off with a date format like yyyymm. Let's swap the position of the month and date, removing the hyphen at the same time:
$ for i in * ; do mv $i $(echo $i | sed "s/\(.*\)-\(.*\)/\2\1/") ; done
Now the files are named 200301, 201103, etc.
RenameWand also makes short work of file renaming operations, especially involving dates. The previous example becomes:
$ java -jar RenameWand.jar "<month>-<year>" "<year><month>"
Files can even be renamed into subdirectories based on dates in their names (e.g., "foo jun 2011" becomes 2011/jun/foo):
$ java -jar RenameWand.jar "<a> <month> <year>" "<year>/<month>/<a>"
/nix | May 26, 2011
Migrating from the QuickBooks 2011 for Mac trial to retail #
Intuit offers a 30-day trial of QuickBooks 2011 for Mac. Sadly, they do not offer a way to activate or convert it to a retail copy. Instead, you can download a retail version from Intuit for $229.95 or buy a boxed copy from Amazon for $179.99. For those who choose the latter, beware: the data you've been working on in the trial version cannot (initially) be opened by the retail copy from disc. You're greeted with this helpful message:
The document "filename.qb2011" could not be opened. The managed object model version used to open the persistent store is incompatible with the one that was used to create the persistent store.
This can be resolved by updating to the latest version (QuickBooks > Check for QuickBooks Updates...). Before pressing "Install and Relaunch", you may want to grab a copy of the downloaded archive (which is a full version of the app and was located at /private/var/folders/ec/longstring/-Tmp-/QuickBooks 12.0f4060 Update/QuickBooks.tgz on my machine) for safe keeping.
On a side note, to cd into a directory that starts with a dash / hyphen / minus sign, prefix the name with the directory path (i.e., './'). cd -Tmp-, cd '-Tmp-', and cd "-Tmp-", all return "invalid option", while cd ./-Tmp- does the trick.
/mac | May 13, 2011
Stephen Tobolowsky: Great Storyteller? #
Or greatest storyteller? If you do absolutely nothing else today, check out Stephen's podcast - it's the single greatest use of technology in history.
/misc | May 05, 2011
Tiny break reminder for OS X #
AntiRSI 2.1 [76k] Unobtrusive break reminder to help prevent RSI (repetitive strain injury) and other computer-related stress. 📺
/mac | Apr 25, 2011
Tolstoy on science, religion, and politics #
- [W]hat is referred to as science is a collection of incidental, totally disconnected items of knowledge which are often completely useless, and not only fail to present the indisputable truth but very often present the most crude delusions, displayed as the truth today and refuted tomorrow ...
- The truths of the religion common to everyone today are so very simple, intelligible and close to the hearts of all men. It would seem that parents, rulers, and teachers only need to instil in children these clear and simple truths, common to people of all religions, the metaphysical essence of which is that the spirit of God is in man, and the practical law of which is that man must behave towards others as he would wish others to behave towards him, rather than the outdated and absurd teachings on the Trinity, the Virgin Mother, the Redemption, Indras, Trimurti and Buddhas and Mohammeds flying in the sky, and this in itself would alter the whole of mankind's life.
- When among one hundred men, one rules over ninety-nine, it is unjust, it is a despotism; when ten rule over ninety, it is equally unjust, it is an oligarchy; but when fifty-one rule over forty-nine (and this is only theoretical, for in reality it is always ten or eleven of these fifty-one), it is entirely just, it is freedom!
From What is religion and of what does its essence consits? and The law of love and the law of violence in A Confession and Other Religious Writings, translated by Jane Kentish
/misc | Apr 14, 2011
Tiny raw sockets sniffer #
Claus kindly sends word of RawCap from NETRESEC, a free raw sockets sniffer for Windows XP (Vista & 7 not well supported "due to current limitations in the raw sockets implementation"). RawCap can sniff any interface (including WiFi and PPP) with an IP address (including 127.0.0.1). Only 17k with no install required (though you'll need the .NET Framework 2.0 or higher).
/windows | Apr 10, 2011
Check Mac processor type (Intel or PowerPC) from single user mode #
Identify your Mac's CPU model from single user mode or the Terminal:
$ system_profiler
Hardware Overview:
Model Name: MacBook Pro
Model Identifier: MacBookPro5,5
Processor Name: Intel Core 2 Duo
Processor Speed: 2.26 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 3 MB
Memory: 4 GB
Bus Speed: 1.07 GHz
Boot ROM Version: MBP55.00AC.B03
SMC Version (system): 1.47f2
Serial Number (system): XXXXXXXXXXX
Hardware UUID: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Sudden Motion Sensor:
State: Disabled
...
- The system serial number and hardware UUID have been masked in this example, but will display normally when system_profiler runs.
- The output above has been considerably truncated; you may want to use grep to reduce noise:
$ system_profiler | grep "Processor Name:"
Processor Name: Intel Core 2 Duo
- Another method for tightening up output: $ system_profiler SPHardwareDataType SPSoftwareDataType
- In Recovery Mode, specify the full path when running, e.g., /Volumes/Macintosh\ HD/usr/sbin/system_profiler
- The sudden motion sensor (SMS) has been disabled on this hardware since an SSD is installed. Enable SMS via $ sudo pmset -a sms 1 and disable with $ sudo pmset -a sms 0
/mac | Apr 09, 2011
Simple cross-platform file transfer #
Dukto is a zero-config, cross-platform (Linux, Mac, Symbian^3, Windows) file transfer app designed for LAN use. No installation is required, nor are any config files or registry changes made. Simply launch the app on both computers and drag-and-drop desired files/folders to begin transfer over UDP. Full support for Unicode characters in filenames, and transfers are logged. C++ source code by Emanuele Colombo generously released under the GPLv2.
Much easier than messing with SMB shares, logins, etc. Flawlessly transferred thousands of files (over 50GB worth) via Ethernet crossover cable from a Dell Vostro running Windows XP to a MacBook Pro running OS X 10.6. 📺
UPDATES:
- Snapdrop - "Local file sharing in your browser. Inspired by Apple's Airdrop." | GitHub
- croc - "Allows any two computers to simply and securely transfer files and folders." | HN
- NitroShare - "Cross-platform network file transfer application." | GitHub
- Magic Wormhole - "Get things from one computer to another, safely." | HN
- Flying Carpet - "Wireless, encrypted file transfer over automatically configured ad hoc networking."
/misc | Apr 03, 2011
Find and fix corrupt audio files #
via Mike Mills
/windows | Apr 03, 2011
Write Windows boot records in Linux #
ms-sys "is a Linux program for writing Microsoft compatible boot records. The program does the same as Microsoft 'fdisk /mbr' to a hard disk or 'sys d:' to a floppy or FAT partition except that it does not copy any system files, only the boot record is written."
See How to fix your Windows MBR with an Ubuntu liveCD for a walkthru and discussion.
/windows | Mar 27, 2011
Tiny web server with uploading support #
Quoted/paraphrased from the app's homepage:
Geoff's Web Server is a small (40k) web server that doesn't need any special rights, drivers, services etc. and needs no configuration for normal use. When run, it will generate an ini file which can be edited to enable logging, throttling, and uploading. Nothing is stored in the registry or external directories.
Geoff's Web Server only supports the HTTP GET command to download files, and the POST command for uploading. There is NO SECURITY WHATSOEVER. Only the bare minimum of HTTP headers are used.
Somewhat troubling:
- Source code is not available
- Author quote: "I wouldn't really recommend this but, I've been running this live on the Internet for a couple of weeks now and haven't yet been hacked. Though a few have tried."
Despite these concerns, some users may find it handy on the LAN, especially for transferring files between devices in a cross-platform environment.
/windows | Mar 20, 2011
Retire in 5 years #
Jacob Lund Fisker's Early Retirement Extreme is highly recommended for those who seek a free (if unconventional) lifestyle. See also his 4-part blog post, How I became financially independent in 5 years: 1 2 3 4.
Favorite quote so far from the book:
"... [M]odern society seems to be using a slightly more complicated version of a Keynesian economic stimulus scheme where the economy is stimulated by having some people dig a hole, then having others fill it back in the next day ... We're even following Keynes' suggestion quite literally when we dig resources out of the ground, fashion them into consumer objects, temporarily store them in our homes, rarely use them, and eventually replace them with a new and bigger model, while sending the old and likely still functional object to a landfill—back in the ground."
If you enjoy ERE, don't miss Tom Neale's classic tale, An Island to Oneself: 1 2 3
/misc | Feb 26, 2011
Newly added to the Docs section #
Installing Luigi Rizzo's Standalone Kindle Terminal
/eink | Feb 25, 2011
Web-based Avery label printing for Windows, Mac & Linux #
After struggling to print labels with the OS X Address Book and Pages, Avery Design & Print Online was a godsend. There are thousands of blank and pre-designed templates, and results can be saved as a PDF.
/misc | Feb 25, 2011
Migrate Palm Desktop calendar to iCal or Outlook #
dba2ics converts Windows Palm Desktop calendars (.dba/.dat/.mdb) to .ics, which can be easily imported into iCal, Outlook, etc.
While there is initially a GUI, it disappears while converting (a process which gobbles up all available CPU time). The conversion took about 10 minutes for a 1.5MB dba file.
Mac Palm Desktop users can simply export all datebook items by opening the calendar, selecting File > Export, and choosing "All Datebook items" and "vCal".
/palm | Feb 24, 2011
Newly added to the Internet page #
🌱 ftpdmin 0.96 [65k] {S}+ Minimal FTP server primarily for one-off LAN transfers (no security or password options available) 📺
/windows | Feb 22, 2011
Newly added to the Docs section #
ATA Secure Erase (SE) and hdparm
/nix | Feb 21, 2011
Replace dupes with hard links or shortcuts #
- CloneSpy: GUI dedupe utility that can (among other things) replace duplicate files with shortcuts or hard links.
- Dupemerge: CLI utility that searches for identical files on a logical drive and creates hard links among those files. Includes a number of speed enhancements: only files with the same size are compared, hashsums for same-sized files get calculated incrementally, and more. (via Anthony Frazier)
- Duplicate File Hard Linker (DFHL): Open source CLI tool that replaces duplicate files with hard links. Byte-per-byte comparison ensures only identical files are hard linked.
- Finddupe: Open source CLI tool for detecting, deleting, or hard linking duplicate files. Can also list all hardlinked files on a given volume (similar to Microsoft's Hlscan.exe). Finddupe computes a hash based on the first 32k of a file, only checking entire file if there is a match.
This KB article explains hard links:
A hard link is a folder entry for a file regardless of where the actual file data exists on that volume. Every file is considered to have at least one hard link. On NTFS volumes, each file can have multiple hard links; therefore, a single file can be displayed in many folders (or even in the same folder with different names). Because all of the links reference the same file, programs can open any of the links and modify the file. A file is deleted from the file system only after all of the links to it have been deleted. After you create a hard link, programs can use the link like any other file name. Note that Windows Explorer and a command prompt will show all linked files as being the same size, even though they all share the same data and do not actually use that amount of disk space.
This last bit can be confusing. Let's say you've got a folder with three duplicate files of 10MB each. After replacing the dupes with hard links, the folder size is still reported as 30MB by Windows Explorer and cmd.exe. However, the "Used space" reported by Windows Explorer for the volume will have decreased by 20MB.
/windows | Feb 20, 2011
iPhoto '09 Theme Music files #
can be found in the following directory: /Library/Application Support/iLifeSlideshow/Audio. However, as the filenames and song names do not match, here is the key:
Song |
File |
Endless Summer |
Classic.m4a |
Hey Now |
KenBurns.m4a |
Eine Kleine Nachtmusik |
PhotoEdges.m4a |
You've Got A Friend In Me |
Scrapbook.m4a |
I Want Freedom |
Shatter.m4a |
Linus and Lucy |
SlidingPanels.m4a |
Doxy |
Snapshots.m4a |
Clair De Lune |
WatercolorPanels.m4a |
/mac | Feb 07, 2011
"There was an error opening the file" - DOCX #
You receive an error when trying to open a .docx file in Word 2003 or with the Word Viewer. The fix is simple enough:
regsvr32 %SystemRoot%\system32\ole32.dll
/windows | Feb 03, 2011
Disable FreeFall Data Protection #
Note to Dell: if you sell a laptop with a SSD preinstalled, please do not ship it with a free fall sensor service enabled. For now, users can disable this service manually (it's listed as FF Install Filter Service).
/windows | Feb 01, 2011
Possessions #
- Among my most prized possessions are the words that I have never spoken. -- Orson Rega Card
- You possess only whatever will not be lost in a shipwreck. -- Al-Ghazali
- The wise man carries his possessions within him. -- Bias of Priene
- To have what we want is riches, but to be able to do without is power. -- George MacDonald
/misc | Jan 30, 2011
Verizon Wireless Error QA913 & QA918 #
The Dell Mobile Broadband Utility / Novatel Wireless app on a new Dell Latitude returned a QA913 error every time we tried to activate service on our Dell Wireless 5620 EVDO-HSPA Mobile Broadband Mini-Card. Verizon tech support maintained that everything was OK on their end, and referred us to Dell. Preston in Dell Pro Support ferreted out a fix by toggling the network from Verizon to AT&T and back (drop-down menu at top left > Settings > Network Selection).
Now we had signal strength displaying properly, but QA913 was replaced with the equally cryptic QA918. Added Dell Mobile Broadband Utility to the Windows Firewall exception list (as suggested here), rebooted, and all was well.
Some reports suggest that certain QA913 errors can only be resolved by having Verizon level 2 or 3 technicians do a DMU reset.
/windows | Jan 28, 2011
From the mailbag #
- nget - a command line nntp file grabber
- HTTP_GET - a command line HTTP file grabber
- Freezerware - Loads of tiny Win and DOS tools by Brian Friesen, including CD2ISO, DirSize, ListShares, and Sweep (execute a given DOS command recursively)
(via Lostgallifreyan and Mike Mills)
/windows | Jan 23, 2011
Synthetic Japanese calligraphy brush #
Took a fair bit of time to find a vegan calligraphy brush 📺, so I've posted the links for others who might be searching:
- あかしや 太筆 書写楽 ALP-102: 「原材料の全てが特殊な人造毛で作られています。その為、動物の毛に比べ耐久性に優れ、毛抜けや毛切れもなく、しかも弾力があり、先端も鋭いため、ハネ、ハライ等、文字の基本の勉強に最適です。また、人造毛でありながら、墨含みを良くする為の工夫もなされ、初級入門者が安心して使っていただけます。動物の毛を使わない自然環境に優しい筆として特に注目されています。」(brush shown in photo is for a different item)
- あかしや 書道筆 太 ALP-102: 「高品質ナイロン毛を使用した太筆です。丈夫で長持ちです。」
- 書写楽(しょしゃらく)ALP-102: 「人造毛筆」
Additional search terms: 人工、ビーガン、ナイロン筆、nylon, man-made, shodo
/misc | Jan 13, 2011
Buffalo TeraStation blinking red light #
The TeraStation HD-H1.0TGL/R5 suffers from an unfortunate design flaw: by default, when a drive in the RAID array fails (indicated by the STATUS/FULL LED flashing red) the TeraStation shuts down within seconds of booting up. How are distraught users supposed to recover their data from a still-functional (though degraded) RAID1 or RAID5 array?
In short: with a quickness. You'll need to know (or find) the IP address of your TeraStation (the default is 192.168.11.150) and the username/password (defaults are "admin" and "password"). As soon as the TeraStation begins to power up, start trying to access
http://your_terastation_ip/cgi-bin/ts.cgi?page=disk&mode=array&type=list
in your web browser. This is the Disk Management > RAID Configuration page 📺. At the bottom of the page, under "RAID Array Error Detection Response", change the "Automatic Shutdown" option from "Enable" to "Disable" and click Apply. The TeraStation will still shutdown this time, but when you press the power button next time, it will stay on. Copy your data immediately!
/misc | Jan 05, 2011
Vocation / Avocation #
- Only those who take leisurely what the people of the world are busy about can be busy about what the people of the world take leisurely. -- Chang Chao
- Let not to get a living be thy trade, but thy sport. -- Henry David Thoreau
- I look on that man as happy, who, when there is question of success, looks into his work for a reply, not into the market, not into opinion, not into patronage. In every variety of human employment, in the mechanical and in the fine arts, in navigation, in farming, in legislating, there are among the numbers who do their task perfunctorily, as we say, or just to pass, and as badly as they dare, -- there are the working-men on whom the burden of the business falls, -- those who love work, and love to see it rightly done, who finish their task for its own sake ... -- Ralph Waldo Emerson
- Now and then it's good to pause in our pursuit of happiness and just be happy. -- Guillaume Apollinaire
/misc | Jan 01, 2011
Subscribe or visit the archives.