Devlog

Docker info

Some docker info and commands I use a lot. Bash shell Custom prefix By default Docker prefixes your container and volume names with the directory it’s running in. For example I have a couple of projects with the trunk sub directory where I run docker from. If I run Docker from this sub directory, my […]

Execute command line PHP script from within WordPress

You can try to load the wp-load.php of wp-config.php files manually, but then some defines are not set (like HTTP_HOST). An easier way is to use the eval-file method of the wp-cli package. No you can just do: And in your file, you can call all the usual WordPress methods. Only make sure to explicitly […]

Openbox pipe menu Network Manager

A little script to add your available networks to the Dropbox menu and to let it connect / disconnect. Now call the script above in your .config/openbox/menu.xml file:

Mirror git repository

I had to push to 2 GitHub repositories from 1 SVN repository. After some searching I came with the following solution. I suppose there are better ways to do this, but this works for me: After you pushed to the first repository, just use the following command to push to another one:

Apache Authentication header for Bearer token

By default, Apache doesn’t allow the Authentication header that is used for bearer tokens. To make it work, I had to do this: I had to use the SetEnvIf line, but some people report that they had to use the RewriteRule line.

Update network WordPress with command line

Update network WordPress with command line:

Useful NVM commands

Just some commands that I always have to lookup. NVM is a tool that manages your node versions. An important concept is that your node versions are installed into their own directories together with the packages that are installed by this version of node. So if you install another version of node, you have to […]

Colorize bash prompt on different servers

I often login on development and production servers. Sometimes I’m not sure anymore if I’m on development or production, which can cause some serious issues, like deleting a file on production… An easy solution is to colorize the bash prompt different on development and production. On my development server, I have a black background and […]

Remove all missing files with SVN

This will also take care of the “@” when you’re an iOS developer with lots of @2x and @3x files: svn st | grep ^! | awk ‘{print ” –force “$2″@”}’ | xargs svn rm

Mac OS apps for optimizing images

Nice simple apps to optimize images for web or app development, that can be used by programmers and other people who don’t know anything about image optimization… Install these 2 little apps: https://pngmini.com/ https://imageoptim.com/mac And if you want to batch proces optimization, install the CLI tool: https://github.com/JamieMason/ImageOptim-CLI Another nice app for converting SVG to PNG: […]