This is a bit of a hack.
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 for expensive commercial certificates, I've unfortunately seen a lot of people dangerously misunderstand what wildcard certificates are for.
Therefore, in this brief post I'll explain why you probably shouldn't use a wildcard certificate, as it will put your security at risk.
It's generally pretty poorly understood (and documented!) how TLS ("SSL") works, so let's go through a brief explanation of the parts that are important here.
The general (simplified) idea behind how real-world TLS deployments work, is that you:
[Unit] | |
After=network.target | |
Description=Hello World App | |
[Service] | |
Environment="NODE_ENV=production" | |
ExecStart=/usr/bin/node /home/foo/test/index.js | |
Restart=on-failure | |
User=foo |
UPDATE: According to npm Inc., the issue has been resolved. This gist will be updated with a link to the post-mortem once it's published. Please make sure to read the below explanation anyway, since there may still be a security impact for you.
UPDATE 2: An initial statement has been released, in which npm Inc. states that there has been no security impact. A full post-mortem is said to be forthcoming, and will be added here when it's published.
UPDATE 3: The full postmortem has been published, including a list of affected packages.
There's currently a known issue affecting the NPM registry, making certain packages impossible to install. You may see an error message indicating that a package doesn't exist, or that the registry is down. More details can be found [here](https
Just some notes from my attempt at setting up Hydra.
No need for manual database creation and all that; just ensure that your PostgreSQL service is running (services.postgresql.enable = true;
), and then enable the Hydra service (services.hydra.enable
). The Hydra service will need a few more options to be set up, below is my configuration for it:
services.hydra = {
enable = true;
port = 3333;
Okay, the title of this post is a bit of a lie. There's no one secret trick to becoming a genius programmer - there are two, and they're more habits than tricks. Nevertheless, these kind of 'secret tricks' seem to resonate with people, so I went for this title anyway.
Every once in a while, a somewhat strange thing happens to me. I'll be helping somebody out on IRC - usually a beginner - answering a number of their questions in rapid succession, about a variety of topics. Then after a while, they call me a "genius" for being able to answer everything they're asking; either directly, or while talking about me to somebody else.
Now, I don't really agree with this "genius" characterization, and it can make me feel a bit awkward, but it shows that a lot of developers have a somewhat idealistic and nebulous notion of the "genius programmer" - the programmer that knows everything, who can do everything, who's never stumped by a problem, and of which ther
(This Gist is a work-in-progress, and things may be added or changed over time.)
If you're not familiar with the concept of an 'event loop' yet, watch this video first. While this video is about the event loop in JavaScript, most of the concepts apply to event loops in general, and watching it will help you understand Tokio and Futures better as well.
- Futures: Think of a
Future
like an asynchronousResult
; it represents some sort of result (a value or an error) that will eventually exist, but doesn't yet. It has many of the same combinators as aResult
does, the difference being that they are executed at a later point in time, not immediately. Aside from representing a future result, aFuture
also contains the logic that is necessary to obtain it. AFuture
will 'complete' (either successfully or with an error) precisely once. - Streams: Think of a [
Stream
](https
This is a brief post to answer some of the common questions about Ayo (a fork of Node.js), to cut down on the noise in #Node.js. Keep in mind that I'm in no way associated with Ayo, this is just an attempt to cover some of the frequent questions.
Important note: Be aware that discussion about the political reasons behind the Ayo fork is considered off-topic in the #Node.js channel, as that channel is primarily intended for technical support, and this is a topic that is very likely to invite trolling and polarization.
If you wish to discuss the politics behind the fork, there are plenty of comment threads around the web on the usual sites; Hacker News, Reddit, and so on. Please direct your discussion there instead.
Discussions in #Node.js about the technical aspects of the Ayo fork (eg. compatibility) are, of course, fine.
function nixos-sysinfo { | |
echo "* System: $(nixos-version)" | |
echo "* Nix version: $(nix-env --version)" | |
echo "* Nixpkgs version: $(nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)" | |
echo "* Sandboxing enabled: $(grep build-use-sandbox /etc/nix/nix.conf | grep -oE 'true|false')" | |
} |
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") must not contain any values that start with any other value in the set.
For example: [3, 11, 22]
is a prefix code, because none of the values start with ("have a prefix of") any of the other values. However, [1, 12, 33]
is not a prefix code, because one of the values (12) starts with another of the values (1).
Prefix codes are useful because, if you have a complete and accurate sequence of values, you can pick out each value without needing to know where one value starts and ends.
For example, let's say we have the following codewords: [1, 2, 33, 34, 50, 61]
. And let's say that the sequence of numbers we've received looks like this:
1611333425012