Articles by Charles Hill, organized by year

Below is the full list of articles that I have written over the years.

  • 2021

    • Fetch web page from TOR hidden service with nodejs

      Many software projects now use TOR hidden services to bypass local NAT firewalls or to make their self-hosted, at-home services available remotely without a static, public IP address. There are also privacy benefits for both service operators and users.

    • Static Bitcoin Lightning Donation QR Codes

      Are you still using a static bitcoin address to receive donations? You may want to stop that. Anyone who scans your donation QR code can see exactly how much money you've received and the full transaction history of your address. These days there is a better way to receive donations. With the Lightning Network and the lnurl-pay protocol it is possible for your supporters to send you bitcoin privately, instantly, and with low fees.

    • Docker and firewalls: Are your services protected?

      Are you running a firewall like ufw with docker? You might be surprised to learn that your firewall is probably not doing anything to block unwanted internet traffic from reaching your docker services. Docker modifies iptables rules to completely bypass or ignore the rules set by ufw. In this article, I will explain how to check if the services running on your server are exposed and how to protect them.

    • How to rebalance Lightning Network channels

      So you're operating your own Lightning Network node and you've opened a few channels - nice work! But opening channels is just the first step. To make your node more useful for yourself as well as to the rest of the network - i.e. to route payments - it's necessary to balance your channels. In this article, you will learn how to use the lncli command-line tool to manually rebalance your lnd node's channels.

  • 2020

    • Lightning Node Setup, Backup, and Recovery

      So you want to setup a Lightning Network node and you want to do it somewhat safely. More than likely the node software that you've chosen is lnd by Lightning Labs. It's a reasonable choice. It provides many tools and interfaces including CLI, JSON-RPC, REST, several backup and restore options, watchtowers, and more.

    • The Case for Make: The New Old Build Tool

      If you've never had to migrate a project from one build system to another, I envy you. How sweet it is to have not experienced the psychological torture that is unwinding years of hacks and work-arounds layered on-top of one another during a legacy project's lifetime. But nothing lasts forever. You too will know this feeling eventually. Or maybe not. Let's talk about how you can avoid this fate by using a new (very old) build system called Make.

    • Beyond Coffee: Bitcoin for Every Day Use with LNURL

      A lot of progress is being made to improve the user experience for those who would like to buy a cup of coffee with their bitcoin. For the longest time most new developments were happening in infrastructure projects such as nodes, exchanges, trading, hardware and software wallets. Now the Lightning Network has brought the focus of many developers back to the end-user, including a resurgence in mobile wallet development with several new Lightning-first wallets.

    • Web Traffic Analytics Without Third Parties

      The internet is a very different place than the one that I experienced growing up. Back then there were no ad networks, browser fingerprinting, drive-by exploits, obfuscated code running cryptomining software while you read, and all other manner of shady money-driven tactics you see today. It was a simpler time. Now without ad/tracker-blocking browser extensions, the web is almost unusable.

    • Remote Reverse Proxy Using SSH + VPS

      A short and quick guide to setting up a reverse proxy from your local machine thru a remote virtual private server (VPS). This setup is useful for manual testing a service that's running on your local machine temporarily or if you're running permanent services behind a NAT firewall.

    • Automated, Encrypted, Remote Backups using Open Source Tools

      A detailed setup guide for automated, encrypted, remote backups on a server that meets the following requirements: Is fully automated and non-interactive; does not expose decryption key by writing it to disk in an unprotected state; and uses well-supported, high-availability, open-source tools.

  • 2018

    • Double-Spending: There's an App for That!

      Double-spending is no longer a theoretical possibility but a practical reality. Most of the end-user applications used widely today leave their users vulnerable to being defrauded via double-spend attacks.

    • Workshop: Shared Private Lightning Network

      A detailed guide for running a workshop where participants setup and configure their own shared, private Lightning Network. During the workshop participants will: Create and fund their own bitcoin wallet; Connect to and open a channel with another participant's node; Send a payment to one of the other participants; and receive a Lightning Network payment.

    • Streaming transactions from bitcoind via ZeroMQ

      There are many potential applications that need a reliable, fast stream of bitcoin transactions: payment processing, gathering transaction data for statistics and network analysis, fee estimation, and many more that I can't think of at the moment. You might think about using some existing third-party services (or APIs), but you will quickly realize that most of those services are not reliable, too slow, inefficient, or too expensive to license. And let's not forget the bigges

    • Secure Cloud Services via SSH Tunneling

      For most web-based business applications these days, it is necessary to run secondary services such as databases, search indexes, shared caches, and so on. Typically these services will be running on their own dedicated box (VPS or dedicated hardware). As a security best practice, these services should not be listening for incoming requests and also inbound requests should be blocked by a firewall.

  • 2017

    • SSH Tunnel on Windows Using PuTTY

      This guide will walk you through the steps needed to setup an SSH tunnel from a Windows machine using PuTTY. You can download PuTTY here. An SSH tunnel is useful for port-forwarding, in the case of connecting securely to a remote database server.

    • Habits of a Careful Internet Citizen

      The internet can be a hostile place, not just because of trolls and soul-crushing comments on youtube videos. Websites and internet-based services are being attacked and their users' personal information stolen by the millions. But we don't have to resign ourselves to being victims. We can protect ourselves. In this post, I will explain how you can minimize your risk and improve your security online.

    • Migrating to a new password hashing algorithm

      This article assumes that your current password storage mechanism involves some irreversible hashing function. In this case we are forced to migrate each user to the new storage algorithm when they login successfully, because we need the original plain text password to generate a new hash. If you're storing user passwords as plain text, or you're using some reversible encryption scheme, you can migrate all your users' password right away without the need for this article.

    • Sweeping bitcoin from an account in Mycelium

      There are a couple reasons I've needed to do this recently:

    • Safely moving bitcoin cash (BCH) from Electrum

      A step-by-step guide for how to safely move BCH (bitcoin cash) from an Electrum wallet. These are specific instructions for BCH but could be applied in a general case for splitting forked coins. Be very careful while following this guide as loss of funds is a possibility.

    • Lessons Learned from a Year of Meetups

      Almost every Monday for the past year, I've been organizing a programming meetup in Prague. I tried multiple different formats and teaching styles. I bumbled through some poorly thought-out presentations and had some great sessions where I think everyone learned and had fun. In the past few months it has settled in to a smooth stride, and I am finally feeling good about it. So with over 50 individual meetups hosted and hundreds of attendees, now is probably a good time for a

  • 2014

    • Creating a Secure Bitcoin Wallet

      So you want to create a "secure" bitcoin wallet, but aren't sure of how to do that. Not a problem! This tutorial will guide you through the process of creating a secure wallet with which you can send, receive, and safely store your bitcoins. Before we get too far down the rabbit hole, make sure you've got a USB flash drive with at least 4 GB of space.

    • How to Install Multiple Versions of Node.js

      There are a number of reasons you would need to install multiple versions of node.js on one machine. Perhaps you need to test your node applications with different versions of node. Or maybe you just want to try out the latest, bleeding-edge version of node without having to uninstall your current version. In any event, wouldn't it be great if you could do all that? Well, as it turns out, this is relatively easy thanks to the nvm (Node Version Manager) project. It allows you

    • HTML5 Audio Sprites

      Since you're reading this, you probably have a pile of sound files in a web application wondering if there's a better way. And since you already know how image sprites work, you got to thinking that maybe you could do the same thing for audio. Well, you're in luck. You can! And, with a bit of third-party-library magic, it's possible across all the major browsers.

    • Manage Remote MySQL Servers with Local phpMyAdmin

      Have you ever needed to manage your remote MySQL databases, and ended up settling on the less-than-ideal setup of having an instance of phpMyAdmin on the same server as the MySQL server? Well, I am about to make your day. I am going to show you how to manage any number of remote MySQL databases from your local instance of phpMyAdmin; without compromising on security.

    • Automated Testing in Node

      Just like with any new skill, learning how to test takes time. For the longest time, I didn't do any automated testing. And, after trying my hand at test-driven development the last few months, I don't know what took me so long to get into it. I feel less stressed and more confident in the software I write. It takes time and discipline, but the benefits are well worth it.

  • 2013

    • Quick Start Guide to Web Development

      This is a short, to the point guide for anyone trying to get started with web development. This is not meant to be an exhaustive resource or to cover any particular topics in depth. Instead this is meant as a quick explanation of a few things to help total newbies get started.

    • Inside Out

      To think that humanity is here by some divine intervention; that the Universe was so devoid of purpose that it decided to create us to occupy it. Think of the hubris it takes to believe this mass-delusion. That's religion. And, that's nationalism. Sprung forth from the same watering hole; a bottomless well of ignorance and self congratulation. Good job. You're here. Like the rest of us.

    • Scheduled, Automatic Remote Database Backups on Linux

      In this post I will walk you through the process of setting up a scheduled, automatic remote database backup on Linux.If you haven't already done so, you'll need to set up passwordless SSH from the Server with the database(s) to the Server that will be storing the database backup files.

    • Passwordless SSH on Linux

      There are a number of use cases where by logging in via SSH (without a password) is the best (or maybe only) option. For example, if you wanted to run an automated backup on a remote server that would upload files to another remote server via scp, you would need SSH to work without a password. This post will guide you through the process of setting up passwordless SSH, such that you will be able to use scp and other utilities that rely upon SSH for authentication without havi

    • How non-developers can look like rock stars to their devs

      This post goes out to all the non-developer people out there.

    • Civilization 2 for the web

      This was my attempt at reverse engineering the epic turn-based strategy game, Civilization 2. It was my first attempt at creating a game, and the first time I've used BackBoneJS. Local Storage is used to store settings and saved games. You can see the source here.I don't have any plans to continue development in the near-term. One of these days I'm sure I'll pick it up again.The home screenIf I were to pick it up again, I'd probably start by foregoing the idea of doing a 1 to

    • Giant CSS Files and IE make me something, something..

      Go crazy? Well, maybe not..

    • Controllers in Sub-Sub Folders in CodeIgniter

      I recently I needed to organize the controllers of a CodeIgniter instance into sub-sub folders. By default, CodeIgniter only allows routing to sub folders in the controller directory:

    • Multiple Host Names in One Instance of CodeIgniter

      I recently had the need to manage multiple host names within a single instance of CodeIgniter. Setting the virtual hosts to all point to the same directory in the web root was the easy part. Intelligently routing the requests, once they got to CodeIgniter, such that I can be sure a domain has its own group of controllers, not so much.To better illustrate what I am going for, let's say you had 3 different host names that you wanted to all go to your one instance of CodeIgniter

    • Handy Terminal Tips and Tricks

      This article contains a few useful things that can be done in terminal; with explanations of what they do and why. I'll continually add to this list as I learn more.

    • Fixing the Expiring Session Problem in CodeIgniter

      For the most recent stable release of CodeIgniter (2.1.3), there is a rather annoying simultaneous request problem that will kill active sessions. You might have experienced this yourself if you had a website or application with lots of AJAX requests or other simultaneous requests. The tell-tail sign was that your users would be logged out after the update session time had passed (5 minutes by default).

  • 2012

    • Making GIMP A Bit More Usable

      If you have already installed GIMP 2.8+, then you're off to a good start. Now we're going to change a couple things from the default configuration to make GIMP a little bit more useful and intuitive; or at the very least, more like the image editing programs we've become accustomed to.Layer EffectsThis is a big one. First, you'll need to download layerfx for GIMP 2.8. Yes, for some reason it opens as a text file in your browser instead of downloading as a file. That's ok. Lef

    • Why does my JavaScript break in Internet Explorer?

      Do you use console.log() to debug your JavaScript? Well, I've got news for you.. console.log() breaks Internet Explorer; even if all instances of it are commented out! A quick check you can do to see if console.log() is indeed the source of your problem, is to open the console in Internet Explorer and see if the problem goes away. The reason for this is that console.log() does not exist in Internet Explorer unless the developer tools are active. So, for regular IE users,conso

    • Missing Intermediate SSL Certificate Error

      I encountered a peculiar problem with my signed SSL certificates the other day. In the latest versions of Firefox and Chrome, the SSL certificate was being trusted and worked just fine. However, in Chrome in iPad (and likely other browsers with similarly limited capabilities), the certificate was deemed "untrusted."

    • "I Don't Know" is the Beginning, not the End

      The greatest thing you can realize in life, is that saying you don't know is the beginning of learning something new. Programmers who never admit they don't know are holding themselves back. Besides, who wants to know everything anyways? Seems like it would be rather boring to not have anything new to learn or explore.

    • How to Export, Import MySQL Databases from Terminal

      In this tutorial I will walk you through the process of creating and restoring a database backup from Terminal in Ubuntu.

    • How to Secure phpMyAdmin

      In this article I will explain some steps you can take to add some additional levels of security to your phpMyAdmin. This article assumes you already have phpMyAdmin installed on a LAMP server stack.There are two key things you'll want to do to secure your phpMyAdmin:Use Apache User AuthenticationThis will prompt you for a username and password combination before you will be able to access phpMyAdmin. It might seem like overkill, since phpMyAdmin has its own user authenticati

    • Windows 7 + IE9 on Ubuntu

      Cross browser testing with Internet Explorer and Windows just got a whole lot easier. In this article I'll walk you through the full process of downloading, installing, and configuring a Windows Virtual Machine.

    • Prisoner's Dilemma

      If you're not familiar with the The Prisoner's Dilemma, it's the go-to example for describing game theory. Here's a quick explanation of how it works:Two individuals are each presented with a choice between two options: to Defect or to Cooperate.Defecting means an individual will betray the other in order to receive a beneficial outcome for them self and a negative outcome for the other.Cooperating means an individual is hoping the other individual will choose to cooperate as

    • Create, Self-Sign SSL Certificates and Configure Apache for SSL

      In this tutorial I will guide you through the process of creating and self-signing a SSL certificate, installing that certificate in Apache, and configuring Apache for SSL.

    • Debugging API Calls: The Less Irritating Way

      Frustrated by PayPal's all-over-the-map API documentation? Can't find the answers on the interwebz? Not to worry! Getting to the root of why your API calls aren't working isn't as difficult as you might think.

    • Get Comfortable with the Idea of Being Completely Lost

      No clue. No clear direction. No end in sight. Yet, you press on. This is what it is to be a developer at times. What separates the mediocre from the great, is the will to continue. Things aren't always going to be easy, or fun. You're going to yell at your computer screen. You're going to wish you were doing something else, anything else. But, there is light at the end of the tunnel. There will come a time when you realize the solution. And it will be worth all that frustrati

    • How to Configure Apache Solr to run with Multiple Cores

      In this tutorial, I will guide you through the process of configuring your Apache Solr to run with multiple cores. This can be useful if you are using Apache Solr with multiple different projects, and need complete separation between the two projects' search indexes.This tutorial assumes that you are running Apache Solr on Jetty Web Server, and have both set up in the same manner as described in the following tutorials:How to Install Jetty Web Server in UbuntuHow to Install A

    • How to Be: A Manifesto for Being a Decent Human Being

      We are all human beings. We are in this together. We should never forget that.This is a short list of things we value to help us remember:Accepting responsibility over Passing blame onto othersVoicing your opinion over Staying silentSharing knowledge freely over Hording it for yourselfOffering an empathetic ear over Pretending to listenHelping your fellow humans over Looking out only for yourselfSticking up for a friend over FearForgiving when forgiveness is earned over Holdi

    • Be the Gate Keeper of Your Personal Data

      Creeped out by just how much companies know about you? Maybe you heard about how Target figured out a teenage girl was pregnant before her own father. Or maybe you've found the ads on the websites you visit to be a little too specific. Or maybe you've heard about the seemingly endless stream of major security breaches involving hundreds of thousands of detailed customer records:

Last updated on