QZ qz thoughts
a blog from Eli the Bearded
Tag search results for blog Page 3 of 20

Tiny Media, revisited


A few weeks ago I posted about getting a tiny cassette tape and commented that I needed a microdrive to complete the collection.

Four pieces of tiny media with a dime and Lego brick for scale

Clockwise from top: a 36 exposure film cartridge for a Minox camera (takes 8 × 11 mm pictures on 9.2mm wide film); a US dime and green a Lego brick of the most generic type (3001, 31.8 × 15.8 × 11.4 mm); a Seagate 4GB microdrive in Compact Flash package (43 × 36 × 5 mm; platter is 26mm Ø); a 120 minute Sony NTC-120 cassette tape (30 × 21.5 × 5 mm; 2.5 mm magnetic tape) and a Samsung micro SD card (15 × mm × 1 mm).

I checked ebay, and microdrives are easy and cheap to find these days, so now I have one. Upon getting I found out I had to buy a new Y000 size tri-lobed screw driver (well, bit for my modular driver) to take it apart. My set of bits, the complete range from Ifixit when I got the set, only went down to Y0. Ifixit now has them. I got a Y00 at the same time to not have a gap.

Somewhere I have a few UMD disks, the DVD-esque media for the Sony Playstation Portable (PSP). At 64mm in diameter, it was smaller than the Minidisk (68mm) format, but it is still much larger than any of these.

getcert


I've typed these commands in by hand dozens of times over the years. But today I decided, "No more, script it."

So here's a simple script that takes a hostname, with optional port, and optional output filter. It makes an SSL connection to the given host, and extracts the certificate presented. With the validity filter, you can see the dates the cert is good for. With the dns filter, you can see hostnames the cert covers.

#!/bin/sh

host=$1
port=443

full() { cat; }
valid() { grep -A2 'Validity'; }
dns() { grep -E '(Subject.*CN *=|DNS *:)'; }

case "$host" in
        *:*) connect="$host" ;;
        ?*)   connect="$host:$port" ;;
        *) echo "usage: host[:port] { full | valid | dns }"
           exit 2
           ;;
esac
filter="full"

case "$2" in
        full) filter="full" ;;
        val*) filter="valid" ;;
        dns*) filter="dns" ;;
esac

: | openssl s_client -connect "$connect" 2> /dev/null |
    openssl x509 -noout -text |
    $filter
exit

Some examples of it in use:

$ getcert www.cvs.com dns      
        Subject: C = US, ST = Rhode Island, L = Woonsocket, O = CVS
Pharmacy Inc, OU = CVS Caremark Corporation, CN = www.cvs.com
                DNS:www.cvs.com, DNS:www.minuteclinic.com,
DNS:www.cvshealth.com, DNS:voices.cvshealth.com,
DNS:videovisit.cvs.com, DNS:vaccines.cvs.com,
DNS:vaccines-west.cvs.com, DNS:vaccineclinicscheduler.cvs.com,
DNS:tnl-photo.cvs.com, DNS:t.cvs.com, DNS:static.cvs.com,
DNS:services.cvshealth.com, DNS:services.cvs.com,
DNS:scheduling.minuteclinic.com, DNS:r.cvs.com, DNS:photohelp.cvs.com,
DNS:photo-store.cvs.com, DNS:photo-smetrics.cvs.com,
DNS:photo-metrics.cvs.com, DNS:payments.cnpapi.cvs.com,
DNS:optical.cvs.com, DNS:mypassword.cvshealth.com,
DNS:mypassword.cvs.com, DNS:myhr.cvs.com,
DNS:mychart.minuteclinic.com, DNS:mobile.cvs.com,
DNS:minuteclinic.com, DNS:message.cvs.com, DNS:meddplanfinder.cvs.com,
DNS:m.cvs.com, DNS:i.cvs.com, DNS:health.cvs.com, DNS:flushot.cvs.com,
DNS:express.cvs.com, DNS:es.minuteclinic.com, DNS:es.cvs.com,
DNS:entservices.cvs.com, DNS:e.cvs.com, DNS:depservices.cvs.com,
DNS:ddl.cvs.com, DNS:d.cvs.com, DNS:cvs.com,
DNS:citrix.minuteclinic.com, DNS:circular.cvs.com,
DNS:catools-photo.cvs.com, DNS:cvsh-tv.cvs.com, DNS:c.cvs.com,
DNS:seo.cvs.com, DNS:s.cvs.com, DNS:ds.cvs.com, DNS:design.cvs.com,
DNS:alvie.cvs.com, DNS:smartbytes.minuteclinic.com, DNS:care.cvs.com,
DNS:www.care.cvs.com
$
$
$ getcert www.nato.int valid
        Validity
            Not Before: Dec 17 14:09:55 2020 GMT
            Not After : Dec 31 22:59:59 2021 GMT
$

There you have it. CVS has a list of subject alternative names (SANs) as long as a CVS receipt, and you now know what to get NATO for xmas.

Tiny Media


Three pieces of tiny media and a Lego brick for scale

Clockwise: a Lego brick of the most generic size; a 120 minute NTC-120 cassette tape, a micro SD card, and a 36 exposure film cartridge for a Minox camera.

Extremely tiny things amuse me, so when I recently learned about the NT tape format from Sony, I looked on ebay to see if I could find one. About twelve bucks later and I have one. Now I need to get a microdrive to complete the collection.

Update: with microdrive

Mixed lentils


After a day out on Alameda Island, I stopped at a store to buy some drinks. I happened across an interesting looking corner market and went in. Although not clearly stated as such, it appeared to a Turkish shop and I could have spent a good while perusing the shelves. Instead I grabbed some cold drinks and picked up a bag of Sadaf mixed lentils. The lentils caught my eye with such a pretty mix of faded pastel colors.

pale pastel goodness

Trouble is, I had no recipe and found none while searching. So I needed to improvise. The following is a recipe that evolved from my spicy dal recipe. The general plan is cook lentils in water for a long while, then in a separate pan cook some seasoning. Mix the two and enjoy. Like that dal, this can be eaten hot or cold.

  • 3 cups water
  • 1 cup mixed lentils (Sadaf's mixture seems to be about equal parts green peas, yellow peas, green lentils, and red lentils)

Rinse the lentils and put in a suitably sized sauce pan on full heat. When it reaches a boil, lower heat and skim off the foam. Add then cover (with slight vent) and simmer:

  • 1" to 2" ginger, peeled and cut in thirds
  • 1/2 teaspoon tumeric powder
  • 2 or 3 bay leaves

Let that go for a while. Figure 30 to 60 minutes depending on how low your low heat is. Give it a stir every once in a while and add more water if it seems prematurely dry. What you are looking for is some of the lentils to have broken down to create a thick broth and some to still be whole.

When it seems about ready, time start the temper. Get a small to medium fry pan heating with:

  • 1 tablesoon of oil, or substitute ghee for all or part of the oil

When hot add one at a time:

  • 1 teaspoon of whole cumin
  • a pinch of asafoetida powder (aka "hing")
  • 1/2 teaspoon of crushed red pepper

When the cumin has been toasted for 30 seconds or so, add

  • 1/2 medium yellow onion, diced
  • 5 or 6 cloves garlic, minced

On medium-high heat, cook mixing frequently until the onions start to brown. Then it's time to look back to the lentil pan. Turn off heat and fish out and discard the ginger and bay leaves. With those out of the way, add all of the contents of the frying pan to the sauce pan. Mix the temper into the lentils along with:

  • 1/2 teaspoon black pepper
  • 3/4 teaspoon salt (or to taste)

I've eaten it as a side with rice and curried vegetables, and as a cold spread on warm pita, like I would have hummus. As a main dish, I'd find it wanting some more texture and some more greens. And unfortunately, the colors cook out to leave basically just a light green.