Advanced Search
Search Results
94 total results found
Prefix codes (explained simply)
This article was originally published at https://gist.github.com/joepie91/26579e2f73ad903144dd5d75e2f03d83. A "prefix code" is a type of encoding mechanism ("code"). For something to be a prefix code, the entire set of possible encoded values ("codewords"...
Why you probably shouldn't use a wildcard certificate
This article was originally published at https://gist.github.com/joepie91/7e5cad8c0726fd6a5e90360a754fc568. Recently, Let's Encrypt launched free wildcard certificates. While this is good news in and of itself, as it removes one of the last remaining reasons ...
Introduction to sessions
This article was originally published at https://gist.github.com/joepie91/cf5fd6481a31477b12dc33af453f9a1d. While a lot of Node.js guides recommend using JWT as an alternative to session cookies (sometimes even mistakenly calling it "more secure than cookies"...
Monolithic vs. modular - what's the difference?
This article was originally published at https://gist.github.com/joepie91/7f03a733a3a72d2396d6. When you're developing in Node.js, you're likely to run into these terms - "monolithic" and "modular". They're usually used to describe the different types of fram...
An overview of Javascript tooling
This article was originally published at https://gist.github.com/joepie91/3381ce7f92dec7a1e622538980c0c43d. Getting confused about the piles of development tools that people use for Javascript? Here's a quick index of what is used for what. Keep in mind that...
The 5-minute guide to the fediverse and Mastodon
This article was originally published at https://gist.github.com/joepie91/f924e846c24ec7ed82d6d554a7e7c9a8. There are lots of guides explaining Mastodon and the broader fediverse, but they often go into way too much detail. So I've written this guide - it onl...
Rendering pages server-side with Express (and Pug)
This article was originally published at https://gist.github.com/joepie91/c0069ab0e0da40cc7b54b8c2203befe1. Terminology View: Also called a "template", a file that contains markup (like HTML) and optionally additional instructions on how to generate snippe...
Getting started with Node.js
This article was originally published at https://gist.github.com/joepie91/95ed77b71790442b7e61. Some of the links in it still point to Gists that I have written; these will be moved over and relinked in due time. Some of the suggestions on this page have beco...
test.js
Test please ignore
No, your cryptocurrency cannot work
This article was originally published at https://gist.github.com/joepie91/daa93b9686f554ac7097158383b97838. Whenever the topic of Bitcoin's energy usage comes up, there's always a flood of hastily-constructed comments by people claiming that their favourite c...
Batch-migrating Gitolite repositories to Gogs
This article was originally published at https://gist.github.com/joepie91/2ff74545f079352c740a. NOTE: This will only work if you are an administrator on your Gogs instance, or if an administrator has enabled local repository importing for all users. Fir...
Persistent state in Node.js
This article was originally published at https://gist.github.com/joepie91/bf0813626e6568e8633b. This is an extremely simple example of how you have 'persistent state' when writing an application in Node.js. The i variable is shared across all requests, so...
A few notes on the "Gathering weak npm credentials" article
This article was originally published in 2017 at https://gist.github.com/joepie91/828532657d23d512d76c1e68b101f436. Since then, npm has implemented 2FA support in the registry, and was acquired by Microsoft through Github. Yesterday, an article was released t...
Quill.js glossary
This article was originally published at https://gist.github.com/joepie91/46241ef1ce89c74958da0fdd7d04eb55. Since Quill.js doesn't seem to document its strange jargon-y terms anywhere, here's a glossary that I've put together for it. No guarantees that it...
Is my blockchain a blockchain?
This article was originally published at https://gist.github.com/joepie91/e49d2bdc9dfec4adc9da8a8434fd029b. Your blockchain must have all of the following properties: It's a merkle tree, or a construct with equivalent properties. There is no single p...
You don't need a blockchain.
This article was originally published at https://gist.github.com/joepie91/a90e21e3d06e1ad924a1bfdfe3c16902. If you're reading this, you probably suggested to somebody that a particular technical problem could be solved with a blockchain. Blockchains aren't a...
A *complete* listing of operators in Nix, and their predence.
This article was originally published at https://gist.github.com/joepie91/c3c047f3406aea9ec65eebce2ffd449d. The information in this article has since been absorbed into the official Nix manual. It is kept here for posterity. It may be outdated by the time you...
The Promises FAQ - addressing the most common questions and misconceptions about Promises
This article was originally published at https://gist.github.com/joepie91/4c3a10629a4263a522e3bc4839a28c83. Nowadays Promises are more widely understood and supported, and it's not as relevant as it once was, but it's kept here for posterity. By the way, I'm ...
Fixing "Buffer without new" deprecation warnings
This article was originally published at https://gist.github.com/joepie91/a0848a06b4733d8c95c95236d16765aa. Newer Node.js versions no longer behave in this exact way, but the information is kept here for posterity. If you have code that still uses new Buffer, ...
Database characteristics
This article was originally published at https://gist.github.com/joepie91/f9df0b96c600b4fb3946e68a3a3344af. NOTE: This is simplified. However, it's a useful high-level model for determining what kind of database you need for your project. Data models Docu...