Shallow Thoughts

Akkana's Musings on Open Source Computing and Technology, Science, and Nature.

Tue, 30 Mar 2021

Fetching Browser Cookies Programmatically

In my eternal quest for a decent RSS feed for top World/National news, I decided to try subscribing to the New York Times online. But when I went to try to add them to my RSS reader, I discovered it wasn't that easy: their login page sometimes gives a captcha, so you can't just set a username and password in the RSS reader.

A common technique for sites like this is to log in with a browser, then copy the browser's cookies into your news reading program. At least, I thought it was a common technique -- but when I tried a web search, examples were surprisingly hard to find.

None of the techniques to examine or save browser cookies were all that simple, so I ended up writing a browser_cookies.py Python script to extract cookies from chromium and firefox browsers.

Read more ...

Tags: , , , ,
[ 11:19 Mar 30, 2021    More programming | permalink to this entry | ]

Tue, 23 Mar 2021

Writing a Bill

I've been super busy this month. The New Mexico Legislature was in session, and in addition to other projects, I've had a chance to be involved in the process of writing a new bill and helping it move through the legislature. It's been interesting, educational, and sometimes frustrating.

The bill is SB304: Voting District Geographic Data. It's an "open data" bill: it mandates that election district boundary data for all voting districts, down to the county and municipal level, be publicly available at no charge on the Secretary of State's website.

Read more ...

Tags: , , , , ,
[ 13:28 Mar 23, 2021    More politics | permalink to this entry | ]

Tue, 16 Mar 2021

A Junco Goes "Umbrella Fishing"

One memorable sequence from Sir David Attenborough's stellar Life of Birds documentary is that of a black egret (or black heron -- I've seen both, but aside from color it looks remarkably like the North American snowy and reddish egrets), "umbrella fishing".

[grey-headed junco, 'umbrella fishing'] I never thought I'd have a chance to see that in person. But it turns out black herons aren't the only birds to do that. This winter, we saw a grey-headed junco doing essentially the same thing in our back yard!

This little junco performed its umbrella trick almost like the black heron from Life of Birds, though it didn't hide its head underneath. Still, it might some day: it was still perfecting its technique as we watched over the course of a couple of weeks.

Read more ...

Tags: , ,
[ 14:38 Mar 16, 2021    More nature/birds | permalink to this entry | ]

Thu, 21 Jan 2021

Track Bills in the 2021 New Mexico Legislative Session

This year's New Mexico Legislative Session started Tuesday. For the last few weeks I've been madly scrambling to make sure the bugs are out of some of the New Mexico Bill Tracker's new features: notably, it now lets you switch between the current session and past sessions, and I cleaned up the caching code that tries to guard against hitting the legislative website too often.

Read more ...

Tags: , , , ,
[ 17:50 Jan 21, 2021    More politics | permalink to this entry | ]

Tue, 05 Jan 2021

A Golden ... Redtail?

[Red-tailed hawk impersonating a golden eagle] We were flying R/C planes at the soccer field at Overlook on Sunday morning when somebody asked, "What's that bird doing there?" There was a big bird sitting in the middle of the field. It looked like some sort of raptor. I keep a monocular in my flying case (it's not the first interesting bird to show up at the flying field), so I pulled it out. The bird had its back to me, but hmm, big raptor, all dark brown except for golden feathers on the neck and a few light ones on the back ... "Hey, guys, I think that's an immature golden eagle!"

Read more ...

Tags: ,
[ 10:12 Jan 05, 2021    More nature/birds | permalink to this entry | ]

Sat, 19 Dec 2020

Android Studio Workarounds, and Command-Line Gradle Builds

I got a new phone. (Not something that happens often.)

Fun, right? Well, partly, but also something I'd been dreading. I had a feeling that my ancient RSS reader, FeedViewer, which I use daily to read all my news feeds, probably wouldn't work under a modern Android (I wrote it for KitKat and it was last updated under Marshmallow). And that was correct.

Read more ...

Tags: , ,
[ 17:49 Dec 19, 2020    More programming | permalink to this entry | ]

Tue, 08 Dec 2020

Petition for Better Los Alamos Broadband

Los Alamos (and White Rock) Alert!

Los Alamos and White Rock readers: please direct your attention to Andy Fraser's Better Los Alamos Broadband NOW petition.

One thing the petition doesn't mention is that LANL is bringing a second high speed trunk line through White Rock. I'm told that They don't actually need the extra bandwidth, but they want redundancy in case their main line goes out.

Meanwhile, their employees, and the rest of the town, are struggling with home internet speeds that aren't even close to the federal definition of broadband:

Read more ...

Tags: ,
[ 15:17 Dec 08, 2020    More politics | permalink to this entry | ]

Mon, 16 Nov 2020

Removed RSS 0.9.1 feed; Calendar Working Better

Fixing the Disqus comment system required regenerating the pages for old blog articles, to add the comment sections back. But doing that made me realize that the calendar wasn't right on a lot of pages.

This blog uses PyBlosxom, an excellent minimal blogging platform that is, unfortunately, no longer actively maintained. So I knew I couldn't count on anyone else fixing the calendar. I dug into the code and eventually found the problem, so I've regenerated all the blog pages and will be updating my PyBlosxom fork and sending a pull request upstream.

But while watching all those pages regenerate, I was struck by the three flavors of RSS generated for every page. It seemed excessive. I'm guessing that by now, anyone who's still using RSS (I certainly am!) can handle either Atom or RSS 2.0. So I've removed the RSS 0.9.1 feed. If you were using it, please update to the RSS 2.0 or Atom feed (see the links in the right sidebar).

If anyone was using RSS 0.9.1 and absolutely can't update to a newer format, drop me a line. If it turns out there was a good reason for supporting 0.9.1, I can put it back.

Tags:
[ 08:44 Nov 16, 2020    More blogging | permalink to this entry | ]