Micropub test of creating a basic h-entry
Test
Note with picture
Test: Note wit a picture
TEST: Let's see if we can wait for this tweet to come online.
TEST: Let's see if we can wait for this tweet to come online.
Test: Note wit a picture
TEST: Let's see if we can wait for this tweet to come online.
TEST: Let's see if we can wait for this tweet to come online.
Let's see if syndication no works.
Image conversion, resizing and compression with WebAssembly
Image conversion and resizing for the web can be quite fiddly. Take responsive websites for instance. You want to show a smaller version of your image on smaller devices: You don't need to download a 1080px wide image to show on a 360px wide device, especially since that device is likely constrained in the amount of bandwidth it has. Then again when your website is shown on an ultra HD screen with 3840x2160 resolution 1080 is maybe even too small.
Apart from multiple sizes, you also want to offer multiple formats. Modern browsers support new(er) image formats like webp and avif offer better compression for comparable image quality. Using these formats you can decrease the total download size of your page, while improving the overall experience for the user. But you just can't assume (yet) that all browsers support those newer formats, so you have to provide older formats as a fallback option. All in all the amount of different files you have to offer for just a single image on a web page starts to become quite large and the whole thing becomes, like I said, fiddly.
Measuring your writing progress with a git word count
Writing a scientific paper is hard. Doing your PhD is hard. Writing your thesis is hard. And to make me feel even more miserable I decided to measure my progress by counting the net change in words I achieve throughout each day. I am by no means a productivity guru and I don't know whether word count is a useful indicator for measuring the progress of a paper. That being said, it is a reality check to see how fast my work is progressing. So without further ado here's the Powershell command that outputs the wordcount for the last 25 days based on git commits. (For the bash command, see the bottom of this post)
for($i = 0; $i -lt 25; $i++){$j = $i + 1; Write-Host (get-date (get-date).addDays(-$i) -UFormat "%Y%m%d") ((git diff --word-diff=porcelain "@{$j days ago}" "@{$i days ago}" -- "***.md"| Select-String -Pattern "^\+.*" | Measure-Object -word | select -ExpandProperty Words) - (git diff --word-diff=porcelain "@{$j days ago}" "@{$i days ago}" -- "***.md"| Select-String -Pattern "^-.*" | Measure-Object -word | select -ExpandProperty Words)) }
Pandoc-filter for highlighting to-dos in LaTeX output
While writing my papers I try not to get bogged down too much. So if a paragraph doens't flow right I just type
TODO: rewrite
on the line below it, and continue writing. When I think of something that I shouldn't forget, like an extra analysis to run I just write it down as a todo in the running text of my paper. I also write thoughts on my paper as a todo. Ideas on structure, whether I should maybe rearrange paragraphs or approach a subject differently, it all ends up as a todo in the running text.When running the VSCode task for converting my paper to PDF (using Pandoc) it puts all the todos into the running text. That's fine by me, it helps as an extra reminder that stuff still needs to happen. But I wanted the todos to be visually different from the running text, so that it stands apart and doesn't confuse people who are reading my draft. That is where my Pandoc filter comes into play.
Super easy tip for slide animation with Pandoc and reveal.js
I found this super easy alternative way to animate your slides with reveal.js that works out of the box with Markdown and Pandoc. Here is how to do it.
Last week I had to give a progress presentation about the current state of my PhD, and I can whip those up in no time. I use Boilerplate Paper not only for writing my papers, but also for presentations like this.
I write the presentation in Markdown and then convert it to reveal.js. But sometimes you want something else than the default sliding transition that reveal.js provides.
Running c-lightning in Simverse with plugins
The goal is to run c-lightning with plugins in a local testing cluster. For my cluster I use Simverse. Simverse allows for additional command line arguments to be passed to
lightningd
, so it should be possible to runlightningd
with theplugin
argument.Let's first clone our plugin. We will be using one of the plugins that are available through Lightningd on Github.
cd ~\simverse\_repos git clone https://github.com/lightningd/plugins.git --depth 1
We put the plugin in the
_repos
folder, because it is assumed that the plugin is there when the cluster is being build. (Also: throughout this article we assume your simverse folder is inside your home folder. If that is not the case, adjust it accordingly)Since all nodes in Simverse run inside Docker containers, that plugin-file should be made available inside the Docker context folder. The
_repos
folder is not part of that context (each container gets its own context) so we have to copy the file from the_repos
folder to the Docker context folder. Luckily Simverse works with the concept of recipes. A recipe describes how your cluster should look like. A recipe is a bash script that uses a library called cookbook that can be used to build your cluster step-by-step. Since it is "just" a bash script, you can do anything bash can do to tweak your cluster.We will create a recipe that creates a cluster with three c-lightning nodes, running on a bitcoind back-end.
SSH keybased authentication Windows to Linux
I do most of my development on a remote machine. The machine isn't that remote, it's a mini-pc running Ubuntu that is standing right here on my desk. It has no peripherals, so I have to do all my development remotely through my Windows 10 laptop.
Remote development with Vscode is amazing. It just works. Once you are set up, there's no difference with working locally. To have that seamless experience you do have to set up keybased authentication for SSH. If you don't you will be constantly reminded of working remotely, because you have to type in the password of the remote machine.
Debugging LND while running a local cluster
If you want to debug LND, or if you want to take a real deep dive into LND, you probably want to be able to set breakpoints in the source code to see what is actually happening. Not only that, you also want to have the node run in a local cluster of other nodes, so that you can perform some real Lightning actions like opening a channel and make payments. This post takes you through the setup I use based on Delve and Simverse.
Building Bitcoin Core On Windows 10
I've been following Bitcoin and more importantly the Blockchain from the sidelines for a few years now, but I wanted to get my hands dirty. Obviously I could just download the Bitcoin Core executables from bitcoin.org, but I always feel it gives me more insight if I build something myself. Also it's was a nice test case for Bash on Windows.
- Newer posts