Wednesday, July 6th, 2022

« Previous Day Next Day »

Auto manufacturer family tree: Who owns what?

Australian website breaks down who owns who when it comes to the car brands of the world. I knew a lot of them, but definitely didn't know all of it.

7/6/2022 6:20 am | | Tags: cars, business

Unshortening URLs in PHP

In an effort to expedite my posting of links from my phone, yesterday I added a function which expands shortened URLs in the blog, so I don't have to do that on my side. It took a little testing to get it to work right. I found examples online were incomplete, often written only for cases that definitely used shortened links and that did not handle when the link wasn't shortened, etc.

Sharing where I landed, in case it is useful to others.

function unshorten($url) {
    //Checks if the variable appears as a URL
    if (!filter_var($url, FILTER_VALIDATE_URL) === false) {
        //Fetch the headers of that URL, requires PHP 5+
        $headers = get_headers($url, true);
        //If the URL is being forwarded, it will have the 'location' set in the headers
        if (isset($headers['location'])) {
            //Overwrite the provided URL with the new destination
            $url = $headers['location'];
    return $url;
7/6/2022 6:33 am | | Tags: glowbug, php, programming

The Ten Commandments for Detective Fiction (1929): A Brief History and Update

7/6/2022 7:05 am | | Tags: writing, mystery

Live coverage of the grilling of Boris Johnson as he fights for his political life

7/6/2022 7:09 am | | Tags: united kingdom, uk politics

A top-level overview of a few Gen Z candidates running for congress

7/6/2022 7:28 am | | Tags: us politics, gen z, congress

Explaining the Zulu click sounds

To quote a redditor, "this is an insane amount of linguistics condensed into 3 minutes"

7/6/2022 7:32 am | | Tags: linguistics, language, africa

Surface Duo 2 + Smartwatch = Amazing

[Disclaimer: This post mentions D&D. I work for the makers of Dungeons and Dragons.]

Yesterday was a full week that I've had my Galaxy Watch 4 and I can conclusively say that the combination of a smartwatch and the Surface Duo 2 has been fantastic. They are something I heartily recommend to any power user for their phone.

I love my Surface Duo 2. I love having two screens and I love the overall form factor. Especially for things like reading and making notes, running D&D, or even for this blog, I can have social media on one screen and this blog's admin on the other. In all of these, the device excels.

I have also come to love the response from others when they first see it and watch as I pull it out and unfold it's two screens. My friend Scott, when I first used it in front of him asked, "What is this marvelous device?"

That said, I was frustrated by my Duo 2 because it's design hindered the quick-use needs I have for a phone. Jotting a note, reading a text, checking the time, etc. All of these are no longer a quick one-handed act of pulling out my phone and thumbing my password in, and then doing what I need. Now it required two hands. Add to that, that the phone's closed screen makes notifications much harder to get if you aren't using your device. If my wife texted me, I would often miss it during the day at work. None of these were enough to make me want to switch my phone, but they were annoyances.

Enter the Samsung Galaxy 4 smartwatch.

I had been planning to give smartwatches another go with Google's Pixel watch, slated to arrive sometime this year. But a few weeks ago had a deal of getting the Galaxy Watch 4 for less than $200. That seemed like a good deal, and some online research confirmed it. So I pulled the trigger.

I had tried using a smartwatch before, prior to the Surface Duo 2, I think it was 2014ish with a "normal" smartphone. I found the watch to be fun but unneccessary as I often had my phone out on the table or desk in front of me, or even more readily available as I frequently would simply be holding it in my hand whenever I was out and about.

But, with the Duo 2 and it's closed-book form factor, having a means to quickly access notifications and do most of the small things I found myself wanting to do - has been fantastic. Google's Wear OS has come a long way and provides so much extension to the phone's capabilities. When I first had a smartwatch, it just felt like a toy. Sure, I could see messages, etc. But the overall abilities of the early watch just weren't compelling. Now, in addition to solving my ease-of-access issues, it provides more capabilities and health monitoring things, etc.

So, if you're thinking of getting a Surface Duo 2, I encourage you to do so. Maybe you won't find the same issues I did, but if you do, I then encourage you to try adding a smartwatch. I don't think it has to be the Galaxy 4, but I am happy with mine.

7/6/2022 7:44 am | | Tags: android, surface duo 2, smart watch - Service takes articles and turns them into a podcast for you

Came across it on Reddit. I signed up but haven't tested it yet. Might be an interesting part of the content pipeline from my Wallabag into this service. We will see how it does.

It's in beta right now, so for July there's no limits on usage, but it will be a Freemium service starting in August it seems.

7/6/2022 7:48 am | | Tags: podcast, reading

Learning about Cork, the material, and the biggest producer of it in the world

7/6/2022 7:56 am | | Tags: sustainability, portugal

Switzerland has a new water battery, and it sent me down a rabbit hole

A 900 MW 'water battery' that cost Switzerland €2 billion and was under construction for 14 years, is now operational, Euronews reported. The battery is located nearly 2,000 feet (600 m) underground in the Swiss Alps.

On how a water battery works:

A water battery consists of two large pools of water located at different heights. When power production is high, excessive power is used to move water from the lower pool to the pool at a higher height, which is similar to charging a conventional battery.

When power demand increases, the water at the higher level can be released and, as it heads to the lower pool, it passes through turbines that generate electricity and can be used to power the grid.

The article makes mention that the US has been using them for a while. Here's an article on the DOE's website which talks about them. But I can't find any information where they are used in the US. The DOE also brings to light the technical term of "Pumped Storage Hydropower" or PSH. Here's info from another DOE page:

The first known use cases of PSH were found in Italy and Switzerland in the 1890s, and PSH was first used in the United States in 1930. Now, PSH facilities can be found all around the world! According to the 2021 edition of the Hydropower Market Report, PSH currently accounts for 93% of all utility-scale energy storage in the United States. America currently has 43 PSH plants and has the potential to add enough new PSH plants to more than double its current PSH capacity.

Armed with the new PSH terminology, I went back to Google and found this Wikipedia entry which lists global PSH power stations which provide over 1,000 MW in power. Unsurprisingly, the country with the most is China and a massive list of ones under construction currently. The biggest one in the US appears to be Raccoon Mountain Pumped-Storage Plant in Tennessee.

Finally, my rabbit hole finds what I am looking for. The DOE's Global Energy Storage Database. One thing I notice as I click around, which makes perfect sense now that I think about it, is that Hawaii has a lot of these. As a way to handle the issues of being a remote chain of islands, having these to help balance and manage power consumption needs makes a lot of sense.

7/6/2022 8:13 am | | Tags: hydropower, renewable energy

Axie Infinity was taken down by a fake job offer

Ronin, the Ethereum-linked sidechain that underpins play-to-earn game Axie Infinity, lost $540 million in crypto to an exploit in March. While the US government later tied the incident to North Korean hacking group Lazarus, full details of how the exploit was carried out have not been disclosed.

The Block can now reveal that a fake job ad was Ronin’s undoing.

According to two people with direct knowledge of the matter, who were granted anonymity due to the sensitive nature of the incident, a senior engineer at Axie Infinity was duped into applying for a job at a company that, in reality, did not exist.


The fake “offer” was delivered in the form of a PDF document, which the engineer downloaded — allowing spyware to infiltrate Ronin’s systems. From there, hackers were able to attack and take over four out of nine validators on the Ronin network — leaving them just one validator short of total control.

In a post-mortem blog post on the hack, published April 27, Sky Mavis said: “Employees are under constant advanced spear-phishing attacks on various social channels and one employee was compromised. This employee no longer works at Sky Mavis. The attacker managed to leverage that access to penetrate Sky Mavis IT infrastructure and gain access to the validator nodes.”

The hackers are reportedly out of North Korea. The article highlights this article which notes that they have used similar tactics with aerospace and defense contractors. It's hard to blame anyone for falling for these. This isn't a Nigerian prince emailing, this is a company that looks legit and puts you through many rounds of interviews, just to get you to download a PDF.

7/6/2022 8:19 am | | Tags: security, hacking, cryptocurrency

Morning Blog Coding

This morning I spent a little time tweaking the CSS on the site. It started just because I noticed a quirk with my embedded code blocks, if the line goes too long it breaks the layout. I'm still trying to figure out the fix for it. As I was working on it, I also realied I was not loving the font of the site - especially when it was used for code. So, I spent a little while tweaking it. Still not perfect, but better.

As part of this it has also become clear to me that I need to change how CSS is handled. Currently it's a template file, so updating it required publishing the entire site. That got annoying. So I finally took the first step toward section publishing, the idea that when I post an article, I don't need to rebuild the entire site.

For today, I just added the ability to define specific classes of templates I wanted to publish. So now I can specify if I want to just publish the frontpage, or the dates archives, or the individual posts, etc. Primarily this is useful for things like this morning, where I am focusing on modifying templates and want to just refresh what I'm working on - but it is a step towards the smart publishing I want.

7/6/2022 9:27 am | | Tags: glowbug, programming, php, css

Library of Congress' Digitized Federalist Papers

From the first of the Federalist papers, James Madison wrote the following. Emphasis is mine.

Among the most formidable of the obstacles which the new Constitution will have to encounter may readily be distinguished the obvious interest of a certain class of men in every State to resist all changes which may hazard a diminution of the power, emolument, and consequence of the offices they hold under the State establishments; and the perverted ambition of another class of men, who will either hope to aggrandize themselves by the confusions of their country, or will flatter themselves with fairer prospects of elevation from the subdivision of the empire into several partial confederacies than from its union under one government.

I came upon the above link after seeing a Tweet screengrabbed which talked about how Jefferson believed the Constitution should be written every twenty years, and the ensuing conversation. The part which the tweet was referring to comes from a letter Jefferson penned to Madison while he was in Paris, as the Constitution was being drafted. It's a bit dense, but I found it enlightening to read what his thoughts were:

What is true of every member of the society individually, is true of them all collectively, since the rights of the whole can be no more than the sum of the rights of the individuals. To keep our ideas clear when applying them to a multitude, let us suppose a whole generation of men to be born on the same day, to attain mature age on the same day, & to die on the same day, leaving a succeeding generation in the moment of attaining their mature age all together. Let the ripe age be supposed of 21. years, & their period of life 34. years more, that being the average term given by the bills of mortality to persons who have already attained 21. years of age. Each successive generation would, in this way, come on, and go off the stage at a fixed moment, as individuals do now. Then I say the earth belongs to each of these generations, during it’s course, fully, and in their own right. The 2d. generation receives it clear of the debts & incumbrances of the 1st. the 3d of the 2d. & so on. For if the 1st. could charge it with a debt, then the earth would belong to the dead & not the living generation. Then no generation can contract debts greater than may be paid during the course of it’s own existence. At 21. years of age they may bind themselves & their lands for 34. years to come: at 22. for 33: at 23. for 32. and at 54. for one year only; because these are the terms of life which remain to them at those respective epochs. But a material difference must be noted between the succession of an individual, & that of a whole generation. Individuals are parts only of a society, subject to the laws of the whole. These laws may appropriate the portion of land occupied by a decedent to his creditor rather than to any other, or to his child on condition he satisfies the creditor. But when a whole generation, that is, the whole society dies, as in the case we have supposed, and another generation or society succeeds, this forms a whole, and there is no superior who can give their territory to a third society, who may have lent money to their predecessors beyond their faculties of paying.

I really want to sit down and read the Federalist papers. Just need some time. Lots of time.

7/6/2022 10:55 am | | Tags: us history

Why It’s So Hard to Find a Veterinarian These Days

7/6/2022 6:29 pm | | Tags: medicine, veterinarian, animals, pets

Only Murders in the Building - Season 1 (2021)

My Rating: 4 out of 5 murders

I held off watching this, but have ended up bingeing it while my mother-in-law is here. Quite enjoyed the first season. Haven't jumped into season two yet.

7/6/2022 8:25 pm | | Tags: hulu, television, streaming, review
« Previous Day Next Day »