Devlog

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: […]

Titanium and localize moment.js

Titanium comes with a standard Moment.js library included. If you want to localize it, you have to require the locale you need. This needs to be done statically! So if you need a Dutch moment.js localization, you explicitly need to require it: require("/alloy/moment/lang/nl"); You cannot require it dynamically, because the compiler needs to include it […]

Move WordPress Multisite to new URLS

Here are the steps involved when moving a WordPress Multisite installation to a new domain name. In my case I wanted to move everything (code + database) from development to production. After copying everything to the new environment, you have to change the following items: Make sure to add or update your wp-config.php file: define('DOMAIN_CURRENT_SITE', […]

Show installed iOS simulators command line

xcrun simctl list

WordPress Users, Roles and Capabilities

I find the capabilities one of the most difficult to grasp concepts in WordPress development. On one hand, you have the┬ácapabilities of a custom post type and on the other hand you have the┬ácapabilities of a user or user role. And then you have the 2 other┬ácapabilities options you can set when registering a custom […]

Get custom post type by custom taxonomy on the WordPress rest api

To get custom post types and filter them by custom taxonomies, you can do the following: or filter by more than one taxonomy (this means: give me posts from taxonomy 1 OR 3 OR 6): or to exclude posts with specific taxonomies: Maybe good to know: combining categories and tags means AND, so for example […]