==========
== 0x2f ==
==========

Why does ERC connect to ZNC without password, even if it's in .authinfo?

I faced a problem where I had a self-hosted ZNC instance and I was trying to connect to it using Emacs ERC. My password for ZNC was placed in the .authinfo file that Emacs auth-source should read, but ERC never read that password and displayed the Logging in without password message in the echo area. Here’s how I was trying to connect:

(erc-tls :server "myzncinstance.com" :user "myusername/LiberaChat")

Note the ZNC specific username format, where myusername is the name of the user within ZNC, and LiberaChat is the name of the network defined within ZNC for that particular user.

Read more...

Why does Gnus not expire my e-mails?

I had a problem where I was using nnimap in Gnus to browse e-mail. I would be in my inbox group and I would press E to mark an e-mail (an “article” in Gnus terms) as expirable. Then I would press B e ((gnus-summary-expire-articles)) so that they would get deleted. However, nothing would happen - the articles would remain as expirable instead of being deleted through IMAP and marked as cancelled.

Read more...

More convenient currency conversion with Emacs calc-currency package

It’s possible to make currency conversion faster than described in the readme file of the calc-currency package:

This isn’t the place for a full Calc tutorial, but you can play around as follows: To start Calc up, type C-x * c. ’ 25000 JPY Enter (the apostrophe key, then the text “25000 JPY”, then the Enter key) will put 25000 Japanese yen on the Calc stack. u c USD Enter will convert the value on the stack to US dollars.

Read more...

Saving events with Emacs org-mode

I recently subscribed to many e-mail newsletters of local museums and art galleries. I wanted to stay up to date with what’s happening in the city.

The problem is that these e-mails inform you of the event in plain text that you’d need to save to your own organizer/calendar program:

Come in on [4 weeks from now] 18:00 because there’ll be a new exhibition

Because the event is a long time for now, you need to write it down somewhere so you don’t forget. In a perfect world they would attach an .ical calendar invite so you could add the event to your CalDAV calendar with just a click. Since that’s not the case, you may try to add the event to your CalDAV calendar by hand. It’s really slow. It distracts you from you checking your inbox, since you need to change the tab to the calendar. It’s a far cry from coming across an event on social media and just clicking “interested”. Saving events this way made me fantasize about owning a paper organizer. “God, I could just flip to the page with the day of the event in a second and just type it in there”.

Read more...

dape.el and attaching to Node process

By default, dape.el’s `dape-configs` variable includes the `js-debug-node` and `js-debug-chrome` configurations. See https://github.com/svaante/dape/blob/4694a7323b6bb6747f072c4c1253d18cf07a113f/dape.el#L196-L231

However, those are meant to start a file you’re currently in in debug mode.

If you prefer to start your Node process somewhere else using node --inspect [myfile.js], the above two configurations won’t work. Thankfully, it’s easy to add such a configuration yourself - see (js-debug-attach ... at the bottom.

You can run it using M-x dape and typing in js-debug attach :port 9229. You have to provide the port because it’s not specified in the below `dape-configs` var, and dape allows you to add props before running a pre-made configuration. Make sure to set up the debugger adapter package: https://github.com/svaante/dape?tab=readme-ov-file#javascript---vscode-js-

Read more...

Problemy z implementacją GTFS w Białymstoku

Czasy odjazdów zdefiniowane w calendar_dates.txt zamiast w calendar.txt

Jak wiemy, dane GTFS dla Białostockiej Komunikacji Miejskiej są dostępne tutaj: https://komunikacja.bialystok.pl/cms/File/download/gtfs/google_transit.zip

Po pobraniu archiwum .zip i rozpakowaniu go, ukażą nam się pliki:

  • agency.txt
  • calendar_dates.txt
  • routes.txt
  • shapes.txt
  • stops.txt
  • stop_times.txt
  • trips.txt

W dokumentacji (link niżej do oryginału w j. ang.) GTFS jest zawarty opis tego, za co każdy z tych plików odpowiada.

https://gtfs.org/schedule/reference/#dataset-files

Zwróćmy uwagę, że calendar.txt nie ma w pobranym archiwum .zip, natomiast calendar_dates.txt jest. GTFS pozwala na taką sytuację - jak można przeczytać w https://gtfs.org/schedule/reference/#calendar_datestxt:

Read more...

Quickly switching default audio inputs/outputs with bemenu and Pulse Audio

I’ve been using the graphical pavucontrol program for switching inputs. I wanted to switch to something leaner.

I came up with the below script. It depends on:

  • pactl
  • jq - for parsing pactl JSON output
  • bemenu - you could probably use dmenu too

The rest should be included with your system.

Use the script like changeaudio.sh sink (audio output) or changeaudio.sh source (audio input)

#!/bin/bash
# Simple audio output/input switcher based on bemenu

DEVICE=$1

if [[ ! $DEVICE =~ (sink|source) ]]; then
    echo "Pass as argument either 'sink' (to change audio output) or 'source' (to change audio input)."
    exit 1
fi

pactl --format=json list $DEVICE\s | \
jq -r '.[] | "\(.index) \(.description)"' | \
bemenu -l -1 | \
awk '{print $1}' | \
xargs pactl set-default-$DEVICE

It’s cool that pactl added support for JSON output. Without it, the only option left would be to use the “indented blocks of data” default output format. I’ve seen people write Pyton parsers for it.

Keyboards with integrated pointing devices

The following sections split the keyboards into categories.

“Multimedia keyboard”

These are always wireless. These are meant to be used in front of a TV. I don’t think programming on this would be comfortable.

There can be some stupid limitations, like the Logitech K400 has: the F1-F12 keys work as media keys by default, you can toggle them to work as regular F1-F12 keys, but that will reset once the keyboard’s power cycles - which is unusable for programming.

Read more...

Jak zapłacić w polskim sklepie w euro przelewem z mBanku do mBanku

Składałem zamówienie w polskim sklepie i tuż przed zamówieniem zorientowałem się, że zapomniałem zmienić waluty z euro na złotego. Nie chciało mi się usuwać koszyka i tworzyć zamówienia w złotym od nowa, więc zdecydowałem się na rzecz absurdalną: zapłacić w euro za zamówienie w polskim sklepie, z dostawą do Polski.

Przy zakupie w euro, sklep umożliwiał jedynie zapłatę ręcznym przelewem tradycyjnym. BLIK, karta itd. były tylko dla zamówień w złotych.

Read more...

Disorientation at home caused by poor ventilation

For 18 months now I’ve been getting this “oxygen hunger”, coupled with disorientation when at home. It’d just suddenly hit me for a while.

It seems like poor ventilation caused this.

Causing poor ventilation

  1. I caused poor ventilation after watching a video where it’s shown that you can turn a screw on the side of the window to make it seal better against the window frame. It’s sometimes called “window winter mode”. This made it easier to keep heat in the home, but also cuts off fresh air supply. I turned it all the way to max sealing on every window.

    Read more...
1 of 3 Next Page