python3 -c ‘from urllib.parse import unquote; print(unquote(input(“> enter URL to decode: “)))’
Category: notes
Generate a secure token using python 3
python3 -c ‘import secrets; print(secrets.token_urlsafe(64))’
people are (1) defined only insofar as they act and (2) that the
people are (1) defined only insofar as they act and (2) that they are responsible for their actions.
Vim power: transforming yaml to m4
The more I learn vim, the more I am impressed with the efficient ways it handles complex nrepetitive editing tasks:nMy task is to transform a yaml file to a bunch of m4 definitionsn# Welcome to Jekyll!n#n# This config file is meant for settings that affect your whole blog, valuesn# which you are expected to set up once and rarely edit after that. If you findn# yourself editing this file very often, consider using Jekyll’s data filesn# feature for the data you need to update frequently.n#n# For technical reasons, this file is *NOT* reloaded automatically when you usen# ‘bundle exec jekyll serve’. If you change this file, please restart the server process.nn# Site settingsn# These are used to personalize your new site. If you look in the HTML files,n# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.n# You can create any custom variable you would like, and they will be accessiblen# in the templates via {{ site.myvariable }}.ntitle: Sitenemail: site@example.comndescription: “some example site”nlogo: falsennbaseurl: “”nurl: “https://example.com”npermalink: “:year/:month/:day/:title/”ndomain_name: “https://example.com”nn# Details for the RSS feed generatornauthor: “anon”nn# cache buster, increment when we have changesncache_version: 2nnexcerpt_separator: “
Prettyfying XML within Vim
Vim is not an island. Sometimes, the best way to do something is an external program.nAssuming the XML is well-formed, this will do:n
Simple TDD with NeoVim’s Terminal
Gotta love NeoVim’s terminal! For simple projects, it can replace a lot of whatndedicated plugins do, not to mention external dependencies like file watchers.nnHere is a TDD recipe for a small project. No plugins used:nStart nvimnnvim feature.pynnSplit a new terminal verticallyn:vsp | :terminalnnGet the terminal’s job id.n
Upgrade a Debian server from 9 to 10
Best if important stuff is backed up first and custom apt sources disabled.nnapt updatenapt upgradencp /etc/apt/sources.list /etc/apt/sources.list.orignsed -i ‘s/stretch/buster/g’ /etc/apt/sources.listndiff sources.list.orig sources.list to verify the changenTo kick off the upgrade, apt update && apt upgradenFinally, apt dist-upgradenrebootnafter reboot, verify with lsb_release -a
Η μουσικη
Η μουσική, τοπος μνημης.
Η ασάφεια
Η ασάφεια δηλαδή, συγγενεύει με τη κενολογία.nn– Ιωάννα Παπαζαφείρη, “λάθη στη χρήση της γλώσσας μας”
How science speaks
Listen to Margot Brouwer describe testing Verlinde’s new theory of gravity. Contrast her understated, stark, accurate scientific language to sensationalist pseudoscientists or any politician. Zero drama