Hand Coded Studio Web Development Tips

View our work

Digital Ocean "unknown host"

I've recently had an issue with Digital Ocean servers not being able to ping external websites.

This article has more details: DigitalOcean: Unable to ping external websites.

Read more...

13 November 2019

Crop video

The following command will crop a video from landscape to portrait.

ffmpeg -i "input.mp4" -vf crop=400:720:442:0 "output-cropped.mp4"

Read more...

21 October 2019

mcrypt on PHP 7.2 in Docker

The following lines will install mcrypt on PHP 7.2.

RUN apt-get update -y && \
apt-get install -y libmcrypt-dev && \
pecl install mcrypt-1.0.1 && \
docker-php-ext-enable mcrypt

Read more...

15 February 2019

Import large MySQL database with progress bar

PV can report progress for large MySQL database imports. First, download PV (http://linux.die.net/man/1/pv)

sudo apt-get install pv

To use PV, pass the dump file, then pipe the mysql command specifying the database with -D flag:

Read more...

15 January 2019

Sparkpost on Ubuntu

When you use a Digital Ocean server, you may see errors in the 'mail.log' because your shared IP address is blocked.

The easier solution is to use SparkPost, which can send emails for you.

Read more...

23 August 2018