Tuesday, May 26, 2020

Switching Java Versions

Believe it or not, I was unfamiliar with this way of switching Java versions:

$ export JAVA_HOME="$(/usr/libexec/java_home --version 1.8.0_251)"

Hope this helps somebody!

(because I know that someday that somebody will be me!!)

Sunday, May 17, 2020

30-Day Song Challenge

I keep seeing the "30-Day Song Challenge" on Instagram Stories. I'm terrible at Instagram, so I probably won't be posting my own selections. But when I googled what all the 30 days were, I kept seeing post after post on these nothing-but-ads sites. Well here they are, and I'll upload the graphic, too - tap it to get it full sized.

1. A song you like with a color in the title
2. A song you like with a number in the title
3. A song that reminds you of summertime
4. A song that reminds you of someone you'd rather forget
5. A song that needs to be played loud
6. A song that makes you want to dance
7. A song to drive to
8. A song about drugs or alcohol
9. A song that makes you happy
10. A song that makes you sad
11. A song you never get tired of
12. A song from your preteen years
13. A song you like from the 70s
14. A song you'd love to be played at your wedding
15. A song you like that's a cover by another artist
16. A song that's a classic favorite
17. A song you'd sing a duet with on karaoke
18. A song from the year you were born
19. A song that makes you think about life
20. A song that has many meanings to you
21. A song you like with a person's name in the title
22. A song that moves you forward
23. A song you think everybody should listen to
24. A song by a band you wish were still together
25. A song you like by an artist no longer living
26. A song that makes you want to fall in love
27. A song that breaks your heart
28. A song from an artist whose voice to love
29. A song you remember from your childhood
30. A song that reminds you of yourself

Saturday, May 16, 2020

iOS Edit Menu

I use the three finger double tap accessibility gesture to put my iPhone in zoom mode, handy for reading fine print and drawing tiny pictures. You then use three fingers to pan the zoomed view around the screen.

But recently I discovered that if you're not zoomed in, there are three finger gestures that do other things.

  • swipe left: undo
  • swipe right: redo
  • tap shows an Edit menu of undo/redo, cut/copy/paste

The best thing about this is that note I can turn off Shake to Undo, which I'm constantly having to cancel while grocery shopping. Problem solved!

Plus, iOS text editing isn't great about offering the Paste function when you drag the cursor to a new location. When that happens, just three-finger-tap and then choose Paste from the menu. Another problem solved!

Tuesday, April 21, 2020

Stacked Enchiladas

   Ingredients:
     * 1 package, corn or flour tortillas
     * 1 pint, sour cream
     * 2 cups, chopped turkey or chicken, cooked
     * 1 or 2 cans, enchilada sauce
     * 1/2 cup, chopped green onions
     * one or two little cans, chopped green chiles
     * 1/2 to 2/3 pounds, shredded cheddar or Monterey Jack cheese

   mix sour cream, green onions, chiles, meat and 3 teaspoons of enchilada
   sauce. in a round casserole dish, spread enchilada sauce to cover the
   bottom. place a tortilla that has been dipped in enchilada sauce in the
   bottom of the casserole dish then layer with approximately 1/4 cup of
   meat mixture and 1/4 cup of shredded cheese. repeat layers ending with
   tortilla and cheese. bake covered in 350 degree oven for 45 minutes.
   remove the cover for the last 15 minutes of baking.

   Muy delicioso!!

   (Makes 8 servings.  Calories per serving: about 550, 300 from fat)

     Copyright 1999, Dave Diamond. Last  updated on February 26, 2000.

Another recipe rescued from an old hard drive. Enjoy!

Thursday, March 26, 2020

Apple Watch Workout Sync

I have an Apple Watch problem. I'm obsessed. I can't not close my rings. Every challenge, accepted.

So the March Challenge is 31 workouts - no problem. I double up a couple days just to be sure.

Then it's the 26th and I look at my progress - wait, 13? It's not counting all my workouts!!

But when I look at the Workouts tab on the iPhone Activity app, sure enough, they're all there.

Googled around, nothing jumped out at me, so I started a chat with Apple.

To make a long story short, they had me unpair and re-pair my watch and my phone, which was kind of time consuming but not a big deal.

And the problem was fixed! March Challenge completed!!

Now if this happens to you - even if you just have to unpair/re-pair your watch and phone for any reason - here are some things to keep in mind:

1. by the end of the day, my watch battery was super low. if you're going to unpair/re-pair, you might want to put it on the charger while you do so.

2. I got to the grocery store to discover that my credit cards weren't there anymore. you have to go into the Watch app on iPhone and re-add your cards, which is just a couple of clicks, BUT you do have to know your cards' PIN codes.

Wednesday, August 28, 2019

Homemade Taco Seasoning

I haven't made this yet, but I don't want to lose it

https://gimmedelicious.com/2018/03/16/the-best-homemade-taco-seasoning/


Wednesday, July 31, 2019

EXIF metadata with a Promise

I had occasion to use exiftool recently, but instead of a callback, I'd rather use promises.

This is what I came up with:

const exif = require('exiftool');
const util = require('util');

const exif_metadata = function (data) {
    return new Promise((resolve, reject) => {
        exif.metadata(data, (err, metadata) => {
            if (err) {
                reject(new Error(err));
            } else {
                resolve(metadata);
            }
        });
    });
};


Worked great!

const fs_readFile = util.promisify(fs.readFile);
 

Promise.resolve()
  .then(() => {
    return fs_readFile(path);
  })
  .then(data => {
    return exif_metadata(data);
  })
  .then(metadata => {
    console.log('metadata: %O', metadata);
  })
  .catch(error => {
    res.send(error.toString());
  });