Posts

Week of year

Sometime I like to use the week of the year instead of the date. Until today I've been searching up a webpage every time - I don't need it often enough to bookmark, even. Anyway, today TIL that bash will return the week from  date +%U 😲 Looks like JS is not so straightforward tho - you can google that if you need it. 😉 UPDATE: although the above usually works fine for me, I discovered that the U command assumes that weeks begin on a SUNDAY when, as we know, they actually begin on MONDAY. The correct command is therefore date +%W

record system sounds in powerpoint

 https://superuser.com/a/1133762 After enabling stereo mix and setting it as the source - default and app specific - I was still not picking up system sound on the PP recording.  I had to point the output to speakers, which seemed to make the difference, and then plug headphones directly into the machine rather than through the USB adaptor which seemed to re-brand them as a Jabra device. 

Youtube audio renderer

This worked for me (Windows 10) - Win+R - devmgmt.msc - find the sound list - right-click the device, disable - right-click the device, enable - refresh YT tab

changing rtrio to boot sonic pi

 after installing sonic pi, I try to run it, get error: `You don't appear to have a sane system configuration.` lol. yeah probably.  `It is very likely that you encounter xruns.` no idea what that means. anyway, I take the advice and add  `  @audio          -       rtprio          99` to `/etc/security/limits.conf` I note it here beccause I _suspect_ it's going to stop me pushing my volume levels over 100, which will probably baffle and anger me down the line. update:  as per my usual reckless approach, I've installed realtime-priveleges package and added my username to the realtime group. no diff that "sane system" and "realtime scheduling" message comes from jackd. running "jackd -d backend --help" shows it in the terminal. Now I'm thinking it's to do with pulsaudio settings maybe. did all this: https://github.com/sonic-pi-net/sonic-pi/issues/2341#issuecomment-628016039 which feels dumb...

youtube-dl

Audio only: youtube-dl -f 'bestaudio[ext=m4a]' 'https://www.youtube.com/watch?v=AA2iq5IspLI&ab&ab_channel=StoryTeller'

Arch XPS shut down on suspend

XPS is shutting down on every suspend action - closing lid, power button, manual select - instead of suspending following an arch upgrade. solution is just to go through a proper shutdown process and start up again.

detect printer on network

to detect the printer on my new WAN, I tried `avahi-browse -alr` but the demon wasn't running. `systemctl start avahi-daemon.service` sorted that.