Surprise! CA Bar Doesn’t Takes Moral Character Applications Very Seriously

Surprise! CA Bar Doesn’t Takes Moral Character Applications Very Seriously

To be clear, I am being entirely sarcastic when I say “Surprise.”

I just received the Moral Character Questionnaire for a friend who is applying to take the California Bar Exam this summer.  By way of background, the Bar is required by statute to assess the moral fitness of Bar applicants.  They of course don’t want to admit any applicants that may further impugn the reputation of lawyers in California.

To that end, each applicant must submit an Application for Determination of Moral Character which costs a whopping $500.  The application asks the standard “have you ever been convicted of a felony” questions.  In addition each applicant is required to submit a handful of names of people who can attest to the applicant’s moral fitness.

Here comes the part where it becomes obvious that the Bar doesn’t put a whole lot of effort into this.  Below is a photo of the questionnaire I received along with the return envelope that was provided.


Note that the envelope requires postage.  Seriously?  Who has postage for snail mail anymore?  Beyond that, how many of these things does the Bar send out per applicant?  I can’t imagine that it exceeds ten.  Ten pre-paid envelopes would cost a whopping $5.00 or 1% of the application fee.  Given the lack of postage, I bet at least half of the people who receive these don’t even respond.

If that were not silly enough.  When I went to put the questionnaire into the provided envelope, I discovered another nugget of joy.  The damn questionnaire is too big for the provided envelope.


How many years have they been doing this?  Has the Bar not noticed the problem when they receive these envelopes returned back to them?  Maybe no questionnaires are ever returned, or maybe the Bar doesn’t read them.

The level of intellectual sophistication demonstrated by the Bar is mind blowing.  I sure hope they put more effort into their other endeavors.

World Sunlight Map with Real Cloud Data and Accurate Seasons

World Sunlight Map with Real Cloud Data and Accurate Seasons

earth For a long time I have used an image similar to this one as the background on my phone.  The image accurately represents the current cloud formations and sunlight regions on the planet.  I came up with the idea from the following page:  There is a good explanation on how to do this at, so I won’t repeat it here.

If you want to purchase an expensive wall hanging version of this map amazon will sell you one for $3000+, Boardroom Sunlight Map.  Although it seems to me that you could purchase a Flat Screen TV and a Raspberry Pi and save yourself $3000, but hey, that is just me.

For a few years, I have used a Tasker profile on my Android phone to download a copy of this image once an hour.  Tasker then updated the background on my phone.  I find the image to be both beautiful and at least marginally functional.  Plus I enjoy the nerdiness of it.

A few months back I switched to a Nexus 4 and discovered that the image available from was lower resolution that my phone.  This gave my the impetus to “roll my own” customized version.

I doing so I discovered the beautiful series of Blue Marble images that NASA has made available.  The The Blue Marble: Land Surface, Ocean Color and Sea Ice image was by far my favorite, but I noticed that NASA has since added monthly images that more accurately represent the snow pack and foliage for each month of the year.  Unfortunately, these images seem darker, and less vibrant than my favorite image.  Specifically, the greens and browns of the land masses looked very dull.  Additionally, the ocean was much more black and devoid of any character.

Luckily NASA aligns the images very precisely.  I first downloaded each monthly image and tweaked it in darktable.  I increased the exposure value to make them brighter, and increased the color saturation of the greens, browns and oranges.  The resulting images were much more vibrant.  Then to fix the ocean, I simply placed my favorite image into Gimp and overlayed the new images with a mask for the ocean over them.  The results were spectacular.

Then I simply added 12 different config files for xplanet and made 12 different cron jobs depending on the month.  Now I have my own custom World Sunlight Map with more accurate seasonal representation of the land mass.

A Temperature Controlled Whole House Fan with MisterHouse

A Temperature Controlled Whole House Fan with MisterHouse

MisterHouse Web Interface for a Temperature Controlled Whole House FanThe main feature of MisterHouse that sets it apart from other home automation systems is the ability to customize practically every aspect of the system.  The following example is a perfect demonstration of this.

I recently purchased a whole house fan, basically a giant fan that sucks hot air out from the highest point in my house. They are great if you live in a climate with cool nights.

The controls for my fan were very basic, an on/off switch and a two-speed setting.

With Misterhouse, I created an “auto” mode which will only turn on the fan if both the indoor temperature is above a defined threshold and the outdoor temperature is 5 degrees below the indoor temperature.

This is how I did it.

Starting Materials
– A Whole House Fan
– 2 IOLincs, (1 for on/off, 1 for fan speed)
– A MisterHouse enabled indoor temperature sensor (I used my Insteon Thermostat)
– A MisterHouse enabled outdoor temperature sensor (I used data from a neighbor’s weather station through weatherunderground)

I created the following items in my mht file:

GENERIC, house_fan, HVAC|WHF_Group
GENERIC, house_fan_temp, HVAC|WHF_Group
GENERIC, house_fan_setpoint, HVAC|WHF_Group
GENERIC, house_fan_ambient, HVAC|WHF_Group

I also had the following items already setup:

$upstairs_thermo_temp #the temperature upstairs
$w_temp #the outside temperature

First, I set the available states for my generic objects:

$house_fan->set_states('on', 'off', 'auto');
$house_fan_speed->set_states('high', 'low');
$house_fan_temp->set_states('cooler', 'warmer');

Then I tied my generic items to my Insteon Devices:

$house_fan->tie_event('$whf_main->set("on")', "on");
$house_fan->tie_event('$whf_main->set("off")', "off");
$house_fan_speed->tie_event('$whf_speed->set("on")', "high");
$house_fan_speed->tie_event('$whf_speed->set("off")', "low");

Then I tied my Generic temp item to my Generic setpoint item, and inserted some custom code:

sub house_fan_temp_change {
	my ($state) = @_;
	if ($state eq "warmer"){
		$house_fan_setpoint->set(int($house_fan_setpoint->state) + 1);
	} elsif ($state eq "cooler") {
		$house_fan_setpoint->set(int($house_fan_setpoint->state) - 1);

By doing this, I can have a nice cooler and warmer button in the web panel.

Finally, every minute I check to see if the device is in “auto” mode and whether or not it should turn on:

if ($New_Minute){ 
	if($house_fan->state eq 'auto') {
		if (int($upstairs_thermo_temp->state) > int($house_fan_setpoint->state) &&
		(int($upstairs_thermo_temp->state) - 5) > int($w_temp->state)) {
			if ($whf_main->state eq 'off') {
				::print_log("[] Auto: Turning on fan");
		} else {
			if ($whf_main->state eq 'on'){
				::print_log("[] Auto: Turning off fan");

The result, is a temperature controlled whole house fan.  The image above is a screen shot from my web interface.

Insteon RemoteLinc 2 Lacks the Heartbeat Feature?

Insteon RemoteLinc 2 Lacks the Heartbeat Feature?

A heartbeat is a simple broadcast packet sent at a predetermined interval.  The purpose of the packet is to announce to everyone that the device “is still alive.”

The Insteon RemoteLinc 2 is a battery powered insteon remote, that remains in a sleep state when it is not sending messages.  In this state the remote does not listen or respond to any packets sent to it.

As a battery operated device, the remotelinc will eventually need to be recharged, and it would be nice to know when a recharge is needed rather than finding out when the device doesn’t work.  The remotelinc has a command to query the battery level, but this query won’t work if the device is asleep.

This is where a heartbeat message would be nice.  It would automatically wake up the device at a periodic interval, allowing a battery level request to be sent to the device.

Best I can tell, the Remotelinc heartbeat function has been disabled or not included.  The following settings are supposed to control the hearbeat function:

Awake Interval Sets the amount of time the Remotelinc remains awake with no activity. This is editable
Sleep Interval Sets the amount of time the Remotelinc remains asleep, before waking up to send a heartbeat message. The device ACKs my changes, but the settings on the device don’t change.
Broadcast Number Sets the number of heartbeat messages that should be sent every time the sleep interval expires. The device ACKs my changes, but the settings on the device don’t change.
NoIAmAwake Bit A single bit to disable sending heart beat messages, presumably overrides all of the other settings. The device ACKs my changes, but the settings on the device don’t change.

Other users have reported similar problems over at the Indigo support forum.

As a work around, Misterhouse will send a battery level request immediately after receiving a message from the RemoteLinc.  The RemoteLinc will stay awake after sending a message for the amount of time specified in Awake Interval, I set mine to 10 seconds. Battery level requests will only be sent if the amount of time since the last battery level response has exceeded a defined threshold.

All of this works well, except for rarely used devices.  It is possible that such a remotelinc could die without there being a chance to query its battery level.

Insteon All-Link Control Flags

Insteon All-Link Control Flags

For whatever reason it is difficult to locate the breakdown of the Insteon All-Link Control Flags.

Link Control Flags:
Bit 7: 1 = Record is in use, 0 = Record is available
Bit 6: 1 = Controller (Master) of Device ID, 0 = Responder to (Slave of) Device ID
Bit 5: 1 = ACK Required, 0 = No ACK Required (currently always set to 1)
Bit 4: Reserved
Bit 3: Reserved
Bit 2: Reserved
Bit 1: 1 = Record has been used before (‘high-water’ mark)
Bit 0: Unused

PHP: Get date for nth occurrence of weekday

PHP: Get date for nth occurrence of weekday

I looked quickly and did not see any code out there to determine the nth occurrence of a specific day of the week in a month.  For example Thanksgiving is the 4th Thursday in November.  So I designed the following

$year = 2012; 
//Pick your year
$interval = 4; 
//Week number, in this case the 4th week
$dayofweek = 4; 
//Day of week 0=Sun, 1=Mon. . .
$month = 11; 
//Month 1=Jan, 2=Feb

$firstday = jddayofweek(gregoriantojd($month, 1, $year), 0);
if($firstday <= $dayofweek){
  $date = (($interval * 7)-6) + ($dayofweek - $firstday);
  $date = (($interval * 7)-1) + (6 - $firstday);
echo date("n/j/Y", mktime(0, 0, 0, $month, $date, $year));

It looks a little messy, but it works perfectly.



So apparently as bad as this looks it works too:

Read More Read More

Integrating Google Talk with Roundcube

Integrating Google Talk with Roundcube

Sorry I don’t have much time at the moment to write up a whole entry about this, but I am very excited about this.

I am a big fan of roundcube but I have always wanted the ability to integrate some instant messaging into it.  Well google finally released a gtalk gadget that allows you to integrate gtalk/gchat into any page you want.  Although, google has done a very poor job of announcing this and I don’t think most people know about it.

Anyways, it is a very simple single line <iframe> code.  I just quickly added it to the roundcube template and made a few changes to the CSS code and it works perfectly.

Click the image above to see a larger screen shot.  I will write up the code for this later when I have some free time.

How to Resurrect Procmail and Spamassassin on Dreamhost

How to Resurrect Procmail and Spamassassin on Dreamhost

Admittedly I have been very annoyed with Dreamhost since they announced that users would no longer be able to use procmail.

How to get procmail Back

After reading the most recent entry I realized that it is possible to still use both procmail and spamassassin.  However, this solution is not elegant.

Currently Dreamhost has a rudimentary Mail Filter system that is accessible by all mail users.  This system is due to be upgraded soon.  Dreamhost also allows regular shell users to access and run procmail as well as spamassassin.  In fact, shell users can install their own custom install of spamassassin.  Lastly, shell users can also receive email, although there is no imap or pop service for this mail.

Read More Read More

Bug in BlackBerry Repeat Rule, MONTH_OF_YEAR Deincrements 1 Month

Bug in BlackBerry Repeat Rule, MONTH_OF_YEAR Deincrements 1 Month

I have noticed a bug in javax.microedition.pim.RepeatRule, when I tried to set a an event to repeat every second sunday of may I would get an event that repeated every second sunday of april. I determined that this was being caused by MONTH_OF_YEAR being deincremented by 1 month after the event was committed.

I worked around the problem by setting the value one month forward. However obviously, this does not work for december. I tried increasing the value of the MONTH_OF_YEAR setting, however java balks at any unknown value. Currently I am unable to set an event to occur on the second sunday in december. If anyone figures out a work around I would be greatful.

RIM has recognized that this is a bug, but who knows when the bug will be fixed. I attached a copy of the email I received from RIM:

Read More Read More