Tim Habersack

Where I put my things..

Downloading all html links of a certain extension from a web page

2 days ago

I had reason to download a bunch of PDFs from a website recently and didn't want to click 80+ links.

Here is how I approached it. On the page I opened up the console and ran:

var links =[]; Array.prototype.map. call(document.querySelectorAll("a[href$=\".pdf\"]"), function(e, i){if((links||[]).indexOf(e.href)==-1){ links.push( e.href);} }); console.log('"' + links.join('" "') + '"');

Note the .pdf in there, it was the file extension I was looking for. This gives me back a nice list of urls each in parenthesis. Then I just used wget to fetch them all.

wget "url1" "url2" ...

HT to this SO post that gave me the solution.

MHS - Module Handheld System

4 weeks ago

Design. It is not my strong suit, but I can tell when I do not like a design. I happened to be looking at old handheld things because of this post, and I was reminded of design ideals before the Jony Ive Age. Nothing against it, I can get why it appeals to people, but it doesn't appeal to me.

I like design that is more like this:

It feels more substantial and rugged in my hand. If I drop it, it won't instantly shatter. It feels durable. Modern smartphones and handheld gaming devices mostly feel fragile to me. A literal feeling, a response from holding a thing that is basically just a big screen.

I started thinking about designs I like, about user experiences I've found the most durable and 'good' feeling. (Again, totally subjective, but I think I am not alone in this sentiment)

This design really has stood the test of time:

It is rugged. You are using it in your hands and it feels solid. It has edges! You can touch parts and not smudge a screen. Also, it fits in this protective case that also lets you flip it around into a very robust device protection system.

Ok so I like that kind of design, how does that translate?

Into the header image!

Think a TI-86 calculator, but cut into pieces (modules). These modules snap together based on what you want to use, and you slide it into the sturdy case. When you're not using it, pull your stack of modules out, flip it around, and you've got a very well protected device.

I was thinking USB-C (or maybe just USB, or something else) is the bit that snaps them all together. There would also be kind of "click-in" spots on every module so when you push it together it clicks and keeps it connected pretty well. But then, putting the stack into the case gives it that very sturdy structure.

The amount of modules that could be designed for this are endless. A gamepad, touchpad, module that is just a bunch of easy access ports to make this a decent desktop, dedicated big battery module, a screen/cpu that has e-ink, etc.

This could even be a good design for a open-source phone.

The idea is, the screen / CPU module is the 'main' part of the device. You can have it on, and hot swap / change the modules you've got plugged into the stack. Have a break? Cool, pull out your device, swap in the gamepad and do some gaming.

I am not certain of all the technical hurdles, but I think is this doable with today's technology. I would use this every day.

I guess my question is, does this appeal to anyone else?

Our energy usage; 2018 to 2019

Jul 15th 2019

I have been mining the PG&E website account area for our energy usage. I thought it'd be a neat thing to see how much we use, where we could trim usage if need be.

  • Electricity: 1328 Kwh/year
  • Natural Gas: 576 therms/year

The US average is 4401 Kwh/year per person, and when you take into account we have a family of five in a hot area, our number is crazy good! Of course we have a 5Kwh solar setup on our house which goes a LONG way.

According to Carbonfund, our family produces 3.54 tons of CO2 a year. The US average is 25. Yay! I definitely still want to get us to a point where we are generating all our electricity and then using natural gas just for the stove. (It currently is for our water heater too, and our furnace). We'll need more panels, maybe a smidge of wind and an energy storage system, but it's possible.

Jul 11th 2019

The fun I found in video gaming has decreased steadily as graphics became more photo-realistic. Is it a generational thing, because I grew up in a time of sprites-based graphics?

< Part of Galaga
Jul 6th 2019

Current best score using glitch: 464610

< Part of Galaga
Jul 5th 2019

Current best score using glitch: 255910

< Part of Galaga
Jun 30th 2019

Current best score: 123640

< Part of Galaga
Jun 24th 2019

Tara is currently the high score holder in the house at ~120k. She's ruthless! Gotta get better. :)

Also pic of her at the arcade on our date. <3

< Part of Galaga
Jun 23rd 2019

Also yesterday we had some time for a quick date while my Mom watched the kids so we went and played a 10ft Galaga.

This Galaga stuff is getting serious you guys.

< Part of Galaga
Jun 23rd 2019

Current best score: 101620

< Older