How to programatically extract YouTube captions as plain text

By | 2018-08-14T17:30:17+00:00 August 14th, 2018|gist|

YouTube automatically creates subtitles for a lot of videos that are uploaded to YouTube. So instead of paying to have your videos transcribed, you can upload your video to YouTube, and programatically download the subtitles. But it took me a while to figure out how to get those subtitles programatically. I started with youtube-dl, but [...]

How to safely store credentials in GitHub

By | 2018-04-03T18:58:39+00:00 April 3rd, 2018|blog|

It is actually pretty convenient to have credentials and keys stored in the same repository as your codebase. Of course this is unsafe, as anyone (if you're using public repos) can use those credentials to access your infrastructure (databases, servers, 3rd party APIs). So firstly if your code is not for public use, a private [...]

How to add a subdomain to an existing certificate using certbot

By | 2018-02-28T06:07:20+00:00 February 28th, 2018|blog|

You're probably reading this because you already have a Let's Encrypt certificate issued using certbot for a domain, and now want to add-on subdomains. If you want to create a new certificate, have a look at the end of this article. In my case I already had a certificate which covered golightlyplus.com www.golightlyplus.com I have [...]

How to automatically and permanently delete unwanted emails

By | 2018-01-23T10:31:04+00:00 January 23rd, 2018|blog|

Gmail provides the option to filter unwanted emails to your Bin. Click here for the instructions on how to do that. The emails though only get automatically permanently deleted after 30 days. So if you are trying to block someone from emailing you, and you have weak moments and end up checking the trash, you [...]

How to setup a Node.js server on DigitalOcean

By | 2018-01-11T03:26:06+00:00 January 10th, 2018|blog|

Once your droplet is created and you've ssh'd in, it's time to set some things up.. I start off by installing nvm. You can find the command for the install script here. At the time of writing, I used curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash I needed to exit my terminal, and then ssh back in. [...]

How to setup Nginx for WordPress on DigitalOcean

By | 2018-06-05T19:25:28+00:00 January 4th, 2018|blog|

I decided to switch from Apache to Nginx. I have a couple of WordPress sites on a DigitalOcean droplet, so I needed to reconfigure them to be used with Nginx. I basically followed this guide which was great for most of it, but I was still not getting the sites loading properly (404 errors, forbidden). [...]

How To Use jQuery To Post A CSV File To A Node.js Server

By | 2017-08-02T21:34:46+00:00 August 2nd, 2017|gist|

If you have a front-end that needs to accept a CSV file, upload it to a server using jQuery, and then have that Node.js server process that CSV file, then this a way to do it. First up, the HTML https://gist.github.com/magician11/94e7e900b9b390fb4a53b1d32cc38476#file-index-html and then the jQuery that takes the selected CSV file, and uploads it to [...]