/var/log

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.

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', […]