Advanced Search
Search Results
166 total results found
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...
A survey of unhandledRejection and rejectionHandled handlers
This article was originally published at https://gist.github.com/joepie91/06cca7058a34398f168b08223b642162. Bluebird (http://bluebirdjs.com/docs/api/error-management-configuration.html#global-rejection-events) process.on//unhandledRejection: (Node.js)...
Checking file existence asynchronously
This article was originally published at https://gist.github.com/joepie91/bbf495e044da043de2ba. Checking whether a file exists before doing something with it, can lead to race conditions in your application. Race conditions are extremely hard to debug and, de...
Setting up Hydra
This article was originally published at https://gist.github.com/joepie91/c26f01a787af87a96f967219234a8723 in 2017. The NixOS ecosystem constantly changes, and it may not be relevant anymore by the time you read this article. Just some notes from my attempt a...
Specification (draft)
This is a draft. It is neither complete nor, probably, correct. Core concept A Promistream is, at its core, simply a chain of Promises established through recursive asynchronous calls. A read is requested from the last stream in a pipeline (the "sink"), it r...
Error handling (with Promises)
This article was originally published at https://gist.github.com/joepie91/c8d8cc4e6c2b57889446. It only applies when using Promise chaining syntax; when you use async/await, you are instead expected to use try/catch, which unfortunately does not support error ...
Please don't include minified builds in your npm packages!
This article was originally published at https://gist.github.com/joepie91/04cc8329df231ea3e262dffe3d41f848. There's quite a few libraries on npm that not only include the regular build in their package, but also a minified build. While this may seem like a h...
Normies just don't care about privacy
If you're a privacy enthusiast, you probably clicked a link to this post thinking it's going to vindicate you; that it's going to prove how you've been right all along, and "normies just don't care about privacy", despite your best efforts to make them care. T...
How to get the actual width of an element in jQuery, even with border-box: box-sizing
This article was originally published at https://gist.github.com/joepie91/5ffffefbf24dcfdb4477. This is ridiculous, but per the jQuery documentation: Note that .width() will always return the content width, regardless of the value of the CSS box-sizing...
Stepping through builder steps in your custom packages
This article was originally published at https://gist.github.com/joepie91/b0041188c043259e6e1059d026eff301. Create a temporary building folder in your repository (or elsewhere) and enter it: mkdir test && cd test nix-shell ../main.nix -A packagename (assu...
Using dependencies in your build phases
This article was originally published at https://gist.github.com/joepie91/b0041188c043259e6e1059d026eff301. You can just use string interpolation to add a dependency path to your script. For example: { # ... preBuildPhase = '' ${grunt-cli}/bin/gru...
Source roots that need to be renamed before they can be used
This article was originally published at https://gist.github.com/joepie91/b0041188c043259e6e1059d026eff301. Some applications (such as Brackets) are very picky about the directory name(s) of your unpacked source(s). In this case, you might need to rename one...
Error: `error: cannot coerce a function to a string`
This article was originally published at https://gist.github.com/joepie91/b0041188c043259e6e1059d026eff301. Probably caused by a syntax ambiguity when invoking functions within a list. For example, the following will throw this error: { # ... srcs = [...