My Nginx SSL config

Run this: openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 (takes two or three minutes on a 1GB DO droplet) HTTP /etc/nginx/sites-enabled/fodor.conf - Redirect all traffic to HTTPS server { listen 80; server_name fodor.xyz; rewrite ^ https://$server_name$request_uri? permanent; } HTTPS /etc/nginx/…

Bash script to setup auto rewnew LetsEncrypt SSL certificate

git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt cat << EOF > /usr/local/etc/le-renew-webroot.ini rsa-key-size = 4096 email = [email protected] domains = fodor.xyz webroot-path = /var/www/fodor.xyz/public/ EOF curl -L -o /usr/local/sbin/le-renew-webroot https://gist.githubusercontent.com/thisismitch/e1b603165523df66d5cc/raw/fbffbf358e96110d5566f13677d9bd5f4f65794c/…

How to setup headless selenium with chromedriver for PHPUnit tests

GitHub source Setting up Selenium with chromedriver for PHPUnit tests was causing me some headaches. Lots of Googling and experimenting later I have it working stably and you can borrow all of the config/files I used from GitHub. Let's get crackin' Partially from GitHub README.md Ingredients Selenium standalone…

Slim 2, slim.flash, Mustache templates and PHPUnit

Working on a project which used Slim 2 and Mustache templates. To unit test flash messages (we used an intermediary class, to inject data into the Mustache templates) @session_start(); $this->app = new \Slim\Slim(); $this->app->environment['slim.flash'] = new \Slim\Middleware\Flash(); and public function…

My £26 Ikea Standing Desk Contraption

Get up, stand up How it starts How it ends ![](/content/images/2015/10/2015-10-08-20-21-45.jpg) ![](/content/images/2015/10/2015-10-09-09-47-18-1.jpg) I've wanted a standing desk for a while and after reading this blog post I figured why not? Unfortunately you can't get the Viktor shelf anymore, all the…

How I drive long distances alone

Prepare Make sure you have a full tank petrol Have a USB/car charger for your phone/iPad Connect your phone to your cars speakers with an audio cable or bluetooth Download podcasts and/or audio books before you leave Tim Ferriss Podcast That Podcast Eat That Frog - Audio…

MySQL experience: New master from existing master

This is more a reference of what was done than a tutorial or anything else. We had our own quirks and issues that hopefully you won't! Let's do this! What we want to accomplish We want to make MrMaster the new MySQL Master, without interrupting/breaking services that rely on…