Author: Lisa

School Considerations

What exactly are the teachers using to clean the classroom? Stuff like Lysol and Clorox wipes have been on the “back to school” list for years because the school doesn’t have budget for basic classroom supplies.
These kids sitting 6′ apart … where’s that extra space coming from? In our elementary school, the “play” and “group” areas could be removed (no shared toys or sitting on squares together anyway). But kids are going to walk between desks, so you really need 12′ separation to allow a walkway. There’s no way to get 20+ kids into a classroom. And what about upper grades where students move between classrooms? There some large group of new hires disinfecting each desk in the three minutes between classes? Because having the teacher speed clean the desks seems counter-productive.
How do we accommodate both the ‘school shooting safety measures’ like keeping the classroom doors closed and the ‘COVID19 safety measures’ like minimizing contact with high-touch surfaces? The obvious COVID-19 solution is to have all interior doors propped open during school hours and possibly assign an employee to open/close the dedicated ingress and egress doors.
Everyone gets two scheduled times for the bathroom? Or how exactly does that work? Same for recess — hey, it’s your ten minutes to jog around the building. Go!
I’m already being asked to drive the kid to school because they cannot figure out how to bus kids safely. With the ‘normal’ number of kids being dropped off and picked up, there was a queue of cars backed out to the road. How’s this drop-off/pick-up thing going to work with a lot more kids? And what about someone who has kids in more than one school?
A significant part of early childhood education is learning to socialize and interact with others. How much social learning is going to happen this year?
And the biggest question of all — what exactly does the school do when the first person tests positive? The entire class has to be in quarantine for a few weeks? What about kids who have siblings in that class — everyone in their class has to quarantine too? Seems like the first positive test and the whole school needs to be in quarantine.

Oracle – Select Top

I discovered the “rownum” trick early in my usage of Oracle databases — especially useful for sampling data to see what’s in there, something like “select * from dataTable where rownum < 6” gets you the first five records. But that’s not suitable if you want to sort the records. In this particular case, I have a series of names. I want to find the highest number value in the series so I can name my object with the next sequential name.

Enter “fetch first”  … this appears to be available since 12c (so older database installations may still require a more convoluted solution):

SELECT set_name from set_data
WHERE set_name LIKE 'Something-With-A-Series-%'
ORDER BY set_name DESC
fetch first 1 row only;

Which returns the last name in the series.

PHP Sub-Second Sleep

I needed to add a sleep to a PHP process, but I didn’t want to waste a whole second on each cycle. That’s usleep:

<?php
        date_default_timezone_set('America/New_York');

        $t = microtime(true);
        $micro = sprintf("%06d",($t - floor($t)) * 1000000);
        $d = new DateTime( date('Y-m-d H:i:s.'.$micro, $t) );

        print $d->format("Y-m-d H:i:s.u") . "\n";                                                                       
        usleep(100000);

        $t = microtime(true);
        $micro = sprintf("%06d",($t - floor($t)) * 1000000);
        $d = new DateTime( date('Y-m-d H:i:s.'.$micro, $t) );

        print $d->format("Y-m-d H:i:s.u")  . "\n";                                                                      
        sleep(1);
        $t = microtime(true);
        $micro = sprintf("%06d",($t - floor($t)) * 1000000);
        $d = new DateTime( date('Y-m-d H:i:s.'.$micro, $t) );

        print $d->format("Y-m-d H:i:s.u")  . "\n";                                                                      
?>

Run the script, and you’ll see sub-second sleeps.

[tempuser@564240601ac2 /]# php testSleep.php
2020-07-09 14:06:20.641449
2020-07-09 14:06:20.741952
2020-07-09 14:06:21.742347

Marketing Fail

I find it ironic that the Republican, who brought us marketing campaigns such as the “Death Tax” which would cause Paris Hilton to pay taxes on her hypothetical inheritance but didn’t mean jack to 80% of the country seems unable (or, more likely, unwilling) to effectively market pandemic response.
 
Social distancing is a horrible phrase that speaks to isolation. OK, you don’t congregate in one big lump of humanity at the beach or discotheque. Why isn’t figuring out innovative ways to interact a national pursuit? Physically distanced social interactions — either online or in person. A few decades ago, I had friends who would all get on a call to watch a movie or TV show together. Start writing letters again (help out the post office, too). Back in March, when the lock-downs started, I surprised a lady at the grocery store by helping her look for her parent’s preferred type of coffee as I stood on the checkout queue. She didn’t have to get near me, I didn’t have to get near her, but the “social distancing” campaign had her thinking “head down, don’t talk to anyone”. We’ve got patio chairs set up under the big maple tree in our front yard. Two families sitting 10′ apart can easily converse, hang out, enjoy nature, etc. Putting chairs on either side of the fire pit is about 8′ apart too.
 
Then there are the masks. Social trends have convinced people to wear all manner of wild kit. There’s no way it couldn’t have been presented as some awesome fashion trend. I’m curious if it’s *masks* or *orders* that the non-mask wearing public finds so objectionable. Like, would they be down with wearing a confederate flag mask? What about helmets — we can dress up like astronauts, scuba divers, motorcycle riders. I introduced my daughter to pandemic safety by calling it the zombie apocalypse. It’s fun to get the masks and gloves on to take the recycling down the the drop-off point where she stands guard in the car watching for zombies. Or get a superhero cape and mask, adopt a secret identity. Not something I recommend when it’s 95 degrees … but when it cools off again, pretend you’re a less murder-y version of the invisible man with the head wrapping and sun shades.
 
The Republican promotion of preventative actions reminds me of the court-ordered PSA commercials that tobacco companies air. They have technically said what the court has ordered them to say, but there has been no attempt to engage the audience. Or attract attention. White screen, black text, monotone voice-over repeating what the text says.

School’s Out For …

I want to know what schools are going to do in September/November after what they did in August proves to be foolishly optimistic (either ‘the virus will disappear’ or ‘one person will be able to ensure twenty six-year-old kids wear masks and stay 6 feet apart, plus we can have a janitor in each restroom sanitizing after each use’) and they’ve failed to use the intervening 4-5 months to develop a decent online teaching approach.

Ohio Public Health Warning Level

Ohio now has a per-county public health alert level rating that reminds me of the terror alert color-coded system we had after 9/11.

Of course there will be people in red or purple counties heading out to neighboring counties to shop/eat/socialize/party because those neighboring counties are only in orange so they don’t need to wear a mask there. I don’t get why I’ve got to get my car e-checked because my county borders Cuyahoga but we wouldn’t have to wear a mask for the same reason … but it’s a step in the right direction deeming masks mandatory *somewhere* based on *something*.

Oracle – Group By Having

I needed a query to find records where duplicate name values exist. I know how to group by and count, but the table has millions of records. I don’t want the 99% of the data where no duplication occurs. By using “having” in conjunction with “group by”, I am able to restrict the output to the groups that match my criterion.

select display_name, count(display_name) from circuit
group by display_name
having count(display_name) > 1;

My result set is the display name & occurrence count for that display name without all of the ‘good’ records where there’s a unique display name. (Yes, I know uniqueness could be enforced. The real scenario isn’t this straight-forward. There are times where the display name should be the same and I’ve got additional filters that drop out those cases).

 

Deodorant Recipe

I needed a recipe for deodorant that didn’t melt in the summer heat, so I added some beeswax to my normal recipe:

  • 2 oz beeswax
  • 6 oz coconut oil
  • 4 oz shea butter
  • 6 Tbsp baking soda
  • 8 Tbsp arrowroot powder

Melt the beeswax and oils, stir in baking soda and arrowroot powders. Pour into container and stir as mixture cools and thickens.

Apache HTTPD: SSL Virtual Hosts

For quite some time, you couldn’t bind multiple SSL web sites to a single IP:Port combination — this had to do with the mechanics of negotiating an SSL session — the client and server negotiated encryption based on a specific certificate before the server really knew what the client was trying to retrieve. The quick/easy solution was to just add a virtual IP to the box and bind each individual web site to a unique IP address. While this was quite effective in a corporate environment or purely internal network, it was a terrible solution for a set of home-hosted personal web servers — I don’t want to buy four public IP addresses to host four differently named websites. My workaround was to off-port sites no one else would be using (the MQTT WebSockets reverse proxy) and use a reverse proxy to map paths within the family website to the remaining web servers. This page, for instance, is rushworth.us/lisa … which the reverse proxy re-maps to https://lisa.rushworth.us behind the scenes.

With Apache HTTPD 2.2.12 or later built against OpenSSL v0.9.8g or later, you can use Server Name Indication (SNI) to serve multiple SSL websites from a single IP:Port just like you have been able to do with non-SSL sites. Using SNI, the client includes “what they’re looking for” in first message of the SSN negotiation process so the server knows which cert to serve.

In your httpd.conf, indicate that you want to use SNI on an IP:Port combo

# Listen for virtual host requests on all IP addresses
NameVirtualHost *:443

And, optionally, configure one of the named virtual hosts as the default for non-SNI browsers:

SSLStrictSNIVHostCheck off

Now the configuration for your SSL sites can include a ServerName directive. Restart Apache HTTPD, and you’ll be able to access the proper SSL-enabled website without adding virtual IP addresses.