Recent Changes

Updates since 2021-11-14 06:29 UTC up to 2022-02-12 06:29 UTC

1 | 3 | 7 | 30 | 90 days
List all changes Include rollbacks Include minor changes
List later changes RSS RSS with pages RSS with pages and diff

2022-02-07

  • 08:03 UTC (new) (history) 2022-02-07 An inclined plane in tikz . . . . mbork Look, a TeX post again! It’s been another while since I last wrote anything TeX-y here. No wonder, I hardly ever use TeX anymore – but I still do use it from time to time! A few days ago I needed to draw a diagram of an inclined plane. Interestingly, there are people who did exactly that using TikZ before (obviously), but two examples I found used the heavy artillery of trigonometry.

2022-01-29

  • 09:56 UTC (new) (history) 2022-01-29 Running a script before (and after) starting the psql prompt . . . . mbork And here I am again, with another PostgreSQL tip. Recently, I had a need of running psql interactively but executing some script first. Of course, this can be done from psql itself by saying \i some-script.psql, but let’s assume that I’d prefer for that to happen automatically, so that instead of typing psql at the shell prompt and then \i some-script.psql at the psql prompt I could just say psql-some-script.sh at the shell prompt and be done. The important thing here is that I want to run some-script.psql first and go to the psql prompt next.

2022-01-24

  • 16:26 UTC (new) (history) 2022-01-24 Journaling with Org-mode . . . . mbork OK, so let’s admit it. I’ve been journaling with Org-mode for more than 6½ years now. Every day (well, almost every day) I sit down and make notes of important things that happened that day.

2022-01-17

  • 20:12 UTC (new) (history) 2022-01-17 Making code snippets in Org-mode easier to type . . . . mbork From time to time people tend to discuss the Org markup – some people want to extend it in one way or another, some people want to make it more Markdown-ish. I tend to agree that the selection of the tilde (~) to denote code is a bit inferior than Markdown’s choice of the backtick (`). But keep in mind this: I don’t have a problem with looking at my Org file and seeing (lots of) tildes. After all, font-lock does a good job of telling me that this is code. I have a problem with typing these tildes, since they require me pressing the shift key – and if I have a lot of small code snippets, this is not very comfortable. Add to this the fact that I happen to write in Markdown pretty often (when I use Markdown-based tools, like Slack or Jira), and I started wondering: why couldn’t I press the backtick in Org-mode to type a tilde (and vice versa so that I don’t lose the ability to type a backtick)?

2022-01-10

  • 21:59 UTC (new) (history) 2022-01-10 Simple tmux scripting revisited . . . . mbork Some time ago I wrote about my (very simple) tmux script. Since then I started to like tmux even more, and in fact I tend to create a similar script for every major project I work on. Last time, however, I noted how the sleep part is very fragile (and less than elegant). Since then I realized that I do not need any advanced scripting to run command Y in tmux window B when command X in window A finishes its job. In fact, this is very simple, and I’m ashamed I didn’t think about it earlier.

2022-01-03

2021-12-24

  • 09:44 UTC (new) (history) 2021-12-24 Merry Christmas . . . . mbork It seems that it is already a tradition that I wish Merry Christmas to all my readers! Of course, as old-timers surely know, I’ll offer a decade of Rosary for you.

2021-12-18

  • 12:44 UTC (new) (history) 2021-12-18 Automatically starting Firefox with a clean profile . . . . mbork I am currently working on a side project, which is a very specific web application. One of the requirements is that several users should be able to be logged in simultaneously and interact with each other in real time. For the “real time” part, I use websockets (with the Socket.IO library, which is quite nice to work with). Today, however, I wanted to say something about a different thing: testing. Not automated testing (I will probably blog about it later, too), but good old manual testing. The trouble is, how do I log in as two (or more) users at the same time? I can’t use separate browser tabs, since they share cookies and logging in or out in one of them logs me in or out in all of them. It turns out that if you open several “private browsing” windows in Firefox, they all share cookies and similar data, too – that wasn’t obvious for me, but this is how it works. I could use separate browsers (say, Firefox and Chromium), but that is far from comfortable – and obviously scales very poorly. Of course, Firefox profiles are exactly what is needed here. They have one drawback: it takes a lot of clicking to create a new profile. (Also, you have to name it, keep track of your profiles, delete the ones you don’t need anymore…) So, let’s script it.

2021-12-11

  • 10:53 UTC (new) (history) 2021-12-11 My productivity system - design . . . . mbork Note: this is another of those really long posts. It’s probably only interesting for some productivity geeks, since it describes my current system for beating procrastination and making most of my time (or rather, one layer of that system). In a future post I’m going to write about some (Org-mode-based) tools I use to actually implement it, but for now I just want to show the main ideas – in fact, this system was first implemented with pen and paper, and in fact it worked very well that way.

2021-12-04

  • 07:59 UTC (new) (history) 2021-12-04 Org timer once again . . . . mbork I’ve been writing about the Org timer about a month ago, and today I’m revisiting this topic because once I started using it, I discovered a cool feature which is, let’s say, half-documented.

2021-11-29

  • 13:00 UTC (new) (history) 2021-11-29 Counting the number of columns in PostgreSQL . . . . mbork So I had this pretty big PostgreSQL table, and I wanted to know how many columns it had. Should be simple enough, right? Remember about using psql to show how some comands are converted to SQL? Well it didn’t really help me that much.

2021-11-20

  • 09:14 UTC (new) (history) 2021-11-20 Tricks with GNU date . . . . mbork Date- and time-related computations are hard – we all know this. Sometimes the problem is that there are many edge cases, sometimes the issue is conceptually hard, and sometimes both. Recently, I had an instance of a problem which was conceptually hard (at least for my little brain).

More...

Filters