Fileless cURL to Chromium

Sometimes (expecially during CTFs) I need to display the result of a REALLY specific HTTP request that I made with cURL into Chromium. The naive and boring way of doing this would be something like this: curl -s https://avalz.it > /tmp/page.html chromium /tmp/page.html rm /tmp/page.html For some reason, I got stubborn on not creating that temporary file, which led to the mess you can see below. TL;DR curl -s URL | base64 -w 0 | xargs -i chromium "data:text/html;base64,{}" Breakdown The biggest issue is that chromium can’t open files from stdin, but only from URLs passed as argument....

March 8, 2019

Automatically trigger commands on source change

Sometimes, you need to write a source file and “compile” (as in “run a generic script on it”) each time you edit it, just to see the final result. On Ubuntu, you can use the inotifywait command to keep an eye on filesystem operations. sudo apt install inotify-tools You can create a simple bash file such as this: #!/bin/sh inotifywait -m . -e modify | while read path action file; do # Do something....

February 14, 2018

Building pretty slides using Markdown and pandoc

Slides can be hard: you have to focus on content, then you have to make it pretty, add animations and stuff. If you are like me, you hate using your mouse (except for games), you have a horrible taste in design and you just want to write content and have it styled omakase. You probably use Beamer for slides, or something similar, but results may vary (see below). Then again, if you are like me, you probably like your Beamer default theme just fine, and that’s cool and everything, but other people might actually have some kind of taste and we (unfortunately) have to respect that when building our slides....

February 1, 2017