Interests | Philosophy | Projects | Photos | Hacks | Files | Puzzles | Quotations | Bookmarks | Contact
| June 12 | Added The Weak, The Strong, The Right and The Wrong to philosophy |
| March 16 | Added The Black Swan and A Secret Life to booklist |
| November 12 | Added Patty's Got a Gun to booklist |
| October 16 | Added vacation photos from Maui |
| October 11 | Added 2001 Chevrolet Impala Starting Problem and Solution |
| September 4 | Added Analysis of Officers and Directors for Companies on the NYSE |
|
Short and loaded list of my technical interests:
|
Some of the finer things in life I enjoy:
|
This section contains a couple of my philosophical writings.
This section contains a presentation of several of my more interesting and better implemented projects.
lpr webbmask.ps. Note that for the Lissajous patterns rendered on the scope to make any sense, the two channels must be calibrated such that both signals have the same amplitude, and that this amplitude makes the major axis of the Lissajous ellipse equivalent to the diameter of the Webb mask circle. This can usually be achieved using the smaller calibration knob on top of the channel voltage/divison knob. Finally, read the phase by where the minor axis of the ellipse crosses the mask.Presented in this section are smaller hacks that are not large enough to be considered projects. Most of these hacks are pieces of code that I quickly conjured in several hours to automate a tedious task.
These unrefined works are made available in hopes that you will find them useful. Please let me know of any bugs that you find or any suggestions that you think would improve the code.
Small program that sends a SIP invite packet to a specified telephone, ringing it. Useful as a wake-up dialer when combined with a cron daemon.
Using the UNIX dd tool, a hard disk drive can be
copied to a file and later restored back to the disk. However, the file that
is being used to store the hard disk image may have limitations. For
example, it may reside on a FAT32 filesystem, in which case it has a
maximum size limitation of 2GB, or it may reside on a CD-ROM. I wrote
two shell scripts that split the hard
disk image over several files.
The scripts are designed to be run on a UNIX system, using Slax for instance. Note that host operating system on the hard drive to be imaged is irrelevant -- the scripts merely need to be run under UNIX.
For the gzip compression to be useful, the unused portions of the hard drive must have low entropy. One way to achieve this is to write large homogeneous files to the file system, for instance a 2GB file consisting of all zeros. The compression is good --- a 20GB disk with a single Windows XP partition, 2GB full, fit into a 1.2GB image.
In an act of stupidity, I performed an rm -rf *
on my home directory, by accident. I immediately attempted to perform a
file recovery by unmounting my reiser file system
/home partition and attempting a
reiserfsck --rebuild-tree -S /dev/hda3. This
process turned into quite an ordeal.
My partition had quite a few bad blocks that the file system didn't know
about. reiserfsck terminated upon reaching the bad
blocks. Next, I attempted to run badblocks -b 4096 -o
hda3.bb -s /dev/hda3 to generate a list of badblocks to pass to
reiserfsck. After many hours, I had a list of bad
blocks; however, upon being passed this list,
reiserfsck determined that several of the blocks
were journal superblocks, and again terminated.
At this point I wrote the
code that fixed my
problems and allowed me to recover most of my files. There are essentially
two #define options, NOSUPERDIE and
NODIE. If NOSUPERDIE is 1, then upon
encountering a bad block, reiserfsck does not terminate, but
rather performs a destructive write to the bad block. Modern hard drives remap
the block to a working block upon a destructive write. This is useful for
remapping bad journal superblocks. The second option NODIE,
causes the bread function to dynamically avoid badblocks, as if
the blocks had been passed via the -B option. This significantly
decreases the time necessary to perform bad block checks.
Different people have different ways of naming files. Some people use spaces, capitalization, and other punctuation in filenames. Downloading files from various sources creates a quagmire of filenames. This loss of clean standardization is frustrating. More importantly, spaces often act as argument delimiters and punctuation often has special mean in scripting languages.
I wrote a small bash script called rmspace
to remedy this problem. This script takes multiple files, for example via
rmspace *, and removes capitalization and punctuation.
Additionally, spaces are replaced with underscores.
Below is a collection of a variety of mind puzzles that I have come across. Unless otherwise noted, I am not the original author of each puzzle, and each puzzle has a legitimate answer. In other words, the solutions are not clever circumventions of the stated conditions. Have fun!
More good monthly puzzles can be found at IBM Research Watson.
E-mail: chiszp[at host]alumni.caltech.edu
Telephone (SIP):
sip:17470450318@sipphone.com
Telephone (PSTN): (202) 470-3814
| Copyright (c) 2003-2009 Chris Hiszpanski. All rights reserved. | Last modified: 03:11 EST Jun 12, 2009 |