tag:blogger.com,1999:blog-77358172009-02-21T02:38:19.991-05:00ray's big blogstuff that's probably only useful to me.Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.comBlogger21125tag:blogger.com,1999:blog-7735817.post-26173351877454967282009-01-20T10:29:00.003-05:002009-01-20T10:43:52.222-05:00Inauguration and Martin Luther King, Jr. DayOn the news they've been talking a lot about how it is some kind of <a href="http://www.nydailynews.com/ny_local/2009/01/18/2009-01-18_days_align_in_mysterious_way_for_barack_.html">sign from God</a> or what have you that Obama's inauguration is the day after Martin Luther King, Jr. Day. I wanted to know just how rare this was, exactly. I wrote a little Python snippet to do the work for me:<br /><pre><br /><span style="font-family:courier new;">import calendar</span><br /><br /><span style="font-family:courier new;"># Martin Luther King, Jr. Day was established in 1986, so the first presidential inauguration to be affected was</span><span style="font-family:courier new;"><br /># George Bush I on Jan 20, 1989. King's birthday was the 15th, but we celebrate it on the 3rd Monday of each January.</span><span style="font-family:courier new;"><br /># So, to me, the interesting days would be when MLK is on the 19th, 20th, or 21st.</span><br /><span style="font-family:courier new;"><br /># Let's go until the year 2089, just to get a full 100-year period since MLK started.</span><span style="font-family:courier new;"><br />start_year = 1989</span><span style="font-family:courier new;"><br />end_year = 2089</span><br /><span style="font-family:courier new;"><br />mon_19_ct = 0</span><span style="font-family:courier new;"><br />mon_20_ct = 0</span><span style="font-family:courier new;"><br />mon_21_ct = 0</span><span style="font-family:courier new;"><br />total_i_days = 0</span><span style="font-family:courier new;"><br />for year in range(start_year,end_year,4):</span><span style="font-family:courier new;"><br /> # increment the total number of inauguration days</span><span style="font-family:courier new;"><br /> total_i_days += 1</span><span style="font-family:courier new;"><br /> # Check for interesting Mondays</span><span style="font-family:courier new;"><br /> if calendar.weekday(year, 1, 19) == 0:</span><span style="font-family:courier new;"><br /> # Must be a monday</span><span style="font-family:courier new;"><br /> print 'Jan 19,', year</span><span style="font-family:courier new;"><br /> mon_19_ct += 1</span><span style="font-family:courier new;"><br /> if calendar.weekday(year, 1, 20) == 0:</span><span style="font-family:courier new;"><br /> # Must be a monday</span><span style="font-family:courier new;"><br /> print 'Jan 20,', year</span><span style="font-family:courier new;"><br /> mon_20_ct += 1</span><span style="font-family:courier new;"><br /> if calendar.weekday(year, 1, 21) == 0:</span><span style="font-family:courier new;"><br /> # Must be a monday</span><span style="font-family:courier new;"><br /> print 'Jan 21,', year</span><span style="font-family:courier new;"><br /> mon_21_ct += 1</span><span style="font-family:courier new;"><br />print "------------"</span><span style="font-family:courier new;"><br />print " TOTALS "</span><span style="font-family:courier new;"><br />print "------------"</span><span style="font-family:courier new;"><br />print "19:", mon_19_ct</span><span style="font-family:courier new;"><br />print "20:", mon_20_ct</span><span style="font-family:courier new;"><br />print "21:", mon_21_ct</span><span style="font-family:courier new;"><br />print "Inaugurations:", total_i_days</span><br /></pre><br />The output?<br /><pre><br /><span style="font-family:courier new;"><br />Jan 20, 1997</span><span style="font-family:courier new;"><br />Jan 19, 2009</span><span style="font-family:courier new;"><br />Jan 21, 2013</span><span style="font-family:courier new;"><br />Jan 20, 2025</span><span style="font-family:courier new;"><br />Jan 19, 2037</span><span style="font-family:courier new;"><br />Jan 21, 2041</span><span style="font-family:courier new;"><br />Jan 20, 2053</span><span style="font-family:courier new;"><br />Jan 19, 2065</span><span style="font-family:courier new;"><br />Jan 21, 2069</span><span style="font-family:courier new;"><br />Jan 20, 2081</span><span style="font-family:courier new;"><br />------------</span><span style="font-family:courier new;"><br />TOTALS </span><span style="font-family:courier new;"><br />------------</span><span style="font-family:courier new;"><br />19: 3</span><span style="font-family:courier new;"><br />20: 4</span><span style="font-family:courier new;"><br />21: 3</span><span style="font-family:courier new;"><br />Inaugurations: 25</span><br /></pre><br />So, it's not all that rare to have MLK fall on or within 1 day of inauguration day. In my little sample it happen once a decade on average, and last happened during the second Clinton inauguration.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-2617335187745496728?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-58145627112148541542008-11-06T15:47:00.004-05:002008-11-06T20:44:00.117-05:00Backing up iMovie Projects to DVDI recently got to a point where I was running low on disk space from all of the old iMovie projects that I have. I don't want to delete them, because I plan on editing them and using clips from them again in the future (they are mostly home movies of my daughter).<br /><br />As it is, they are sitting there un-backed-up because I already ran out of space on the backup drive for them. I'm not THAT worried about backup, because the original tapes still exist and I've made DVDs from the finished iMovie projects - but I sure would like to avoid re-transfering all that video, which is time-consuming.<br /><br />I could buy another hard drive, but frankly I already have 4 attached to this computer and I'm just not ready to buy another pair. Soooo... I've decided that I'm going to put the project files on DVD. The problem? An hour-long iMovie project is about 15GB, give or take. Here's the solution that I went with:<br /><ol><li>Put the iMovie into a folder and create a disk image (DMG) using Apple's Disk Utility:<br /><span style="font-family:courier new;">File->New->Disk Image From Folder...</span><br />I went with a "compressed" image type with no encryption. This takes a bit longer to make the image, but saves about a gigabyte of space.<br />Why did I chose DMG instead of ZIP or even just splitting the iMovie file? Well, for starters, an iMovie "file" is not a file at all, but an OSX "package" - actually a folder. Splitting a folder won't work, so you have to use a package format like ZIP, RAR, TAR, etc. Only ZIP and DMG give an easy and consistent way on OSX to save all of the resource fork data and such that are important to keeping the iMovie project usable. At first I tried ZIP, but had trouble splitting the ZIP file. Besides, wait until you see how easy it is to unpack a split DMG!</li><br /><li>If you want to go a bit crazy and really shrink the image size by just a bit more, you can use the new (in Tiger 10.4) bzip2 compression. This is not available from Disk Utility, so you are back to the command line again. To convert the above image from whatever format you chose to the bzip2 format:<br /><span style="font-family:courier new;">hdiutil convert 'image to compress' -format UDBZ -o 'new compressed image'</span><br />In my testing, this reduced the file size a bit more (a bit less than 1% over the normal "compressed" setting) but is really, really slow on my dual G5. I don't bother.<br /></li><br /><li>Split the DMG. This is trickier if you've never used the terminal. Basically, you need to fire up the terminal and type:<br /><span style="font-family:courier new;">hdiutil segment -o 'path to new segmented dmg' -segmentSize 4.35G 'path of dmg to split'</span><br />For example, if your dmg file is called MyProject.dmg, you might type this:<br /><span style="font-family: courier new;">hdiutil segment -o MyProject_split -segmentSize 4.35G MyProject.dmg</span><br />If you did that right, the folder specified in 'path to new segmented dmg' should slowly fill up with the newly-segmented dmg files.</li><br /><li>At this point, you COULD just burn the segments to disk and call it a day. However, I wanted to build in some redundancy in case the disks get scratched or degrade over time. So, I decided to use <a href="http://en.wikipedia.org/wiki/Parchive">PAR2</a> to add a little robustness to my archive. PAR2 is pretty nifty if you've never seen it - but I'll warn you that it is slow. Once again, I'm comfortable with the command line, but you could probably do just fine with <a href="http://www.xs4all.nl/%7Egp/MacPAR_deLuxe/">MacPAR deLuxe</a>. From the command line, I do this:<br /><span style="font-family:courier new;">par2create -r32 -l 'anything you like'.par2 'name_of_dmg without the extension'* </span><br />So for example, if your disk image is named MyProject.dmg, you would type:<br /><span style="font-family:courier new;">par2create -r32 -l MyProject.par2 MyProject*</span><br />Note that you need to be careful with the star, since it will match files that you aren't archiving. It's probably safer to just list out the files one at a time like this:<br /><span style="font-family:courier new;">par2create -r32 -l MyProject.par2 MyProject.dmg MyProject.002.dmgpart MyProject.003.dmgpart</span><br />See the -r32 part? That's the redundancy, and in this case it is 32%. That's because my archive ended up spanning 4 disks, but almost the entire 4th disk was empty since the dmg part was only about 100MB. So I took the empty portion and divided it by the archive size and that came out to 32%, which I'll fill with the resulting par2 files. Note that this will take a very... long... time. Run it overnight. But it'll all be worth it come restore time if one of those DVDs has a scratch!</li><br /><li>Finally! This part's easy... just burn those segments to individual DVDs using the Finder. At the end, throw all of your PAR2 files into the disk with the last segment, or maybe you chose to make an entire disk just for PAR2 files.</li><br /><li>Don't forget to test your data! All you should have to do is double-click on the first DMG file and OSX should look for the other segments automatically and mount the image.<br /></li></ol>So that's it. I'm sure there's a faster way, and the whole thing could be scripted up... but that's what I'm currently doing. Personally, I think there should be an "archive" button in iMovie.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-5814562711214854154?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-56593518351853423402008-07-02T12:01:00.004-04:002008-07-05T08:16:47.457-04:00Start Apple's X11 App on Alternate PortFirst post in a looooong time, look at that!<br /><br />Learned something today that I don't want to forget. For whatever reason, I can't get through on port 6000 over my office's new VPN. This was putting quite a crimp on my work-from-home flow, since 6000 is the default port of X11. There are a few ways around this, AFAIK:<br /><ul><li>Tunnel X11 through ssh</li><li>Change from the default port of 6000</li></ul>I started down the ssh path. Unfortunately, I don't have access to root on the Sun servers at work (go figure!), and so naturally AllowX11Forwarding is set to NO in the sshd config files. Eventually I could have made this work, but it would require me to set up the tunnels by hand and blah blah blah. A little bit of time spent on it was a bit confusing and frustrating and not for me.<br /><br />So then I thought, hey, why not just run the Apple X11 client at home on an open port? 6100 is open... so just use an offset (screen number) of 100, right? Only there is no preference for the port in Apple's app (at least not in MacOS 10.4). Fortunately, you can kick off X11.app from the command line like this:<br /><br /><span style="font-family:courier new;">> /Applications/Utilities/X11.app/Contents/MacOS/X11 </span><br /><br />(adjusted for your path, of course)<br /><br />And all you need to do is throw a display number (offset) of 100 in there:<br /><br /><span style="font-family:courier new;">> /Applications/Utilities/X11.app/Contents/MacOS/X11 :100</span><br /><br />And since I like the terminal to be available, I background the whole thing:<br /><br /><span style="font-family:courier new;">> /Applications/Utilities/X11.app/Contents/MacOS/X11 :100 &amp;</span><br /><br />Tada! X11 on port 6100!<br /><br />Of course, when you login to the server, you have to set the DISPLAY variable to the IP address of your home computer and the correct port - like so (assuming tcsh shell):<br /><br /><span style="font-family:courier new;">> setenv DISPLAY 123.45.67.89:100.0</span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-5659351835185342340?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-14531037038131795072007-10-27T09:52:00.001-04:002007-10-27T09:52:16.304-04:00DSC01988.JPG<div style="float: right; margin-left: 10px; margin-bottom: 10px;"> <a href="http://www.flickr.com/photos/ray_cathcart/1116279315/" title="photo sharing"><img src="http://farm2.static.flickr.com/1406/1116279315_3fcc4426cf_m.jpg" alt="" style="border: solid 2px #000000;" /></a> <br /> <span style="font-size: 0.9em; margin-top: 0px;"> <a href="http://www.flickr.com/photos/ray_cathcart/1116279315/">DSC01988.JPG</a> <br /> Originally uploaded by <a href="http://www.flickr.com/people/ray_cathcart/">Ray Cathcart</a> </span></div>I'm just testing the Flickr blog function<br clear="all" /><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-1453103703813179507?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-1149374011754347472006-06-03T17:52:00.000-04:002006-06-03T18:33:31.786-04:00Dvorak KeyboardI use the <span><a href="http://www.mwbrooks.com/dvorak/index.html">Dvorak</a></span> keyboard layout on my computer. Most people agree that I am a pretty weird bird, but that is not actually why I started using <span>Dvorak</span>. The actual reason is this: I never learned to touch-type. I went through the first 28 years of my life typing hunt-and-peck style, and I actually got pretty good - something like 28 words per minute (WPM) if I am transcribing something, faster if I don't have to constantly look away from the keyboard. Many times, I tried to force myself to learn to touch-type, and many times I reverted to looking at the keys. I decided that what I should do is put little stickers over the keys so that there was no way that I could cheat.<br /><br />This seemed like a pretty big inconvenience to my wife, however (and to whomever wanted to log in to my PC at work). As I browsed the web, I came across the <span>Dvorak</span> layout. I read that it was <span>pre</span>-installed on all Mac, Windows, and Linux machines... This allowed me to switch between both keyboards, minimizing the <span>inconvenience</span> of others. All my wife has to do is click on the little <span>DV</span> on the <span>menu bar</span> and change it to the little icon of the American flag.<br /><br />So my touch typing? I'm not that great, since I don't actually type all that much, but my speed with the <span>Dvorak</span> layout is now about 45-50 WPM. That's fast enough to make me happy - and now I can transcribe stuff. My next goal is to teach myself to touch-type on the standard <span>QWERTY</span> layout, but with the new kid that's not likely to happen.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-114937401175434747?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-1149003943595382442006-05-30T11:26:00.000-04:002006-05-30T11:45:43.640-04:00Fixing FlashGot for Mac cURL Use<a href="http://www.flashgot.net/">FlashGot</a> is a neat extension for Mozilla, Seamonkey, Firefox, etc. that gives you a lot of help downloading large numbers of links. I downloaded the FlashGot plugin for Seamonkey to make my allofmp3.com experience smoother, and was disappointed to find out that it does not support the Mac's built-in version of cURL as a download manager. Don't get me wrong, cURL is not a download manager - but all I really wanted was the whole list of mp3s that I purchased to download with one click instead of clicking on each one independently.<br /><br />So I fixed it. The "fix" is a bit of a hack, but it works now.<br /><br />Simply open up this file in your favorite text editor:<br /><span style="font-family:courier new;">/Applications/SeaMonkey.app/Contents/MacOS/components/flashgotService.js</span><br /><br />Note that flashgotService.js may also be in your Mozilla profile instead, but I chose to install it in my application instead.<br /><br />Find the line that says:<br /><span style="font-family:courier new;">var job="[ -x \"`which 'xterm'`\" ] &&amp; CURL_CMD='xterm -e curl' || CURL_CMD='curl'\n";</span><br /><br />and change it to:<br /><span style="font-family:courier new;">var job="CURL_CMD='curl'\n";</span><br /><br />The problem is that FlashGot was trying to open cURL in an X11 window, which isn't going to work on a Mac unless you have X11 running all of the time and also have the environment set up properly.<br /><br />You will not get any kind of feedback once you choose something to download. I check to see if something is still running by opening up a terminal window and typing:<br /><span style="font-family:courier new;">ps auxww | grep -i curl</span><br /><br />Which will dump out any curl processes currently running.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-114900394359538244?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-1142211489250130812006-03-12T19:57:00.000-05:002006-03-12T19:58:09.250-05:00Blogger Dashboard WidgetGoogle makes a new widget for Dashboard that lets you create a quick post right from the Dashboard on Mac X. I just needed to test it :) Says that it supports <span style=""><span style="font-weight: bold;">bold</span> and </span><span style=""><span style="font-style: italic;">italics.</span> Yup, seems to.</span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-114221148925013081?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-1128960684435667702005-10-10T11:13:00.000-04:002005-10-16T23:32:43.846-04:00pandora.com<a href="http://pandora.com/">Pandora.com</a> is a very cool idea. It lets you build your own radio station, using a TiVo-style thumbs-up, thumbs-down controller for each song. Where it differs from, say, <a href="http://last.fm/">last.fm</a>, is that it doesn't use other users or sales as the basis for similar music. Instead, they use a cadre of professional musicians who describe each song. It uses these descriptions to come up with a play list. It is fascinating and frustrating at the same time.<br /><br />Fascinating because:<br /><ul><li>It really does learn fast. Within 5-6 songs it starts to play stuff that doesn't offend your ears. By the time you get to number 8 it feels like it might be reading your mind, giving you stuff that you really like.<br /></li><li>It plays non-RIAA (independent) labels mixed in with the regular RIAA artists that you are accustomed to. This is great because you will hear stuff that you probably wouldn't hear unless you listen to college radio or actively seek out independent music on the internet.</li></ul><br />Frustrating because:<br /><ul><li>As with all things regarding intellectual property, there are ludicrous limits on what their licensing allows them to do. For instance, you can only rank songs as "thumbs-up", or "thumbs-down", but sometimes you have a song that doesn't really deserve the "thumbs-down" (which banishes it from your playlist forever), so you just want to skip it. You can only do this so many times per hour. Yes, really. What is worse, after you hit this limit, the "thumbs-down" button no longer skips the song! Apparently the record companies think that it is more advantageous for them if you are forced to listen to stuff you don't actually want to hear. Huh? Wouldn't they want me to move along and find a track that I love enough to run out and buy? Whatever, the music industry doesn't seem to be run by the smartest of people.<br /></li><li>They have a limited selection of music, it seems. I keep hearing the same songs again and again even though I haven't given them the "thumbs-up". This is distressing because I really don't dislike the songs but I'm going to have to thumbs-down them pretty soon so that they stop coming up! But won't that screw up their matching system? I guess I'll find out...<br /></li><li>My playlists ("radio stations") are starting to sound the same. I mean, this makes sense on one level: I'm training the thing to know what I like, so you'd expect some convergence. On another level, though, my "seeds" are very, very different. Still, I'm afraid that all I'll have on here after it's "tuned" is Smashing Pumpkins and the Pixies - albums that I already have. I went out and purchased or downloaded the other songs that I had given the ol' thumbs-up, so I don't really need them in heavy rotation either. Maybe if they had a "I've Bought It" checkbox that would put songs in a lighter rotation...<br /></li><li>They need a "clear rating" button. Sometimes you make a song thumbs-up and then later regret it. Right now I can't find a way to un-thumbs-up a song. Similarly, the same kind of thing could happen with thumbs-down - though it hasn't happened to me yet.</li></ul><br />Now if there were a way to get this into your car/walkman... it would be cool to have an iPod Shuffle-like device with only 4 buttons on it: play, thumbs-up, thumbs-down, and skip.<br /><br />So far, I've signed up for the 3 months for $12 deal. My wife and I are both hooked on it right now, but I could see the novelty wearing off. In fact, I think Abby might already be done with it.<br /><span style="font-weight: bold;"><br />update 11-Oct-2005:</span><br />Some more interesting observations:<br /><ul><li>You can get around the whole "you have skipped too many songs" issue by simply changing to another station. The counter is reset for the station that you go to, and by the time you have exceeded the limit for this new station, you can switch back to the original station and keep skipping. Lather. Rinse. Repeat.<li>Seeding an independent artist (non-RIAA) seems to provide entirely different behavior than seeding an RIAA artist. Could this be a difference in licensing? When I used the Pixies or the Raveonettes as my seed, I hardly ever heard another song by the Pixies or the Raveonettes. The same thing happened when we seeded with Shakira, Nelly, Tyrese, Elton John, and the Bee Gees for my wife - hardly any songs by the artist we seed with. Enter Mirah. I seed with Mirah (from the K Records label, which is independent) and I get a torrent of other Mirah songs. Well, maybe not a torrent, but approximately 1 out of every 6 songs. Interesting...</ul><br /><span style="font-weight: bold;"><br />update 16-Oct-2005:</span><br />Saving the Streams!<p>Yes, I've figured out how to save the streamed music! Turns out that the music is just regular old mp3s that are loaded onto your hard drive. On my Mac using Safari, the path is in /private/tmp, which is the standard temporary directory. Safari throws each downloaded song in there with a filename beginning with "WebKitPlugInStream". Some of these files are just small files containing song info, and others are much larger and contain the mp3. All you have to do is take the big files, make a copy of them, and add ".mp3" to the end. Ta-da! Now you have an mp3 file that you can open in iTunes, or whatever.<p>It seems like the Pandora player always queues one song ahead, so if you want to keep the currently playing song, just use the 2nd most recent big file. The most recent file will play next.<p>Obviously, this arrangement will be different if you are using Firefox, but I imagine it will be pretty much the same thing - only the file names and the location will be different. I wonder how long this will last before they get wise? Someone could easily write a GUI app that would do this automatically.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-112896068443566770?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-1122734842910060812005-07-30T10:47:00.000-04:002005-07-30T10:47:22.956-04:00Open up that firewallHere's a "trick" from a unix novice. There is probably a better way to do this, but...<br> <br> I have <a href="http://gift.sourceforge.net/">giFT</a> (<a href="http://gottsilla.net/">Poisoned</a> is a front-end to giFT, so this will also work with Poisoned) running on my Mac, and it opens several different ports to listen. I wanted to make sure I had all of the ports opened up on the firewall, so first I fired up the terminal and typed:<br> <br> <tt>netstat -an | grep LISTEN &gt; before.txt</tt><br> <br> This dumps a list of all the ports that are currently listening (waiting for a connection) to the file called "before".<br> <br> Now I start giFT: <br> <br> <tt>giftd -d</tt><br> <br> Next I repeat the command that I used above, to see what new ports giFT has opened:<br> <br> <tt>netstat -an | grep LISTEN &gt; after.txt</tt><br> <br> You can either open both of these files and compare them manually, or use the diff utility:<br> <br> <tt>diff before.txt after.txt</tt><br> <br> In my case (because I'm anal), I then went through and made sure that each of the ports was something that I actually wanted exposed to the internet - in this case there was one port (1213) that giFT uses for the GUI, so I chose to keep that closed. All of the others I opened up on the firewall.<br> <br> This will work with any application - I'm just using giFT as an example.<br> <br><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-112273484291006081?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-1122643213334754212005-07-29T09:20:00.000-04:002005-07-29T09:20:13.373-04:00Compiling Glitter on Mac OS X<a href="http://www.mews.org.uk/glitter/index.html">Glitter</a> is a usenet (newsgroups, NNTP, etc.) binary downloader. It seems to be just a front-end to <a href="http://yukidoke.org/%7Emako/projects/aub/">aub</a> and cron. I'm not really sure if it is what I am looking for.<br> <br> Anyway, it wouldn't initially compile on Mac OS X. Here is the error:<br> <br> <tt>nntp.c: In function `open_socket':<br> nntp.c:33: error: storage size of `servaddr' isn't known<br> nntp.c:60: error: invalid application of `sizeof' to an incomplete type<br> nntp.c:33: warning: unused variable `servaddr'<br> make[3]: *** [nntp.o] Error 1<br> make[2]: *** [all-recursive] Error 1<br> make[1]: *** [all-recursive] Error 1<br> make: *** [all-recursive-am] Error 2</tt><br> <br> And the very simple fix is to look in nntp.c for the line that says:<br> <br> <tt> #include &lt;arpa/inet.h&gt; </tt><br> <br> and add: <br> <br> <tt>#include &lt;tcpd.h&gt;</tt><br> <br> I found a <a href="http://www.lemurproject.org/phorum/read.php?11,840">similar hint here</a>.<br> <br> Incidentally, what I <b>am</b> looking for is a newsreader that will not choke too badly on the thousands of posts that typically make up a binary news group. Ideally, it would recognize the common naming conventions used on usenet and thread everything for me - not just the typical thread-by-subject view. I don't even care if it will do the downloads for me... that is what I have <a href="http://nget.sourceforge.net/">nget</a> for, and it is available through <a href="http://fink.sourceforge.net/">fink</a>.<br><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-112264321333475421?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-1117540641080886072005-05-31T07:25:00.000-04:002005-08-23T15:31:09.876-04:00Stock tip spam?So the nature of my spam has taken a turn as of late. It used to all sell something. That made it easy to find out who the culprit was and send their ISP a report. About 2 months ago, the nature of my spam started to gently drift over to being predominantly "stock tips". This got me wondering: are these tips worthy of following? Even if they are complete B.S., is the spammer going to generate enough volume that the stock might actually go up?<br /><br />So I looked into it. The first decent "tip" that I got was for CSYT. This was back in January, and the email claimed that the 6th and 7th had shown a huge increase with lots of volume. Sure enough, a quick check with your favorite stock quote tool will show a huge spike in price and volume on the 6th and 7th. The email came out on Sunday the 9th with a promise of big things Monday. Sure enough, big things happened on Monday. Trading volume was again more than 10x average, and the stock tanked. So much for my simple "pump-and-dump" theory. I would have expected the dump to come Monday, but maybe I'm just ignorant.<br /><br />Let's look at another. VCSC. This one was sent January 18. It promises a 3-fold increase in price over 5 days, and a 4-fold increase in 15 days. To the charts... There is clearly the "dump" volume on the 20th, but the price climb that occurred was weeks earlier. These guys are more sophisticated than I was giving them credit for.<br /><br />Clearly, they are "pumping" the stock through other means. Spam is just one of their outlets. My conclusion is that there is now way to "piggyback" on their pump-and-dump through the use of their spams.<br /><br />I'm going to have to look into this further.<br /><br /><br /><span style="font-weight: bold;">update 23-August-2005:</span><br />Here's an interesting article that sheds some light on what was going on - though I still don't understand why I was getting emails AFTER the dump had happened... <a href="http://www.junkfax.org/fax/profiles/wsp/wsp.htm">Anatomy of a stock fraud</a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-111754064108088607?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-1094435291004784492004-09-05T21:48:00.000-04:002005-03-03T22:04:58.653-05:00middle button in mozilla!As a result of the tinkering I did with building Mozilla, I got the middle mouse button support working in MacOS X. I found a bug that someone had entered in Bugzilla, and I patched Mozilla 1.7.2 and rebuilt it. In addition to having middle mouse button support, the speed seems improved to me. I think that is because I compiled it without any of the debug options, and the executable is only like 12MB, whereas it was 40MB before. Maybe I messed something up, but it seems to be working fine for me. <a href="http://stoneharbor.kicks-ass.org:8080/%7Ecathcart/mozilla-mac-1.7.3-plus-middle-mouse-button.dmg.gz">You can download Mozilla for Mac with middle mouse button support by clicking on this link.</a><br /><br />For those of you that don't know, the middle button in Mozilla lets you open a link in a new tab, and then clicking on a tab with the middle button will close the tab. VERY nice feature.<br /><br /><span style="font-weight: bold;">update 06-Sept-2004:</span><br />I found out that I didn't compile it with security features enabled. So, in addition to the <a href="http://www.mozilla.org/build/mac.html">instructions found here</a>, I added the following to my .mozconfig file:<br /><pre>ac_add_options --enable-crypto<br /></pre>I got that additional tidbit from <a href="http://www.mozilla.org/projects/security/pki/psm/buildpsm.html">this link</a>. The file linked in the original post is now correct and links to the version with security enabled.<br /><br /><span style="font-weight: bold;">update 07-Sept-2004:</span><br />Now I've really got something. I added a flag to the .mozconfig file that really speeds things up on my dual G5.<br /><br />Change this line:<br /><pre>mk_add_options MOZ_MAKE_FLAGS=-j4 # use parallel make<br /></pre>to this:<br /><pre>mk_add_options MOZ_MAKE_FLAGS=-j4 CFLAGS=-fast # use parallel make<br /></pre>If you never had that line (because you only have one processor), then just add this to the file:<br /><pre>mk_add_options CFLAGS=-fast<br /></pre>That line turns on the "-fast" flag in Apple's GCC compiler, and it makes Mozilla FLY. There is absolutely no delay doing anything, even switching between a browser and an email window. Instant. Very nice. Of course, this is all on a dual G5. I'm not posting the binary because it will probably only work on a G5 machine - but just leave me a comment if you want me to post the binary.<br /><br /><span style="font-weight: bold;">update 16-Sept-2004:</span><br />Whoops! Turns out that the reason my Mozilla was so much smaller than the official distribution is that it was only half baked! I didn't run the final command that puts everything together, so unless you happened to run the binary on my machine, it wouldn't work. There are security updates anyway, so I compiled a new version - 1.7.3 with the middle mouse button support for MacOS X 10.3. I corrected the above link to the binary.<br /><br />The command that I forgot to run is:<pre>make -C xpinstall/packager</pre>Which puts everything into the Mac app bundle. I got that info from <a href="http://www.mozilla.org/build/distribution.html">this mozilla page about building a distribution</a>. The app bundle ends up in "dist/mozilla/". Whatever, now the download is much larger!<br /><br /><br /><span style="font-weight: bold;">update 03-March-2005:</span><br />All of this is officially an academic exercise... the patch is now included in the Mozilla trunk! This means you will get middle mouse button support in Mozilla 1.8 Suite or FireFox 1.1.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-109443529100478449?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-1094249838663298982004-09-03T18:17:00.000-04:002004-09-03T18:17:18.663-04:00got my memoryWOW! What a difference. I thought this machine was fast before, but now <br />I'm just floored. I can't believe how much the extra gig of RAM helped. <br />Mozilla now does its thing much faster. Applications only bounce once or <br />twice. The amount of swapping to Virtual Memory is not even really <br />detectable - even while compiling Mozilla.<br /><br />I decided to compile Mozilla myself, since even in my machine's newly <br />hopped-up state Mozilla still is not a performer. What kind of fantastic <br />hardware must the developers be using??? Hard to believe that they don't <br />notice it's lackluster performance considering it's just a web browser <br />and email checker. Anyway, my hunch is that it will rocket once I <br />compile it for my G5 without any debug stuff turned on. I tried to <br />compile this morning prior to installing the RAM, but it brought the <br />machine to its knees... now with the RAM installed it is flying along <br />merrily.<br /><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-109424983866329898?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-1094172933631637332004-09-02T20:55:00.000-04:002004-09-02T20:55:33.630-04:00new computer <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> My nearly 6-year-old G3 Mac finally up and died. It was an old 350MHz, so I wasn't exactly sad to see it go, per se, but I was hoping to get another couple of months out of it. Anyway...<br> <br> Got me one of them new-fangled dual G5 PowerMacs... went with the low-end 1.8GHz, since that's the only one not priced into the stratosphere. Since my other Mac was dead, I couldn't do the normal transfer from one Mac to the other thing. Instead, I had to move the hard drive over. Unfortunately, the old Mac used the old EIDE connectors and the new Mac uses serial ATA. So I took out the optical drive, stuck the old hard drive in there, and then used Carbon Copy Cloner to make a clone of the old drive. Not only did that work, but I was then able to boot the new machine off of the cloned hard drive. Allah bless Macintoshes, man - all my settings, files, etc. just got ported over. The only two burps were that I had to point iTunes at my music directory and I had to show Quicken where the data file was.<br> <br> Anyway, this new machine is FAST. I love it. It really needs more memory though - it only shipped with 256MB, and you can feel it swapping out to disk constantly. No worries, some sweet Micron memory coming tomorrow from <a href="http://www.crucial.com/">crucial.com</a>. By the way, Crucial is the only place I buy memory. I work for a semiconductor company and I've been in a lot of RAM factories, and Micron (the parent company of Crucial) has the cleanest, nicest factories I've seen - and they are in Idaho of all places! To be fair, I haven't seen the inside of many Japanese factories, so they might also make nice RAM.<br> </body> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-109417293363163733?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-1092282964131192792004-08-11T23:56:00.000-04:002004-08-11T23:56:04.130-04:00mouse in the houseWell, now I've caught two mice in the apartment. The first was a long <br />time coming - it took us a month of mouse hunting, but he got caught <br />eating peanut butter in a good ol' fashioned spring trap. At least with <br />those traps there is no question what to do with the mouse - you can <br />really only throw it away.<br /><br />Tonight, however, a mouse wandered into one of our dreadful glue traps. <br />They are dreadful for both the catcher and the catchee. I don't know <br />that there is any humane thing to do with a glued rodent. You could just <br />throw it in the trash alive like the package says, or you can take the <br />"humane" route and lube the little guy up with vegetable oil to release <br />him from the glue. But the idea of a mouse starving slowly to death <br />doesn't appeal to my humanity, and I'm not running a catch-and-release <br />program here. So what else? You could whack the little dude with <br />something and hope that a quick end is met. Or - aha! - you could choose <br />the path less traveled: drowning. I read somewhere that drowning is <br />considered a suitable humane end for pest cats, so what is good enough <br />for Tom must be good enough with Jerry, right? Well, that's the path I <br />took with the little victim of the glue trap - a quick dunk in the toilet.<br /><br />I'd say he was not happy with my decision. He blew a bunch of bubbles, <br />kicked around. Then stopped after maybe 20 seconds. I thought it was <br />over. But alas, he had another little 10 second flame out before his <br />back got these weird bumps in it - first one, then two. I think it was <br />all over in about a minute. Poor little guy. I'll consider this whole <br />episode a success if I don't dream about it tonight.<br /><br />The lesson? Don't drown.<br /><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-109228296413119279?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-1091209761947357332004-07-30T13:49:00.000-04:002004-07-30T13:49:21.946-04:00fraud on ebay <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> I'm a pretty light eBay user. Recently I bid on something that seems to have attracted a lot of fraud. Beware of any emails you get from Yahoo accounts after bidding on an item on eBay. I got mails from the following accounts:<br> <ul> <li><a class="moz-txt-link-abbreviated" href="mailto:mss_sophie_44@yahoo.co.uk">mss_sophie_44@yahoo.co.uk</a> (mss sophie)</li> <li><a class="moz-txt-link-abbreviated" href="mailto:wtwdint@yahoo.com">wtwdint@yahoo.com</a> (wtwdint wtwdint)</li> <li><a class="moz-txt-link-abbreviated" href="mailto:muistisecolului@yahoo.com">muistisecolului@yahoo.com</a> (K A)</li> <li><a class="moz-txt-link-abbreviated" href="mailto:ebay_great_deals@yahoo.com">ebay_great_deals@yahoo.com</a> (paul rafael sandu)</li> <li><a class="moz-txt-link-abbreviated" href="mailto:radu_ivanel@yahoo.it">radu_ivanel@yahoo.it</a> (Radu Ivan)</li> <li><a class="moz-txt-link-abbreviated" href="mailto:michel_sell2000@yahoo.com">michel_sell2000@yahoo.com</a> (ionut voican)</li> </ul> All the above emails had obvious signs of fraud:<br> <ul> <li>A very low selling price (except for mss sophie)</li> <li>Offer of free shipping</li> <li>Insistence on the use of Western Union</li> </ul> In addition, the email from mss sophie was a pathetic attempt at a spoofed email from eBay. Aside from being a bad fake, it also had the Yahoo free email account advertisement at the bottom, so amazingly this fraudster is using Yahoo to mail OUT the solicitations!<br> <br> Anyway - be aware!<br> </body> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-109120976194735733?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-1090884380012734572004-07-26T19:21:00.000-04:002004-07-26T19:26:20.013-04:00stupid ipod logic boardWell, I'm just about to give up. I bought a dead iPod on eBay hoping to fix it up. Apparently I got a bum logic board, or main board, or motherboard, or whatever the proper term is. At first I thought it was just a bad firewire port, but I soldered on a new one and the thing is still flaky. Just to screw with me, it hooked up to my computer the first time I tried it - but it has since reverted to it's old behavior of resetting whenever I touch the wheel and refusing to see my computer. Oh well, back to eBay to find a logic board! <br /> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-109088438001273457?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com2tag:blogger.com,1999:blog-7735817.post-1090846122798897522004-07-26T08:48:00.000-04:002004-07-26T08:48:42.796-04:00more on flavored water <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> So far I've done two things:<br> <ul> <li>I mixed up some water with extract of anise.</li> <li>I found some Torani Sugar-Free Raspberry syrup at the local coffee shop and put a tablespoon of that in with about a gallon of water.</li> </ul> <br> Personally I kind of like the anise flavor. It's like licorice. My wife isn't so into it, so I know anise isn't for everyone. A tiny little bit goes a very long way. Before that batch was finished, I filled the container back up and mixed in some of the Torani. Just a tablespoon or so. Man, it really brought out the anise flavor! I mean, there was half as much anise in the water as before, but now the anise is much stronger. I'm going to finish this whole gallon before I try the Torani again. I want to taste the Torani without the anise flavor.<br> </body> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-109084612279889752?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-1090725918497841062004-07-24T23:25:00.000-04:002004-07-24T23:25:18.496-04:00robots? <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> So since I started this blog, I've noticed a lot of traffic on my site. Weird, since I usually only get family members.<br> <br> Most of them are asking for the "atom.xml" file, and then for some non-existent rss and typical blog files. These are clearly robots. Since we are not going out until midnight (for a showing of "Goonies", I shit you not), I started looking up who these people are. The <a href="http://www.robotstxt.org/wc/active/html/contact.html">Database of Web Robots</a> helped me find out.<br> <br> Anyway, I'm turning on the agent and referrer logs in Apache to better help me find out what is up.<br> <br> </body> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-109072591849784106?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0tag:blogger.com,1999:blog-7735817.post-1090718797278533222004-07-24T21:26:00.000-04:002004-07-24T21:26:37.276-04:00the quest for flavored water <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> So back when I started working full time in 1998, I somehow managed to put on over 40 pounds in about a year. It was amazing. I was a skinny kid, so it didn't really matter too much, except that now I was a 36 instead of a 32 so I had to buy all new clothes.<br> <br> I decided to sign up at the gym, and that knocked 10-15 lbs. off all by itself. At the time I reasoned that if I swam 3 times a week, I could eat all I wanted.<br> <br> Wrong. The weight stopped coming off. I must have been 205 lbs. for a year. I decided to give up the obvious junk. Switch to 100% whole wheat. Stop buying ice cream. My "Atkins light" approach then, over the course of the next two years, got me down to 200 lbs., which is pretty disappointing.<br> <br> Then something odd happened. We stopped buying juice and started buying (sugarless) flavored seltzer water. In addition, I stopped drinking regular soda and switched to diet soda and unsweetened tea. In a few short months, I dropped to 190 lbs.! Fantastic! All that orange juice was chocked full of 100% pure premium fresh squeezed Florida evil!<br> <br> One problem, though. I have acid reflux, and all that seltzer seems to be irritating my poor delicate esophagus. So, I figure if the flavored seltzer water was doing the trick, why not regular flavored water?<br> <br> Well, for one thing, it seems to be trendy. Trendy=expensive. So how hard can it be to make your own? I googled a little, and I found some leads. <a href="http://www.flavors2go.com/">flavors2go.com</a> has exactly what I'm looking for. Problem is, I'm having trouble finding anyone that has something good to say about them. Another suggestion I found was to use small amounts of <a href="http://www.torani.com/">Torani syrup</a>, which while sweetened, can be used in very small quantities. They also have a sugar-free version, which is what I think I'll try.<br> </body> <div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-109071879727853322?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com1tag:blogger.com,1999:blog-7735817.post-1090717721441944242004-07-24T21:08:00.000-04:002004-07-24T21:08:41.440-04:00why blog?Why not? Every once in a while I find that I need some information that <br />is not available from any other source. After hours of Googling, I <br />usually end up finding some of the information on some mailing list or <br />blog. When I find those hard-to-get-elsewhere pieces of info, I'll throw <br />them up here.<br /><br />But mainly I was looking at my cousin's blog, and I just started fooling <br />around with blogger.com. So here we are.<br /><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7735817-109071772144194424?l=stoneharbor.kicks-ass.org%3A8080%2F%7Ecathcart%2Fblog%2Fblogger.html'/></div>Rayhttp://www.blogger.com/profile/17895187679047774309noreply@blogger.com0