All Articles

ffmpeg cheatsheet

Reduce a video to 720p:

export inn=<input.file>
ffmpeg -i $inn -vf "scale=-2:720" -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k output.mp4

Save the first frame of a video for a thumbnail:

ffmpeg -i $inn -frames:v 1 first-frame.jpg

.

drush cheatsheet

Uninstall, install a theme: 

export theme_name='THEME_NAME'
drush theme:uninstall $theme_name

drush config:set system.theme default $theme_name -y

Run some code with drush:

How I set up the docker image with systemd and sshd

For testing ansible roles, I need a docker container that runs systemd or init - a container in which services can be enabled. I also need this container to be accessible via ssh. This way, I don't have to spin up cloud resources (which are not free) in order to test doing something on a remote.

Vscode cheatsheet

Vscode is a text editor. No extensions should run, nothing should take up my CPU or memory.

code --list-extensions
code --disable-extension DotJoshJohnson.xml

.

Cool Scripts and One-liners

Find latest 20 files in the folder (on mac):

find . -type f ! -name '.DS_Store' -exec stat -f '%m %Sm %N' \
  -t '%Y-%m-%d %H:%M:%S' {} + | sort -nr | head -20 | cut -d' ' -f2-

Delete empty dirs:

find . -name '.DS_Store' -type f -delete
find . -type d -empty
find . -type d -empty -delete

.

20250811 Daily Scrum

In order to improve my writing skills, I should write on a regular basis. The amount of writing is measured in either the number of words written, or the hours spent writing. Of course, there is an inherent conflict of interest, an inherent corruption when measuring work in such a way. See The Inherent Corruption of the Employee.

How will I promote and market my material? And for what purpose? What am I selling? What is the path (karate-do) that I'm pursuing, what is in my DNA? These and other questions are answered succinctly in The Core.

An example of NAT routing in docker-compose

This is an example of setting up a NAT inside docker - in a fairly self-explanatory and minimal way. There are three examples that you can run in this setup: a positive example, a negative example, and a chatty positive example for debugging and demonstration purposes.

Art Styles: Painting

21 Types of Painting

There are plenty of different painting styles that you can see in art throughout the centuries.

Abstract

Famous Artists: Wassily Kandinsky, Pablo Picasso, Elaine de Kooning, Henri Matisse, Georgia O’Keeffe 

Significant Works: Full Fathom Five by Jackson Pollock, Composition VII by Wassily Kandinsky, Mountains, and Sea by Helen Frankenthaler, Orange, Red, Yellow by Mark Rothko, Red Canna by Georgia O’Keeffe