New account since lemmyrs.org went down, other @Deebsters are available.

  • 9 Posts
  • 242 Comments
Joined 1 year ago
cake
Cake day: October 16th, 2023

help-circle









  • I just had mine arrive yesterday!

    I have one of these
    macro keyboard with 12 keys and three knobs

    I’m using ch57x-keyboard-tool to configure it, because I don’t fancy running some random closed-source Chinese code (the manual links to a file on Google Drive). It also means I can move over my config when I switch to Linux.

    I have two keys for switching between headphones and speakers, and some set up for shortcuts I forget (like ctrl-shift-e for the network monitor in Firefox). One key types “hello” just because I can.

    I’ve got the large knob controlling volume, and I can click it to toggle mute. The other two are currently set to scroll, but I don’t need that as my mouse has better ergonomics for scrolling.

    I still have plenty of unused keys and it’s got three layers so I won’t be running out in the foreseeable future.






  • I’ll be very happy to not have to use Date any more. Pop quiz, what’s in whatnum?

    const vday = new Date('14 February 2025');
    const whatnum = vday.getDay() - vday.getMonth();
    

    Err, it’s 5… Ha, amazing; that’s not even the gotcha I meant to demonstrate. getDay returns the day of the week, the day of the month is returned from getDate.

    Take two:

    const vday = new Date('14 February 2025');
    const whatnum = vday.getDate() - vday.getMonth();
    

    So this is 14 - 2 = 12, right? Nope! The day (from getDate) is 1-based whereas month is 0-based, so 14 - 1 = 13.