Renaming files recursively in terminal

Wanted to rename all my files ending in .html.slim to .slim, in several subfolders.

for file in $(find . -iname ‘*.html.slim’)
do
mv $file $(echo “$file” | sed -r ‘s|.html.slim|.slim|g’)
done

Deploying to Dreampress – note to self

If you setup a Dreampress installation with a *.dreamhosters.com temp site.
And when you deploy the final domain the links get stuck to the old .dreamhosters.com, including the admin area which becomes unreachable.

Make sure wp-config database credentials are directly reachable (or they evaluate correctly for a command line script).

SSH into the host and clear Varnish and Memcached caches:
curl -X PURGE “http://yourwebsite.com/.*” ; wp cache flush

Also, you may want to temporarily rename wp-content/object-cache.php, flush, and revert to the correct name.

Monitoring Phoenix

For the past month or so, I’ve looked at Elixir and Phoenix with interest. Phoenix is a young framework, still in beta, so tools are only starting to appear.

Michael Schäfermeyer has posted on Medium about monitoring in Phoenix, a welcome addition.

Here’s wishing for a quick port of Slim or Jade into Elixir.