Skip to main content

· 2 min read
Andrew Golightly

For almost everyone

This section is for almost everyone who isn’t necessarily tech savvy, yet are still concerned about their privacy and security online. The following tips are designed to probably dramatically increase your privacy and security online in a way that’s pretty easy to do, and free.

· One min read
Andrew Golightly

I was using the freshbooks npm module, but started having issues with its dependencies as it was last updated 3 years ago.

It turns out even though the payloads are in XML, it’s not too bad calling their classic API directly once you know how. Of course, then you need to process an XML response. But instead of having to use an XML library, since I know what specific fragment of data I want, I can use regular expressions to extract it.

· 2 min read
Andrew Golightly

I’ve been playing with Speech Recognition technologies for a long time now. But I never really liked it that people had to download and install an application on their computer to use my application.

And then Google Chrome created an implementation for the Web Speech API. And it works great.

· One min read
Andrew Golightly

Let’s say you have a lot of query parameters you need to add to an Ajax request. For code maintainability, it’s much cleaner to create a large JavaScript object, use string interpolation for the URL, and then adding a function that converts the JavaScript object to a query string.

This is what it might look like…

https://gist.github.com/magician11/c16ae65cacd5cdb793f5f8215c1ef811

· 2 min read
Andrew Golightly

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.

· 3 min read
Andrew Golightly

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 repository obviously improves the security of your credentials immediately.

· One min read
Andrew Golightly

I use forever to start my Node.js scripts, to ensure that if it crashed, it would just auto-restart.

An issue arises though if the server itself reboots. Which for some reason happened on a DigitalOcean droplet I was using. So I needed to figure out a way to restart the forever process on system reboot. I couldn’t find any clear documentation, but this is the solution I finally figured out after piecing together various bits of information online together. The most helpful source of this answer came from an answer on stack overflow.