Skip to the links

Call Me Al

My MozBlog

I pump almost all of my email through SneakEmail so that I (1) get pre-labeling of my mail and (2) can find out when someone has sold or stolen my email address. Most of the world is scrupulous enough that (2) is rarely a problem. Only a handful of my email addresses have required replacement. And with Sneakemail's ability to filter per address by domain, my bugzilla accounts are restricted to the right sources.

I could live without the pre-labeling and just rely on my regular email's features. But part of the point of me using Sneakemail is that I am service agnostic. I can use Gmail, Hotmail, or Y!Mail interchangably.

So here's the problem: Sneakemail had a hardware failure so 99% of my email isn't arriving right now. Not that I'm giving up on Sneakemail, but does anyone know something comparable?

0 comments

Again many thanks to Mahesh. This time there is a perl script to pull colors from css files (html version). Here is the palette for pinball. Look how many shades of gray there are.

Here is the pallette of Firefox 2.0. Again, lots of shades of gray. I left the results case sensitive, but I'll be asking Mahesh for an option in the perl script to take care of that.

0 comments

Given a css file, parse through it and pull out all of the color tags. A distinct list, in the form of an html table, should show all of the colors.

.toolbarbutton-1:not([disabled="true"]):hover {
  border-top: 1px solid #FFFFFF;
  border-right: 1px solid #AAAAAA;
  border-bottom: 1px solid #999999;
  border-left: 1px solid #F5F5F5;
}

This will give me the color pallette for a CSS file so I can better evaluate what I'm up against when replacing them with overrides.

0 comments

One thing I love about the internet is that I can post a question on my blog and I will get an answer. Congratulations to Mahesh for coming up with the following solution.

I fed this script perl css_parser.pl > pb.txt and got the perfect output.

#!/usr/bin/perl

use strict;
use warnings;

use FileHandle;
use File::Find;
use Getopt::Long;

my $patt = "#[0-9A-Fa-f]{3,6}";  # Default pattern
my $ext = "css"; # Default extension

my $correct_usage = GetOptions ('patt=s' => \$patt,
                               'ext=s' => \$ext);

unless ($correct_usage) {
 print "USAGE: css_grep.pl --patt= --ext=\n";
 die;
}

find (sub { css_grep_file ($_, $patt) if (/\.$ext$/)}, ".");

# -----------
# Subroutines
# -----------
sub css_grep_file {
 my ($file, $patt) = @_;

 my $css_h = new FileHandle ($file);

 die "Could not open \'$file\' to read: $!" unless (defined ($css_h));
 my  $css = do { local $/; <$css_h> };
     $css =~ s/\/\*.*?\*\///msg;
     #
     # Remove @... directives
     #
     $css =~ s/^\s*@[^\n]*//msg;
     $css =~ s/^\s*$//msg;

 my @rules;

 while ($css =~ m/(.*?)(\{.*?\})/msg) {
   my $rule = {};

   ($rule->{'tags'}, $rule->{'properties'}) = ($1, $2);
   push (@rules, $rule) if ($rule->{'properties'} =~ m/$patt/i);
 }

 return unless (@rules);

 print "\n/* --- File: $File::Find::name --- */\n";

 foreach my $rule (@rules) {

   #
   # Remove properties
   #
   strip_unwanted_properties ($rule);


   print $rule->{'tags'} . "{\n"
         . join ("\n", grep { m/$patt/i }
                   split ("\n", $rule->{'properties'}))
         . "\n}\n";
 }
}

sub strip_unwanted_properties {
 my ($rule) = @_;

 my @goners = (
               'url\s*\(.*?\)',
               ' 1px',
               ' 2px',
               ' 3px',
               ' solid',
               ' groove',
               ' outset',
               ' dotted',
               ' bottom',
               ' top',
               ' repeat-x',
               ' repeat-y',
               ' no-repeat',
               ' 50%',
              );
 foreach my $goner (@goners) {
   $rule->{'properties'} =~ s/$goner//g;
 }
}

0 comments

Ok, so here's the situation: I have a stylesheet and want to pull out all of the lines that have a color code and the tags they apply to. Example:

.tabbrowser-strip {
  padding-bottom: 0px;
  background-color: #C8C8C8;
  background-image: url("chrome://browser/skin/pb-1px-hor-gray-line.gif");
  background-repeat: repeat-x;
  background-position: top left;
  border-bottom: 4px solid;
  -moz-border-bottom-colors: #535353 #A1A1A1 #BDBDBD #D9D9D9;
}

should come out as

.tabbrowser-strip {
  background-color: #C8C8C8;
  -moz-border-bottom-colors: #535353 #A1A1A1 #BDBDBD #D9D9D9;
}

It would be even better if I could feed in a directory at the top and have it just rip through the whole tree under it. I was pretty sure that grep was able to pull out C functions, but I can't find it in the man pages.

0 comments

Well, I installed Firefox 2.0 on my laptop since that's the computer I use least. The reason I picked that computer is that if anything went wrong, or if I didn't like it, it was not a horrible loss. The first thing I noticed was that the new theme is terrible. When I went from Firefox 1 to 1.5, I didn't mind the theme and gave up on maintaining Pinball for Firefox. However, the original artwork creator, Johannes Schellen, continued to maintain Modern Pinball for Firefox. Not only that, but he's kept it compatible with 1.5 and now 2.0. So when I installed Firefox 2 and didn't like the default theme, I knew where to go.

So what is the difference between the two themes? The most important change is that the colors are hardcoded in Modern Pinball. At the time I started using the theme the first time, I had a blue hue to my desktop instead of the default gray. If I do ever try it again, I'll try to keep it as a separate set of styles. That way the core can be maintained by Johannes.

0 comments

While spam email is crap, what's more dangerous are phishing attempts. These are the ones that look like legitimate emails and aren't likely to be filled with typos and other junk. While email tools often have a "flag as spam", they don't have a "flag as phishing".

I think phishing attacks should be tracked separately and sent to law enforcement. It would help shut down those websites that are hosting them.

We have Spamhaus, so why not Phishhaus?

0 comments

As seen on Slashdot OSU firefox crop circle

0 comments

It has been a long time since I've used K-Meleon, so I decided to give it a shot. I'm going to try it for a while, but here are my first impressions.

  • 1.01 is out, but you have to download 1.0 and then update it to 1.01.
  • It seems to let me hook into my "Netscape" bookmarks, but doesn't let me browse to my bookmarks.html
  • I'm a bit overwhelmed by preferences. Under the regular preferences, I have a Config option that shows me stuff like
    %ifplugin layers
    MButton = layers(OpenLink)
    %else
    MButton = ID_OPEN_LINK_IN_NEW_WINDOW
    %endif
    I also have access to Advanced Preferences. Bookmarks -> Options... takes me to Advanced Preferences, too.
  • Similar to IE, it looks like they threw as many icons on the toolbar as possible. But I can't find an obvious way to take any of them off. Ok, I finally found it under View Toolbars. But I still can't get rid of the Bookmarks, History, or Print buttons.
  • Along the lines of importing my "Netscape" profile, it would nice if some of my settings from prefs.js were picked up, like my proxy.
  • Some things are blissfully the same, such as JS Console and about:config
  • It set itself as the default file opener for html files :-( Maybe I wasn't paying enough attention during the install.
  • I can pop my user.js from Firefox into the K-Meleon folder, as well as my userContent.css :-)

So I'll give K-Meleon a try for a while. I'm sure I'll try out some of the themes and extensions.


5 minutes later...

  • Instead of using browser.startup.homepage it uses kmeleon.general.homePage
  • Changing themes requires a restart, but it doesn't tell you that.
  • My setting for browser.bookmarks.file was ignored
  • There seems to be both a profile directory and a settings directory, kmeleon.general.profileDir and kmeleon.general.settingsDir respectively
  • CTRL + L won't put the focus in my URL bar

Trying to use this is going to be harder than I thought.

0 comments

powered by blogger