Latest posts.

Script it

I had another IcyDock, firewire, external, drive enclosure fail again. So instead of throwing good money after bad, I instead acquired a NAS (network attached storage) device. Specifically, I got a Synology DS211J from Amazon with reward points on my credit card. Yes, I paid $0 for it and it’s the best money I never spent.

The NAS, which I named NASty, holds two SATA drives and has a host of RAID configurations available. I have two 2TB drives mirrored, split into three Volumes, with access controls, users, passwords, and a smorgasbord of applications, not the least of is a VPN server so I can access my files remotely when I’m away from home. On one Volume I moved all of my Music, and set iTunes to look on the remote drive for my music database. Which is good for sharing my music through the house, but was causing me some pain and mental anguish on my laptop when I forgot to first ‘mount’ the drive before opening iTunes.

When opening iTunes prematurely, as the case is, my podcasts would download to the local drive and I would have to clean it up manually to get it back onto the NAS and have it recognized in the iTunes program. Annoying. So, I thought to myself, I should script it so the NAS music share mounts first, then iTunes opens. So… I programmed an iTunes Launcher for my new setup.

-- iTunes Launcher
-- for use with a music database stored on a remote NAS

-- define our Function to check if an application is running
on appIsRunning(appName)
	tell application "System Events" to (name of processes) contains appName
end appIsRunning

-- check for the existence of our music share
try
	alias "/Volumes/music"
on error
	-- if the share doesn't exist mount it
	tell application "Finder"
		mount volume "music" on server "NASty" in AppleTalk zone¬
			"*" as user name "music-user" with password "pass-word"
		-- not my username nor my password… 
	end tell
end try

-- Test to see if our mount is really there.
tell application "Finder" 
	if not (exists POSIX file "/Volumes/music/itunes/.NAStyIsMounted") then
		display alert "NASty Music Share not Mounted!" as critical giving up after 90
		return
	end if
end tell

-- Is iTunes running 
if appIsRunning("iTunes") then
	-- if so, do nothing
else
	-- otherwise start iTunes
	launch application "iTunes"
end if

-- bring iTunes window to the foreground
tell application "iTunes"
	activate
	tell window 1
		if not visible then set visible to true
	end tell
end tell

So just a tiny little script that checks to see if the music share is mounted already. If not, I mount it. I then make sure it mounted, if I can’t see the hidden file on the share I go OLD SCHOOL and ABEND. Otherwise I continue and check to see if iTunes is running. If not, I start it. And to finish up, now that I know iTunes is running, I bring it to the front.

I saved the script as an application. I changed the icon from the default AppleScript icon to a custom icon. Then I dropped the Launcher program onto my dock. So now I not only have a graphical reminder on my dock, but I removed the iTunes icon so I can’t accidentally open just the program without mounting the share first.

Amazingly, it works like a charm.

Managing spam with google

If you use google to manage your personal domain email I have worked out a hack to have the best spam filter possible.  This article is all about unsolicited junk email and stopping it dead.

Why

I have an irrational need to make sure I get all my email.  So, if I’m e-vited to the latest social event in our neighborhood (wine tasting, happy hour, etc.) but they misspelled my user name, I still want to get the e-vitation. (If they misspell the domain name, sadly there’s not much I can do.) So, in google mail I set up a “catch all” which means that if google doesn’t find a valid user account to deliver the mail message to, it will drop the message into the designated “catch all” user account instead of bouncing it back to the sender as undeliverable.  That’s great for never missing an invitation to drink alcohol with friends, but that’s horrible for trying to manage spam messages.  Spammers no longer have to guess a valid user name, they can send it anywhere to my domain and it’ll wind up in my SPAM folder.  Which isn’t so bad, but I hate SPAM folders.

I hate SPAM folders because I feel the need to go through them to see if legitimate messages were placed in there on accident.  The thought of missing that wine-tasting e-vitation because it had one too many links in the message is personally disquieting.  When you get thousands of SPAM messages a week, searching for that one party invitation is very time consuming, tedious, and really annoying.  So I gave myself a goal, “Minimize the chances of missing an email while also minimizing the amount of spam that made it into the SPAM folder.”

Lofty goal, huh?  I know, I’m going to tackle hunger and world peace next week.

So, I own my own domain.  When you send a message to a user at wiredsage.com, it comes to my email account no matter what the user name was.  Minimizing missed messages isn’t quite that easy, because they can still get delivered, categorized as spam, and lost in the plethora of junk mail waiting to be deleted never to be seen by human eyes.  I had to figure out a way of killing spam before it got to the SPAM folder in google.

White-List, Are you Human, Black-List?

You might be thinking to yourself, what they need is a “white-list” or a list of people who would never send you spam and would always send you good email. With the proliferation of malware, lots of people who would have been on a “white-list” of mine have in the past sent me crap.  Plus, what about the person I don’t know?  The person that is sending me a legitimate job offer, the job offer of my dreams.  I want that email to come right to my Inbox without delay.  So not only is this not a great solution, it’s not offered by google.

I’ve seen some hosting companies send an auto-reply message to the sender, ask them to visit a website, and complete a captcha (validating that you are human), before allowing the email message to be delivered.  That stops spam pretty much in it’s tracks.  It can be defeated though.  I’ve seen spammers use third world data entry workers to complete captchas in other situations before.   And could you imagine a recruiter sending out a bulk email message, about the best tech job ever to be published to a list of highly qualified potential applicants, going through all that crap to deliver one email to one potential employee.  Opportunity only knocks once.  This is not only overkill, it’s also not offered by google.

What I really needed was a “black list”.  A filter that said, if the email meets this criteria, return it to sender as undeliverable.  Ideally, I would be able to use regular expressions on any email field, header, or the body of the message.  I would be able to count how many links were in the email, I would be able to compare the senders to my contact list, I could count the number or recipients were in the message, to create a robust set of rules which would allow me to decide, “this message was too spammy to accept”.  Now note that I want to bounce the messages and return them to sender with an error for the one in a million emails that weren’t spam.  Well, guess what?  Google doesn’t offer this either.

What to do?

I wondered if I could do anything, so I investigated.  In computer lingo I hacked.  I was looking for a way to use the existing infrastructure provided by google in a non-intended way to get my desired result.  So I hacked… and hacked… and hacked…

I found that if you disable an account, the email is then bounced back to the sender as undeliverable.  I also found that you could apply aliases to a user account.  So I made a user called junkmail-01 and gave it a name of “junkmail filter”.  I then opened up my SPAM folder and looked at all the TO: fields to get the email addresses that were being spammed.  I took those usernames out of the SPAM folder and made them aliases to junkmail-01.  I then tried to send email to those email addresses.  Bounced mail.  I had found my black-list.

How it works

Now when I go to a site shopping, like geeks.com, and they want my email address I give them geeks.com@wiredsage.com.  Then if they sell or lose my email address and I start getting emails for “natural male enhancement” I just have to add “geeks.com” as an alias to my junkmail-01 user and I will get no more mail from them ever again.  Well, they betrayed my trust, they don’t deserve to communicate with me.  If I absolutely still need to get email from them, I update the username they have on file to something like “geeks.com-2@wiredsage.com” and then I know how many times they lost my email address and whether I want to trust them with my credit card information in the future.

Junkmail-01?

You might be wondering, why junkmail-01?  Why not just junkmail?  Well, google only allows you to add 20 or so aliases to a user account.  I’ve gone beyond 20 blacklisted email addresses.  So, you just add another user, junkmail-02, disable the account, and start adding more aliases.

The Result

This is very effective because I’m filtering on the destination address, not the source address.  So no matter what bot network is sending the spam, or what domain the spam originates from, if it’s destined for the blacklisted account, it gets bounced.  Every once in a very long while I get a spam message in my SPAM folder in my catch-all account.  I then have to login to the domain management portion of google mail and add an alias to the highest numbered junkmail account.  To stop it from happening again.  I see it as an effective strategy for managing spam with the existing tools google provides.

Closing Thoughts

I think this is a sweet hack.  But it is just that, a hack.  I would love for google to come out with a regular expression based rule filter for their email.

Evan Longoria is a big fat liar.

KY3-TV reported:

The video appears to be part of a viral ad campaign by […], whose signage can be seen in the distant background.  Longoria told the St. Petersburg Times that it was real and it occured after a […] commercial shoot.

Well, it’s clearly a clever advertising campaign by a shaving company — they’re not getting free advertising here.  And there are many things wrong with the video.  I read elsewhere it was shot in a few minutes.  It was also edited in the same amount of time.  But I will be fair, the IDEA of the video captivated me, and I wanted to believe it.  But many things were blatantly wrong with it.

  • What news syndicate doesn’t have their call letters on the banner at the bottom of the video let alone their brand on the microphone?
  • Why were all the stands empty?
  • Was that a minor league park?

Now I did share this with my friends when I saw it.  I rationalized the above as, “Batting practice at spring training.”  No call letters on the banner because a video guy at whatever-station leaked it because it wasn’t going to be shown otherwise.  I missed the plain mic.

But after a good friend of mine pointed out it was faked (but still cool) I had to do some further digging.

  • Fake advertising banners all over the background of the stadium.
  • If you freeze frame it, the batter swings, the ball is hit, you see it go off straight (just one small line on one frame), then the CGI ball comes at the reporter.
  • If you freeze frame it at the end when he throws the ball back onto the field, the batter is ready for the next pitch, and the pitcher is looking at the batter.

So, it is obviously faked.  Which is fine.  Very cool advertising idea, except for the fact that they lied about it when the truth came to light.  If they fessed up to it, I would have said, “Way cool. I need to buy me some of [that brand of shaving shit].”  But because they lied about it, I’m instead saying, “We’re not stupid. But you’re treating me like I am. I don’t want to buy your [brand of shaving shit] and I probably never will again because I don’t do business with liars — mostly because liars are usually cheats also.”

So, one little lie turns a “Way cool” fake viral video into a “You and your products suck!” feeling from a guy who should be shaving now.

Neutrogena actually makes the best shaving gel ever.  You should go out and try it.

Candy Hearts Bingo

I put together this game way back in 2007 for my daughter’s Valentine’s Day party. If you are a teacher or student, please feel free to use this in your class. I think it’s a fun, free, holiday children’s game that can liven up any school party.

You can download one convenient file, which includes the rules, all of the calling tiles and 30 playing cards. You can also download a pack of 30 additional playing cards if needed.

Game Contents

In the PDF package there are 30 randomly generated color game cards, 10 sheets of color calling tiles, and 2 sheets of monochrome calling tiles. Print the number of game card pages you need and the type of calling tiles you’ll use. There are different variations of game play all explained below.

Game Play

Variation #1 – Simple Rules

In this variation, you only need to print out the number of cards you need and the last two pages of the PDF file with the monochrome heart calling tiles. Cut the calling tiles out. Place the calling tiles in a hat or other container. Mix the calling tiles up. Distribute the cards to the players. Everyone gets to mark the center square because it’s a free spot. Pull a calling tile out of the hat. Read the saying out loud, for example “Red Hot” or “Love me” or “Wow!”. Players will mark their cards if they have a heart of ANY COLOR in ANY COLUMN with that saying. Play continues until the first player gets five in a row across, down, or diagonally across their playing card. That player will call out “Candy Hearts!” and is the winner.

Variation #2 – Color Rules

In this variation, you only need to print out the number of cards you need and the nine pages of color heart calling tiles. Cut the calling tiles out. Place the calling tiles in a hat or other container. Mix the calling tiles up. Distribute the cards to the players. Everyone gets to mark the center square because it’s a free spot. Pull a calling tile out of the hat. Read the color of the heart and the saying out loud, for example “Purple, Red Hot” or “Yellow, Love me” or “White, Wow!”. Players will mark their cards if they have a heart of that color and phrase in ANY COLUMN upon their playing card. Play continues until the first player gets five in a row across, down, or diagonally across their playing card. That player will call out “Candy Hearts!” and is the winner.

Variation #3 – Auditorium rules

In this variation, you will need to print out the number of cards you need, the nine pages of color heart calling tiles and the last page of HEART tiles. Place the calling tiles in a hat or other container. Place the HEART tiles in another hat or other container. Mix both sets of tiles up. Distribute the cards to the players. Everyone gets to mark the center square because it’s a free spot. Pull a calling tile out of each hat. Read the letter of the column heart and the color of the second heart and the title out loud, for example “H, Purple, Red Hot” or “E, Yellow, Love me” or “T, White, Wow!”. Players will mark their cards if they have a heart of that color and phrase in the particular column upon their playing card. Play continues until the first player gets five in a row across, down, or diagonally across their playing card. That player will call out “Candy Hearts!” and is the winner.

Note:

In all variations of play, the game cards were created randomly, and do not have two of the same sayings on a card. Variation #1 has 63 different saying. This will produce a “Candy Hearts!” winner relatively quickly. Variation #2 has 63 different sayings, in six different colors, for a total of 378 combinations. Variation #3 has 63 different sayings, in six different colors, which can occur in one of five columns, for a total of 1890 combinations. This is best suited for large groups and will need many more randomly generated cards to avoid multiple simultaneous winners.

Feel free to mix and match to your liking.

Happy Valentine’s Day!

MacBook Meltdown

I sit at an “L” shaped desk in my home office; to my left is my personal mac book pro, in front of me is my work PC. I was working feverishly this afternoon when I smelled something burning. Specifically, I smelled plastic burning. I jumped up from my desk panicked that my house was on fire.

I dashed out of my office headed for the closest of two fire extinguishers we keep in the house when I realized with a shock that I no longer smelled the burning plastic out in the hallway. Relieved that it wasn’t the pre-wired Christmas tree melting downstairs I bolted back into my office, feared an electrical fire, and frantically worried over what action I could take if it were the wiring in the walls.

I entered my office and sniffed the air in front of me like a bloodhound. It came from my desk. Then I saw wafts of faint grey smoke which rose over the back of my MacBook Pro. I moved all the wires away from my computer. I quickly disconnected the power cord, Firewire 800, and USB wires that were plugged into the device; fearing a short circuit I inspected each wire.  The wires were fine, not warm at all and still a smell like burning nylon persisted. I picked up the computer and sniffed it. Immediately I knew something inside my MacBook Pro had melted.

I opened a window, turned on the overhead fan, and aired out the room. The smell dissipated quickly. I realized I felt a little light headed; that too quickly passed.  With the power cord unplugged, the laptop only running on battery power, everything seemed fine.  I immediately started a backup of my data.  I’ve heard horror stories about Apple support replacing whole devices and not restoring data — that wasn’t going to happen to me.  I then looked for the support number and called Apple Care.

My Apple Care phone experience was extremely pleasant. My computer is under warranty and they scheduled an appointment for me to meet a technician at the local Apple Store in town. While I was on hold, on a whim, I plugged the power cord back into my computer.  I immediately smelled the burning plastic again, and unplugged it promptly.

So, some time in the not too distant future an Apple technician will crack open my laptop and either see a stray bit of plastic that got too close to something hot, or identify a faulty part and replace it.  Either way, I think my next Apple purchase will be Apple Care for my MacBook Pro.