State legislature websites, compared

Having recently spent some time with OpenStates data, I noticed the state government websites varied … a lot. Wanting to quantify this variation, I used the SSL Labs scanner, Lighthouse, and some Ruby scripts to compare the 50 states, DC and Puerto Rico’s legislature’s websites.

The table below covers usability (is the hostname flexible), security (does it allow or require HTTPS), server configuration (SSL Labs) and performance (Google Lighthouse).

Lighthouse
state URL www .gov HTTPS Support HTTP Upgrade SSL Labs Perf AX Best Practices SEO
AKakleg.gov ✔️C56747369
ALlegislature.state.al.us 🚫 root15766075
ARarkleg.state.ar.us 🚫 root✔️B65948784
AZazleg.gov ✔️✔️A43907382
CAassembly.ca.gov ✔️✔️B31926080
CAsenate.ca.gov ✔️✔️B30688091
COleg.colorado.gov ✔️A29938090
CTcga.ct.gov ✔️✔️B22896792
DCdccouncil.us ✔️A64817377
DElegis.delaware.gov ✔️✔️B14856776
FLflsenate.gov ✔️✔️B44888791
FLmyfloridahouse.gov ✔️✔️B69827391
GAlegis.ga.gov 🚫 root✔️✔️A231008092
HIcapitol.hawaii.gov ✔️✔️B85567350
IAlegis.iowa.gov 🚫 root✔️✔️A+94718078
IDlegislature.idaho.gov ✔️✔️B27877369
ILilga.gov ✔️✔️C87615350
INiga.in.gov ✔️B96776775
KSkslegislature.org72786067
KYlegislature.ky.gov 🚫 www✔️✔️B38898068
LAhouse.louisiana.gov ✔️✔️B48738074
LAsenate.la.gov ✔️✔️B41858091
MAmalegislature.gov ✔️✔️F301007371
MDmgaleg.maryland.gov ✔️B60926088
MDmsa.maryland.gov ✔️✔️F41827377
MElegislature.maine.gov ✔️A76857389
MIhouse.mi.gov ✔️✔️B98946762
MIsenate.michigan.gov ✔️✔️C86978791
MNhouse.leg.state.mn.us 🚫 root✔️B32988090
MNsenate.mn ✔️A+91008779
MOhouse.mo.gov ✔️✔️B94619354
MOsenate.mo.gov ✔️✔️B10937384
MSlegislature.ms.gov ✔️❌❌B34658082
MTleg.mt.gov ✔️✔️B37916777
NCncleg.gov ✔️✔️B40936788
NDlegis.nd.gov ✔️✔️B651007364
NEnebraskalegislature.gov ✔️✔️B80998097
NHgencourt.state.nh.us F0846075
NJnjleg.state.nj.us ✔️A+89674775
NMnmlegis.gov ✔️✔️B87807383
NVleg.state.nv.us ✔️B581006791
NYnyassembly.gov ✔️✔️B57988799
NYnysenate.gov ✔️✔️A39806785
OHohiohouse.gov ✔️✔️B27987369
OHohiosenate.gov ✔️✔️B34616075
OKoksenate.gov ✔️✔️A7767383
OKokhouse.gov ✔️✔️B43907388
ORoregonlegislature.gov ✔️✔️B29977374
PAlegis.state.pa.us ✔️B82638074
PRtucamarapr.org14846067
PRsenado.pr.gov ✔️✔️B12736769
RIrilegislature.gov ✔️F58694742
SCscstatehouse.gov ✔️✔️B89827379
SDsdlegislature.gov ✔️✔️A69893100
TNcapitol.tn.gov ✔️✔️B641006782
TXhouse.texas.gov ✔️✔️B68976769
TXsenate.texas.gov ✔️✔️B52807377
UTle.utah.gov ✔️✔️A71988085
VAvirginiageneralassembly.gov 🚫 www✔️✔️B46876769
VTlegislature.vermont.gov 🚫 www✔️✔️B90947387
WAleg.wa.gov ✔️✔️B34897380
WIlegis.wisconsin.gov ✔️✔️B80958770
WVwvlegislature.gov ✔️B86847390
WYwyoleg.gov ✔️✔️B4928083

Notes

  • Three sites don’t support HTTPS: Alabama, Kansas and Puerto Rico’s lower house. Mississippi downgrades HTTPS request to HTTP.
  • Of the sites supporting HTTPS, Massachusetts, Maryland, New Hampshire and Rhode Island get an “F” grade. (Get it together, northeast!)
  • New York’s old state assembly site (assembly.state.ny.us) still works and doesn’t redirect you to nyassembly.gov.
  • The Michigan House uses house.mi.gov; house.michigan.gov redirects there (but doesn’t have a valid certificate).
  • The Michigan Senate uses the opposite: senate.michigan.gov. Going to senate.mi.gov redirects you there (and also lacks a valid certificate).
  • Alabama, Arkansas, Georgia, Iowa and Minnesota require you add a www prefix.
  • Kentucky, Virginia and Vermont don’t permit www prefixes.
  • The Minnesota state senate uses an .mn domain, which belongs to the country of Mongolia. Seems like a security risk.

Installing and updating Creative Suite 6

After upgrading from Mojave to Catalina and Big Sur, Adobe Creative Suite 6 Design Standard no longer worked (despite Illustrator and Photoshop being 64-bit apps).

Not wanting to spend $60/month for occasional use, running these under Mojave in a VM was my next-best option. After repeatedly running into an error using a VirtualBox setup script, I downloaded VMware Fusion 12 Player and tried to install it. The installer got stuck at the macOS Utilities screen, regardless of whether I dragged the Mohave installer app to Fusion or built an ISO.

Eventually I installed Mojave on an external hard drive and used Fusion’s “Install macOS from the Recovery partition” feature to create a working VM.

Once Mojave was up and running, installing Creative Suite from the DVD worked as expected.

After installation, I ran Adobe Application Manager to check for updates. The apps themselves (InDesign, Photoshop, Illustrator) updated successfully. However, several pieces of support software failed to update:

  • Adobe Bridge 5.0.2
  • Photoshop Camera Raw 9.1.1
  • Adobe Extension Manager 6.0.8
  • Adobe Digital Publishing Suite Tools 2015.5

The updater would get to the end of the process and error out.

Updating these four components manually was difficult.

Adobe Support was anti-helpful. @AdobeCare sent me to chat support, who told me (rather ungramatically) that since CS6 was discontinued, support wasn’t available. I didn’t need support, I just wanted the updater to work and for their website to have working links. They sent me to the Bridge updater page (the one I had already found, with its broken link). After I told them (via email) the link was no good, they doubled down on the idea the link was working:

We would like to inform you that the direct download link is working fine at our end. You need to to follow the “Right Click” steps which was attached with the last email for downloading the file on your computer from the link below:

Thanks, folks. I know how to click things, and I know when something is 404:

~  $ curl -I http://download.adobe.com/pub/adobe/bridge/mac/5.x/AdobeBridge_5.0.2_mul_AdobeUpdate.dmg
HTTP/1.1 404 Not Found
Server: Apache
Content-Type: text/html; charset=iso-8859-1
Content-Length: 0
Date: Mon, 01 Feb 2021 15:56:23 GMT
Connection: keep-alive

Since updates took a while before failing, I figured it was actually executing something and used fs_usage -f filesys -w | grep -i adobe to check. Sure enough, it was downloading a file … but deleting it on error, before I could save the downloaded installer file.

My next step was to figure out what was being dowloaded and download those files manually. Using tcpdump -A port 80 | grep -A 5 GET, I was able to grab the swupdl.adobe.com URLs the updater uses, and manually download:

Each dmg contained an installer that ran successfully.

Updating a ThinkPad z60t

I recently refurbished an old IBM ThinkPad z60t to make it usable and suitable for donation. This involved two areas of work:

  • Installing Linux
  • Upgrading the firmware

Upgrading the firmware

The ThinkPad has two different firmware upgrades:

  • BIOS
  • Embedded Controller

ThinkWiki’s list is pretty comprehensive, and pointed me to BIOS 1.24 and EC 1.18.

Because this machine is so old, it does not offer .iso files (to put on CD or USB drive) or Linux-compatible firmware. There are diskette versions (for putting on floppy disks) and non-diskette versions (run running manually).

The non-diskette .exe file cannot be extracted using The Unarchiver, unzip, or innoextract. It won’t run on Windows 10, and won’t run under DOS mode. (I tried installing FreeDOS on to a USB stick, too.)

Using Virtualbox and a Windows 10 VM, I installed AOMEI Partition Assistant and tried to create a Windows 7 to Go installation on a USB thumb drive. That got all the way to the end before erroring out.

At this point, I decided to pull the hard drive, install Windows on a new drive, and use Windows to update the firmware.

The BIOS updater runs on Windows 7 (despite not listing that as a compatible option), but the EC updater does not, and gives this error:

DeviceIoControl() returns 24 Please restart your operating system and execute the BIOS or Embedded Controller update utility again.

At this point, I had to find a sketchy Windows XP ISO, burn it to CD and install Windows again.

Once I had XP installed, the EC updater ran as expected and the update completed successfully.

Readers: if you know how to install the diskette version version onto a bootable USB drive, please share how in the comments.

Installing Linux

The z60t uses a Pentium M, which is a 32-bit processor. Most current versions of Linux (such as Ubuntu 20.10) only support 64-bit hardware. I chose Linux Mint 19.3 “Tricia” with Xfce, as it was the least resource-intensive.

After using Etcher put the installer on a USB thumb drive, I was able to easily install Linux Mint on the laptop.

After installation and rebooting, most things worked — except for Wifi. I spent an hour or so googling around and reading about rfkill and trying different commands:

  • sending enable to /proc/acpi/ibm/wan and /proc/acpi/ibm/bluetooth
  • adding blacklist ideapad_laptop to /etc/modprobe.d/blacklist.conf
  • adding option thinkpad_aacpi dbg_bluetoothemul=1 bluetooth state=1 to /etc/modprobe.d/thinkpad-acpi.conf
  • Turning bluetooth/WiFi off and on in the BIOS.

In the end, the solution was much simpler. There’s a hardware slider on the front of the machine, by the headphone ports. Sliding it enables the radios.

Cosmo’s power pancakes, metric edition

I’m a huge fan of Carla Lalli’s Music’s pancakes (aka Bin It to Win It Pancakes aka Cosmo’s Power Pancakes). We make them a bunch, and have fed them to appreciative family and friends.

Carla initially shared the recipe in a Bon Appetit video from April 2017. The recipe was approcumented by a sketchy recipe blogger and a revised version was printed in Where Cooking Begins.

There’s only one problem with this recipe: it calls for 1.5 cups of buttermilk, and buttermilk comes in quarts. Rather than have the buttermilk go to waste, we, of course … make more pancakes.

Unfortunately, the combination of legacy heirloom units and odd fractions leads to some weird quantities, like ⅓ x 2 ⅔ = ⁸⁄₉ = 0.88578 cups of coconut oil.

Being both Canadian and someone who is used to weight-based baking recipes, I knew there was a better way.

With the help of the King Arthur Ingredient weight chart and my handy scale, I converted the recipe to metric and multiplied by 2.66.

I present you with an easy way to use your scale and a whole quart of buttermilk to make a lot of pancakes. (They freeze well.)

IngredientUnofficialVideoMetricMultiplied outWhere Cooking BeginsMetricMultiplied out
Coconut oil0.33 cup0.25 cup79ml210 ml2 tbsp butter28g113g
Oats0.33 cup?30g80g0.33 cup30g80g
Buttermilk1.5 cups?354 ml945 ml 1.5 cups354 ml945 ml
AP Flour1 cup1 cup120g320g0.75 cup90g240g
WW Flour0.5 cups0.5 cups57g150g0.75 cup85g225g
Baking powder1.5 tsp1.5 tsp6g16g1 tsp4g11g
Baking soda0.5 tsp0.5 tsp3g8g1 tsp6g16g
Salt0.5 tsp?1g4g0.5 tsp1g4g
Sugar1 tbspLittle bit12g33g1 tbsp12g33g
Flax0.25 cup?35g93g2 tbsp17g47g
Chia0.25 cup?61g162g0.33 cup81g216g
Eggs2?525

Directions

Tools needed

  • Medium and large bowls
  • Scale
  • Whisk, spatula, scoop
  • Skillet or griddle
  • Microwave- or oven-safe measure to melt coconut oil

Prepare

  • Measure and melt the 210ml coconut oil
  • Heat a skillet on medium heat and grease with additional coconut oil

In a medium bowl

  • Soak the oats in buttermilk

In a large bowl

  • Combine the dry ingredients: mix all-purpose flour, whole wheat flour, baking powder, baking soda, salt, sugar, flax and chia

In the medium bowl

  • Add eggs and melted coconut oil (to buttermilk and oats)
  • Whisk together

Combine everything

  • Pour the wet ingredients in to the large bowl
  • Stir with spatula to combine

Cook

  • Cooking time is approximately 90 seconds per side, depending on the size of the pancake. Adjust your cooktop temperature if they’re cooking too slow or too fast.

Notes

  • Salt is based on Diamond Crystal kosher salt. If you’re using Morton’s kosher salt, double the amount of salt provided.
  • For additional background, see Carla’s recipe notes and the buttermilk pancake recipe she used as a starting point.

HOWTO fix ActiveRecord migration NoMethodError in Rails 5.2

Ruby on Rails 5.2 changed the method signature for ActiveRecord::Migrator.migrate().

The old signature was this:

def migrate(migrations_paths, target_version = nil, &block)

The new signature is this:

def migrate(target_version = nil, &block)

Suppose you had some Rails 5.1 code like so:

ActiveRecord::Migrator.migrate(
  ActiveRecord::Tasks::DatabaseTasks.migrations_paths,
  version,
)

If you ran it in Rails 5.2, you would get this error:

NoMethodError: undefined method `migrate' for ActiveRecord::Migrator:Class

In Rails 5.2, you would write:

ActiveRecord::MigrationContext.new( ActiveRecord::Tasks::DatabaseTasks.migrations_paths ).migrate( version )

HOWTO move WordPress from MyISAM to InnoDB

When importing an old WordPress database, it may have tables in MyISAM. You can convert them to InndoDB in MySQL like so:

ALTER TABLE wp_commentmeta ENGINE=InnoDB;
ALTER TABLE wp_comments ENGINE=InnoDB;
ALTER TABLE wp_links ENGINE=InnoDB;
ALTER TABLE wp_options ENGINE=InnoDB;
ALTER TABLE wp_postmeta ENGINE=InnoDB;
ALTER TABLE wp_posts ENGINE=InnoDB;
ALTER TABLE wp_term_relationships ENGINE=InnoDB;
ALTER TABLE wp_term_taxonomy ENGINE=InnoDB;
ALTER TABLE wp_termmeta ENGINE=InnoDB;
ALTER TABLE wp_terms ENGINE=InnoDB;
ALTER TABLE wp_usermeta ENGINE=InnoDB;
ALTER TABLE wp_users ENGINE=InnoDB;

If you run into errors like this:

ERROR 1067 (42000): Invalid default value for 'user_registered'

It’s because of the SQL mode. You need to remove NO_ZERO_DATE from the mode. First, see what SQL mode you have set:

select @@sql_mode \G
*************************** 1. row ***************************
@@sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION

Then, set it to everything except NO_ZERO_DATE. In my case, that is:

set SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';

This setting is temporary, and will go away as soon as you exit the MySQL client.

Now, re-run the ALTER TABLE statements above.

Journalism Resources

Education and Training

Publications

News Organizations

Professional Associations and Consortia

Press Freedom

Tools

Miscellaneous