0. Internet 1. Text 2. Graphics 3. System 4. File 5. Misc 6. Palm 7. OS X |
Randomize lines with custom delimiter # Arthur de Jong's rl (randomize lines) "reads lines from an input file or stdin, randomizes the lines and outputs a specified number of lines. It does this with only a single pass over the input while trying to use as little memory as possible." It came in handy when I wanted to randomize a collection of quotes which looked like this: %Here's how I randomly reordered them with rl, specifying "%" as the delimiter instead of the default newline: $ rl -d% quotes.txt > randomized_quotes.txtThe latest version is 0.2.7. Install via ./configure && make && make install, or OS X users can grab this binary I compiled under 10.6. (tags: unix, randomize, lines, text, reorder, rearrange) /nix | Apr 29, 2010 Transfer large files directly between computers on the Net #There are a number of free, third-party solutions for transferring files directly from computer A to computer B across the Internet:
/mac | Apr 28, 2010 Shrink PDF file sizes with ShrinkIt #ShrinkIt 1.1 [181K] Strips needless metadata from PDFs to reduce file size. /mac | Apr 27, 2010 The disk cannot be partitioned because some files cannot be moved. #Boot Camp offers some really bad advice when it can't partition the disk: The disk cannot be partitioned because some files cannot be moved.A much more helpful message would be: You've got some big file(s) I can't move. Find 'em (find ./ -size +100M) and get 'em off the disk, or just use iDefrag instead.No, actually this is what the message should read: You need to move big_file.iso to another disk before Boot Camp setup can continue. /mac | Apr 27, 2010 Hard drive enclosure with write protect switch #It is getting harder and harder to find USB flash drives with write protect switches. Thankfully, ACARD Technology makes the ACP-2127, a 2.5" USB to SATA hard disk enclosure with hardware write protect switch. Paired with a fast HDD or SSD, this could be the perfect replacement for a technician's aging flash drive. Mars Tech has the best price ($20), and awesome phone-based customer service to boot. /misc | Apr 26, 2010 Newly-added hex editor #/windows | Apr 24, 2010 Oh, you didn't need that boot loader, did you? #It's been years since the outcry over TurboTax writing to the boot track forced them to drop DRM altogether. Inexplicably, AutoCAD continues to use this dangerous copy protection scheme (Macrovision FLEXnet or SafeCast or whatever it's called), writing to sector 32 of the boot track. As ExtremeTech pointed out long ago: Unfortunately, these "reserved" sectors of the hard drive aren't necessarily a safe place for data. And they're an especially dicey place to keep licensing information ... Data compression utilities, "multiboot" utilities, password protection and encryption software, and sector translation software (which allows older computer systems to accept today's huge hard drives) may also reside in this area.According to reports, Macrovision DRM has exposed customers to malware attacks, caused TrueCrypt volumes to become unbootable, and destroyed non-Windows partitions. To top it all off, SafeCast is apparently easily circumvented by the "bad guys" anyway. Autodesk, a humble request: please refrain from making potentially dangerous, low-level changes to your customers' hard drives. It really ruined an otherwise perfectly good week for a friend of mine. /windows | Apr 24, 2010 Open source hex editor for OS X #Hex Fiend 2.0 [935k] {S} Hex editor with support for huge (over 100GB) files. /mac | Apr 22, 2010 Full-screen, portable text editor #WriteMonkey is a full-screen, portable plain text editor with: customizable colors, fonts, and sounds, statistics, bookmarks, text replacement shortcuts, autosave, history, Markdown/Textile shortcuts and export, and much more. Requires .NET Framework. (via Download Squad) /windows | Apr 22, 2010 Excellent freeware firewall for Vista and Windows 7 #Windows 7 Firewall Control 3.5 weighs in under 1.3MB, comes in both 32 and 64 bit versions, and has a portable version to boot! Runs fast and clean, with very little impact on system performance. Offers ingress (inbound) and egress (outbound) filtering. Brings back memories of ZoneAlarm's early, pre-bloat years. Shareware version also available. /windows | Apr 21, 2010 Changing / spoofing your MAC address in Windows and OS X #
/misc | Apr 21, 2010 4DOS > 4NT > TCC LE #Take Command Console LE (TCC LE) is a freely available version of the command processor formerly known as 4NT (and before that, 4DOS). It's like cmd.exe on steroids, with command history, built-in file viewer, core scripting language, hundreds of new command options, and much more. /windows | Apr 21, 2010 OS X Address Book contacts not syncing with iPhone #mont3's instructions from 2008 helped us resolve a local (USB) Address Book sync issue. I have fixed a number of typographical and procedural errors (including the potentially tragic instructions to "Go to FINDER, LIBRARY, APPLICATION SUPPORT and delete everything in there") and updated the process for Snow Leopard:
/mac | Apr 21, 2010 Migrate from Windows Mail to Apple Mail #If you're moving from Vista's Windows Mail to OS X's Mail, look no further than Jürgen Lüthje's eml2mbx to convert your mail folders / eml files to mbox format. Or go the other way with his mbx2eml. Both apps are rather reminiscent of Ulrich Krebs' DbxConv, which converts Outlook Express dbx files to mbox or eml. /windows | Apr 21, 2010 Extract strings from raw disk device or image #After filling a hard drive with zeroes (followed by a quick format), I wanted to ensure that no sensitive data remained. My first thought was to use a disk editor/viewer like iBored or Disk Investigator, but scrolling through millions of blocks gets dull pretty quickly. So I tried piping dd to strings - bingo: $ sudo dd if=/dev/rdisk2 bs=512 | strings -a QpQp EFI PART BSD 4.4 pEFI FAT32 Non-system disk Press any key to reboot RRaA rrAaA' ...Initially, I used sudo kill -s SIGINFO dd_pid to check on dd's progress, but then remembered dcfldd, an enhanced version of dd with a much better progress indicator (among many other improvements): $ sudo dcfldd if=/dev/rdisk2 bs=512 | strings -a QpQp EFI PART ... 6144 blocks (3Mb) written.EFI ( 124928 blocks (61Mb) written. ...UPDATE: While looking for a hex editor that would search for non-matching patterns, I stumbled upon an even simpler solution: use hexdump or od (syntax is the same for both): $ hexdump /dev/rdisk2 0000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 *Duplicate lines are truncated (as indicated by the asterisk) unless the -v option is specified: $ od -v /dev/rdisk2 0000000 0000 0000 0000 0000 0000 0000 0000 0000 0000010 0000 0000 0000 0000 0000 0000 0000 0000 0000020 0000 0000 0000 0000 0000 0000 0000 0000 ... /mac | Apr 14, 2010 Computer simulators and assembly language learning tools #6502 is an integrated macro assembler, simulator and debugger for 650x microprocessor family. Lets you write, test and run 6502/65c02 programs
CPU Sim is an interactive Java-based CPU simulator for use in introductory computer organization classes. It allows users to design simple computer CPU's at the microcode level and to run machine-language or assembly-language programs on those CPU's through simulation. It can be used to simulate a variety of architectures, including accumulator-based, RISC-like, or stack-based (such as the JVM) architectures. EASy68K is a 68000 Structured Assembly Language IDE. EASy68K allows you to edit, assemble and run 68000 programs on a Windows PC or Wine. emu8086 is an 8086 microprocessor emulator with integrated assembler and tutorials for beginners. The emulator runs programs like the real microprocessor in step-by-step mode. It shows registers, memory, stack, variables and flags. All memory values can be investigated and edited by a double click. The instructions can be executed back and forward. emu8086 can create a tiny operating system and write its binary code to a bootable floppy disk. The software package includes several external virtual devices: robot, stepper motor, led display, and traffic lights intersection. Additional devices can be created. Lia is a simple computer simulator and assembly editor written in pure Java. It enables you to write/edit/save your "assembly" files and then execute the code using the built-in simulator. A list representing the memory contents is available at all times so the programmer can see what is really happening. Full source code included.
Logisim is an educational tool for designing and simulating digital logic circuits. Circuit layouts can be used as "subcircuits" of other circuits, allowing for hierarchical circuit design. (via David Gould) MARS (MIPS Assembler and Runtime Simulator) is a lightweight interactive development environment (IDE) for programming in MIPS assembly language, intended for educational-level use with Patterson and Hennessy's Computer Organization and Design. SPIM is a self-contained simulator that will run MIPS32 assembly language programs. It reads and executes assembly language programs written for this processor. SPIM also provides a simple debugger and minimal set of operating system services. SPIM does not execute binary (compiled) programs. TOM Computer Simulator is designed for computer architecture and programming courses. TOM stands for Thoroughly Obedient Moron, and consists of a number of components each designed to teach the fundamentals of computing via simple interactions. /misc | Apr 14, 2010 Memory lane #Read Creative Computing, Compute!, and more at The Classic Computer Magazine Archive. /misc | Apr 12, 2010 Grep is greedy; make it less so #While editing an HTML file in TextWrangler, I needed to find and replace all occurrences of: <span class="a">text</span>This regex: \<span class=\"a\"\>.*\<\/span\>returned results like: <span class="a">text</span><span class="b">more text</span>Using a non-greedy quantifier (the question mark) returned the desired results: \<span class=\"a\"\>.*?\<\/span\> UPDATE: Wikipedia has more on lazy quantification: "... modern regular expression tools allow a quantifier to be specified as lazy (also known as non-greedy, reluctant, minimal, or ungreedy) by putting a question mark after the quantifier (e.g., <.*?>) ..." /mac | Apr 11, 2010 Batch download YouTube videos from the command line #youtube-dl 2010.04.04: Written in Python; public domain license; excellent documentation; runs under *nix, OS X, Windows; works with latest YouTube changes. First attempt to batch download in bash returned an error: $ youtube-dl.sh -o %(title)s.%(ext)s --batch-file urls.txt --best-quality --no-overwritesJust had to enclose the output template in single quotation marks: $ youtube-dl.sh -o '%(title)s.%(ext)s' --batch-file urls.txt --best-quality --no-overwritesThe URLs for urls.txt were collected from a YouTube playlist webpage like so: $ grep -o '/watch?v=.\{11\}' source.htm | sed 's/^/http:\/\/youtube.com/' | uniq > urls.txtwith sed prepending http://youtube.com to grep's output, and uniq culling the duplicates. /nix | Apr 11, 2010 Unpack / extract .MSI file contents #MSI Unpacker extracts files from .MSI installer packages. I used it (along with Universal Extractor) to unpack the Debugging Tools for Windows (required for using Crash Reporter in ERD Commander 2005) as follows:
/windows | Apr 07, 2010 Best organic Japanese tea source on the Net #Just received our first order of matcha from Yuuki-Cha.com - very impressed with their fast service and exceptional tea. In addition to matcha, they carry sencha, gyokuro, genmaicha, etc, all of which are certified organic by JAS; some also carry USDA organic certification. If you're into Japanese tea, check them out. /misc | Apr 01, 2010 |
Categories
Blosxom Archive
2012: 2 1
2011: 12 11 10 9 8 7 6 5 4 3 2 1 2010: 12 11 10 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
Ezine Archive
|