Monday, November 13, 2006

How to filter out Spam on the Mac?

I have been using OSX Mail application since years now, I have been activating the Junk filter also since all that time, and, as much as I can recall, I have been happy with it... a long time ago. But these last years, as the spam got really out of hand, I ended up using up most of my email-reading time in email-deleting and email-searching. Piles of junk at the door every morning, every night. Piles and piles. I tried to define additional rules to kind of nail this terrible thing. With no real success. I understand a few reasons why spammers can still spam us: they spoof other people email addresses, they set many random words in the email bodies, and use images as spam contents. All this is very annoying.

Then I discovered, now a few days ago, SpamSieve for the Mac. This plugin takes the same training approach, where you are the one defining the good emails and the spam emails. It then builds a Corpus, which is a list of words, appended at each new email qualification, and associated with a probability for each word to be part of a spam email. Then this probability can be used to move automatically an email to a Spam folder - when greater than 75%. Between 50 and 75% you will have to choose and tell SpamSieve which is which. Everything that comes out with a probaility lower than 50% will remain in your mailbox or go to whichever folder your other Mail rules define.

That's the principle, roughly. What makes SpamSieve appealing to me is:
  • its simplicity to operate and make changes in configuration
  • its speed of execution
  • its apparent efficiency
I am running a 30-days trial version for the moment, but will definitely purchase a license if the program is as good as it already seems. Will keep you posted on this.

Tuesday, November 07, 2006

Note taking, information processing

We daily face lots and lots of information. What computers were supposed to manage for us in fact flood back to us perpetually as a virtual boomerang. The information flows non-stop. When at your desk, facing your mail program, news reader, internet browser, you're already filled with information. Stuff for which you need to take rapid decisions. From which you also generate action, like spreadsheets or emails.

We need tools to handle these heaps. So store, sort, make searchable. To create other actions. Just to keep up and still be productive. Be faster, as fast as the flows towards us. I have been looking for a long time for these, which would increase my productivity, and my overall performance in the work field.

Here is what I have found:

  • Microsoft OneNote on Windows is quite the best I could find overall. To create 1-click away notes and screen captures it's a great tool. The way you organize everything within that program makes things easy to look back in. Also the way all external documents (emails, files..) can be dropped to create explicit links. Dearly missing on Mac.... Commercial.
  • For the Mac I just discovered Yojimbo. Not as good as OneNote but usable, still. More on this later. Shareware.
  • QuickSilver on the Mac also. Dearly missing on Windows :-) Allows you to operate many tasks with a few keystrokes. From google searches to running programs or email people or (again) set new events in iCal. Freeware.
  • TypeIt4Me on the Mac: set text snippets (essentially used in emails for me, but could be anything else) through predefined key sequences. Takes away the load of repetitive typing. Shareware.

To make OSX look and feel consistent: UNO!

For those of us who ever "switched", we know that OSX is a great (if not the greatest) and sexiest OS around. There's a little caveat though: for some reasons the design of the interface windows has been taking multiple routes that sometimes make it a bit difficult to the eye. To remediate this problem, interacto.net came up with UNO. This freeware safely changes the look and feel of all applications, into a UNO style, that I personnaly like very much. Try it!

Friday, October 13, 2006

Apache - how to load balance across multiple hosts (using mod_rewrite)

Here is a nice way to load balance requests using Apache and mod_rewrite.

All it takes is a text file with the different targeted servers, and a "load balancer instance" getting the initial requests. This is a nice way to create sticky sessions to different load-balanced back-ends.

RewriteEngine on

RewriteLogLevel 3
RewriteLog /var/opt/logs/rewrite.log

RewriteMap servers rnd:/opt/apache/servers.txt
RewriteRule ^/(.*) https://${servers:mylist}/$1 [R,L]

with servers.txt:
mylist server1.mydomain.com|server2.mydomain.com|server3.mydomain.com

Sunday, August 20, 2006

NewsFire news reader

NewsFire a the best news reader for the mac. I have used both NetNewsWire for mac and the bloglines website, but now that I've tried NewsFire, I must tell that it's for me the easiest and most practical tool to remain on the top of the many news I collect.

Also if you purchase NewsFire this week end, you will get Inquisitor free! Yes, the author will send you a free license.

Wednesday, June 21, 2006

How to overwrite a php.ini setup

Often ISP's don't let people change a php.ini setup. Nevertheless, you can programatically change some of the setup.

This can be really useful, for instance to disable the display of some useless warning messages:

ini_set("display_errors","Off");
(... do some stuff here ...)
ini_restore('display_errors');

As you could see here, the error messages were then re-enabled.

Friday, May 12, 2006

Apache - Reverse Proxy to a backend server running https, warning message

If you ever set some https reverse proxy server to hit a backend through https as well, i.e. set something like (in Apache):

ProxyPass /abc https://abc.somewhere.com

You will likely get some browser warning complaining that the names don't match. To prevent this, simply request your backend SSL certificate with a subject alternative name = your proxy server SSL name, along with your backend common name (here abc.somewhere.com). Then users won't get warnings in their browser. 

Thursday, May 04, 2006

QuickSilver!

I wrote an earlier blog about LaunchBar and Butler, as the most necessary binaries there is on the Mac. I am rarely an early adopter of new tools  and usually the first experience is not very positive. You know, we already have it all, right? 

Well, I re-discovered QuickSilver a couple of days ago; I was prepared to a little learning curve, and decided to go through a couple of tutorials that night, to help get to the sugar cream layer directly. To sample the great stuff. I did, and I now I LOVE IT!

I love it so much that I simply decided to get rid (i.e. not launch automatically at login anymore) of LaunchBar (had been my sweet sweet friend since years) and my recent adoption (Butler). It's great! It's amazing!! More than anything I had encountered before. Was a paing to work on XP earlier, now it it HELL! 

QuickSilver probably is what can be best (or at least close) for human keyboard/screen ergonomy. It emcompasses keyboard shortcuts, spell guesses (not as good as LaunchBar I think, though), contextual menus, notepad interactions (great to have the possibility to type some text on the fly BEFORE picking the program that will use it, whether it's a calculator, a text editor, a browser, a mail program, etc etc). It also offers a shelf, persistent place where you can store all kinds of things (text strips, files, images....) and use them later. Also of course all the buffers are kept (could be hundreds).  Also it interfaces very well with iTunes, so any other binary which controls songs and volume were removed. I keep a simple DashBoard widget to keep the album covers visible, and rate the tunes on the fly.  Also QS allows to browse and play the tunes. 

Many plugins are already available, making this free engine a marvel. I'll likely get back on this at later time.  Without programming you can still create your own tools (macros?) to add functions and help in common tasks. 

Apple and the world of developers who adhered to this platform, makes the rest of them (the computers) gray, conform, boring, difficult. Elegance and simplicity, again. 

Playing tunes wirelessly all around the house?

YES! Incidently I discovered that iTunes can now play on my Airport at the same time as it blows from my G5!!! I can buy a couple of more Airports later on, hook them up with speakers, and PARTY!!!! Music everywhere! Hiya!!!

Reference here

Thursday, April 13, 2006

Butler on Mac OSX

At first I didn't really look into it. After all, having the excellent LaunchBar and SpotLight tools handy was making me really happy already. Butler seemed like just another goodie in my menu bar, one among the multitude of tools that try to complement each other, without really making your life that easy at all.

Then I started playing with Butler. First of all, yes, it's a great interface to configure, with a good help section too. The kind of quality we love, and it's even free...

So I played with it, making most of my setups (directories, applications, web bookmarks, even keystrokes macros for my Mail application) invisible from the Finder interface. And I defined some shortcuts to activate all these. Plus shortcuts to rate iTunes songs!

It worked so far very nicely! Sometimes I noticed some delay in the initial caching of Butler, but this will be likely tuned later. Butler is becoming my favorite tool to gain speed in my work. Does what an expensive QuickKeys does. Probably not the most sophisticated of its category but it's really, really great!

Apache 2.x Weblogic on HPUX

Sometimes, when Apache proxies to a WebLogic server, if the application has an issue and fails in releasing threads (typically you would see in the logs some threads struck and some "Out of Memory" errors), it can have a direct effect on Apache itself. Some child process will top CPU till restarted. Restarting Apache can solve the issue, WebLogic releasing its threads and becoming healthy again. 

A fine tuning of Apache and the way the processes and threads are configured is also necessary:  
- Apache KeepAlive On (to minimize the number of connections for the same client)
- Apache MaxClients and ThreatdPerChild  (one thread = 1 connection) 
- TCP parameter tcp_conn_request_max must be set 
- TCP parameter tcp_keep_alive_interval (not to have too many sockets in TIME_WAIT state)
- WebLogic managed servers can be allocated some threads with increment (example: start with 25, increment by 5 till 50) 

But again the root cause may likely be the WebLogic application itself. So looking into the WebLogic logs is necessary to get the whole picture.  

Monday, February 27, 2006

Voice recognition and dictation

I have started to use some recognition software on my Mac. In the hope to make the mac get dictation: emails, proposals, you name it. It's a little difficult to train the software to learn and recognize my speech. And the program is a bit buggy, it stopped responding a couple of time. Also it forces you to use SpeakPad (a little notepad) to do your dictations, before copying them in other programs. But these are still details if the software works. And in fact it does. I believe that perseverance will make the difference. My choice went for IBM Viavoice software, which was not too expensive. I do hope that it will allow me to SAVE TIME, altogether. If it doesn't there won't be any real use. Time will tell. 

Python and MySQL on MacOS X "Tiger"

Started developing in Python/MySQL on MacOS X "Tiger". From a web developer perspective it's a great change from PHP. Many Python features (besides its very clear formatting) are really appealing. Planning to start with some litle web development, then (hopefully, as time allows me) move towards some more serious business. MacPython (http://wiki.python.org/moin/MacPython) helped me greatly to deploy the necessary packages. And I could use the MySQLdb package very easliy. More to come on this. 

Wednesday, January 11, 2006

How to play a random tune in MacOSX?

Here is a little script to play a random tune in MACOSX. I have enjoyed it since years.

Set this script as an executable, and run it interactively (you will need to put a .command extension to run it from the Finder). I use it as an alarm for the morning. How cool is that.

You will need to configure ONLY the path to the directory where all your music files reside. I use Korn Shell (ksh) as a personal preference but this script should work w/o or w/ very slight alterations. Why do I use QuickTime at the end instead of iTunes? Because I wanted to play ONE file only.

To run it from the terminal window type: ./playRandom.command

Your comments are welcome. We can come up with a more sophisticated version.

#!/bin/ksh
# enter here the path to your music directory:
f='/Volumes/yourDisk/yourMusicDirectory'

# temp file:
l='/tmp/musicList.tmp'
if [[ ! -e $f ]]; then
echo Sorry, $f is not accessible.
exit 1
fi

r=$RANDOM
find $f -name *.mp3 > $l # list of mp3 from f root folder
t=`wc -l $l |awk '{print $1}'` # how many titles?
if [[ $t -eq 0 ]]; then
echo Sorry, no title found.
exit 0
fi

echo "Random = $r , nb titles = $t"
# takes modulo:
# remainer of division of random number by number of mp3 files
n=`bc << eof
($r % $t)+ 1
eof
`
echo "number is $n"
c="sed -n '${n},${n}p' $l"
# gets this line number modulo to play
title=`/bin/ksh -c "$c"`
echo "+++++ Playing $title +++++"
open -a "QuickTime Player.app" "$title" &
rm $l

How to push your best pictures online using iPhoto and Flickr in less than 15 minutes

So there you are, the cab just dropped you at the house and you're already connecting your digital camera to your computer to get a quick additional shot at these amazing memories. Of course you want to share them on the fly, too!

Preparation:
  • get a free account at flickr.com
  • get the little flickr plugin for iPhoto - I use FlickrExport by Connected Flow, free and working great
  • load your pictures in iPhoto

Now here is what you just need to do:
  • rotate the pictures
  • rate the pictures, give some 3 and 4 stars to the best ones
  • sort your album by rating, highest rate first.
  • select the highest rated pictures, export them to flickr, voila!



Just bear in mind that the upload to Flickr is limited to 20Mb/mo in the free version. Pro version is a must once you're addicted.

Have fun, and share!