January 10, 2007

Simple Referrer tracking

Just for fun, I've added some simple referrer tracking code to this site, and will be playing around with it for a while. The code is from Justinsomnia. Thanks for the code!

July 5, 2006

How to use Excel charts in LaTeX documents on Mac OSX

I use LaTeX to write most of my research-related papers. I really like LaTeX. I think it has a high learning curve, but it does give very nice results, makes formatting something you don't have to think about, and is great with references and citations. I love how you can easily re-organize your paper's structure, and LaTeX (with BiBTeX and friends) will always make sure that your section and figuring numbering will be correct.

What I don't really like about LaTeX is that it is very hard to set up, and doesn't integrate well with modern tools. Copy and paste for images is unthinkable in this model. The only real graphic format that is well supported is Encapsulated Postscript (.eps) files. You can argue that using pdf files for graphics works, if you use pdflatex, but that opens up a completely different can of worms. I like sticking with regular LaTeX. You can always convert a .dvi file to ps or pdf, you can use pdflatex with .eps files, but you can not go the other way around: you can't make a .dvi with a LaTeX file that includes .pdf files for graphics, at least in my experience.

I wish LaTeX would support better graphic formats, like SVG. I use Inkscape a lot on Linux, and like it. Since LaTeX does use EPS though, isn't it nice that under Mac OSX we can print anything to a PostScript file? Here is a description (sans photos, for now at least) of how I recently included some Excel charts in a LaTeX paper I'm writing.

Create a .ps file for the chart

In Excel, select the chart you want to include. Print it, and in the print options box click "Page Setup...". Under the "Page" tab, make sure that Orientation is set to "Portrait", then click over to the "Chart" tab. For "Printed chart size" select "Custom". Click "OK" to get back to the regular print options, and click on the PDF drop-down menu. Select "Save PDF as PostScript..." and save the file as a .ps file somewhere.

For reference, I based these directions on some information I found for windows users on the same topic.

Convert the .ps file to a .eps file

Now we have to convert the .ps file to an .eps file. While this is supposed to be a process you can do by hand, I've never had much luck doing it by hand. Instead, I suggest you use ghostview or The Gimp to convert to an .eps file. I have installed The Gimp on my Mac using fink, so that is the route that I took. Be sure to check "Encapsulated Postscript" in the Gimp when you save, and you might not want to have any offset at all. Also, you should crop the image to the correct size - The Gimp's auto-crop feature worked well for me.

Save the file with a .eps extension.

Add graphic to your LaTeX file

I use the graphicx package for graphics usually, and just include the resulting file. I usually have to reduce the size of the charts, but it all works really well.

I hope some people find this information useful. I know that I will in a few months when I ask myself "Now, how did I include that Excel chart in my last paper again?"

February 17, 2006

Ditching SpamAssassin, using GMail as a Spam Filter

So I run my own mailserver that serves http://FuguTabetai.com/, http://MangaTranslation.com/, http://SMUGeeks.com/, and http://JevansCeramics.com/. The problem is, even after adding some extra rules to SpamAssassin, it really hasn't done a great job catching the spam, and worse it takes up a lot of RAM and CPU time on my virtual private server. The VPS is from http://RimuHosting.com/, and is really great. Look them up if you are in the market.

Anyway, each email would take about 600 seconds to process. That is a long time, and worse it was really bogging down the other apps on the system, such as this blog, or the forum for MangaTranslation.com.

So what I've done is turn off SpamAssassin, and forwarded the email catch-all for each domain to my GMail account. That has been working very well. Since most of my spam goes to untargetted email addressess, or aliases that I send to the catch-all, GMail catches the spam, and I just have to check my GMail account once in a while to find stuff that got through. Also, I set up some filters on GMail to mark which domain the email came from.

I could take this a step farther, and have GMail forward email that makes it into the in-box back to one of my accounts here. If I did that though, I would need to add a rule to postfix to have it check the header, and deliver any GMail-forwarded mail locally. Right now that doesn't seem like much of a problem, so I'll skip that step.

Where in the world are the Evans kids?

My grandmother and mother have a problem. They don't know where us Evans kids are. We travel around a lot, and don't stay in one place for long. So I thought it would be a fun project to code up a PHP / MySQL web application that puts us on a Google Map. Of course, I want to make sure that if I'm going to go to all this trouble it will be a general system, so I did user sign-up and each user can have multiple maps.

I have not yet added access control, which is the biggest problem: once you are on the system, anyone can put you on their maps, and all of your maps are visible to everyone. Still, it works pretty well for what I want to do, and I don't think this is going to be a well-known thing so I'm not too worried about privacy concerns. I will try to put in some access control stuff though.

The code should be released under the GPLv2 once I get around to packaging it up. It is my first PHP coding project, so it is probably pretty ugly, but since I use Smarty (also my first time with that) and ADODB for database abstraction, I think it should be reasonable.

Check things out: Where in the world Are the Evans Kids?

February 14, 2006

Added simple comment spam protection

I've added simple comment spam protection to my bblog. Hopefully it will keep the spam bots from getting comments in that I need to moderate. I'll put installation instructions below.

read more (656 words)

February 5, 2006

Installing mt-daapd to server iTunes music from Fedora Core 4 linux box

So I have a collection of music that I like to play using Amarok on my Fedora Core 4 linux laptop, and since I recently picked up a 15" PowerBook, I thought it would be fun to install a daap server.

I decided on mt-daapd (over daapd, but I can't really say why.) There are Fedora Core 4 packages available, but I also wanted to include AAC along with MP3 streaming ability, and that requires mpeg4ip. I couldn't find a packaged version of mpeg4ip around, but I was able to download the tarball and install it without too much trouble. The one catch is that it required ffmpeg-devel, which was not in fedora-extras, but it was in the freshrpms repository, so once I installed that I was golden.

Installing mt-daapd was simple, just a question of downloading the RPMs and installing them. I edited the mt-daapd.conf and mt-daapd.playlist files, added and entry in mDNRResponder.conf to advertise the server via HOWL, and started everything up. Fired up iTunes on the PowerBook, and the music was there. Nice.

February 4, 2006

Adding rules to SpamAssassin and keeping them up-to-date automatically

So I've been getting a lot of spam lately, and decided to add more rules to SpamAssassin. I found two nice solutions for automatically (via cron or the like) download new rulesets. I've decided to go with Maxime Ritter's rule-get perl script, which is like apt-get in many ways. It stuck the script in /usr/local/sbin in case I lose it. :)

read more (380 words)

January 14, 2006

15" Aluminum PowerBook hard freezes

So I've had a 1.67 Ghz PowerPC 15" Aluminum PowerBook for about two months now, and am really enjoying it. I'll have some stuff to stay later about porting Java applications to Mac OSX and some problems I've had with that, but for the most part things have been working very well.

When I ordered my machine, I upgraded the RAM to 2 Gigabytes. That is really nice. The problem is that my machine will randomly (really randomly) hard freeze: the mouse won't move, and sound that was playing will loop for the length of the sound buffer, no movement at all on the screen, etc. The only thing that you can do is hold down the power button for about five second to force the machine to shut off. That is a real bummer. Worse, it seems to happen more when I'm doing work: programming large apps on Eclipse. I suspect that it has something to do with the memory, but I wasn't able to find any errors with the RAM running memtest and I tried many combinations of RAM sticks in different RAM slots. I was able to freeze things in any combination of RAM sticks (1 gig + stock 512mb, 2 gig, and even 1 gig alone) but I couldn't freeze it with just the 512mb stick. So something about the 1gig sticks is bad.

I took the machine down to the Apple store at the Willow Bend mall in Plano, but they were unable to find any problems. It looks like I might have to send the machine back to Apple to get this checked out. I'll have to think about when the best time to do that would be though.

February 13, 2004

LogTracker update

Updated LogTracker with a view of URIs that have been recently accessed.

January 1, 2004

GMAOServer overhaul

Added JNLP launching and a huge GUI overhaul to the GMAOServer - you can check it out on the software page.

Go to Page: 1  2  3