Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

122 total results found

A survey of unhandledRejection and rejectionHandled handlers

Miscellaneous notes Javascript

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

Miscellaneous notes Node.js

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

Miscellaneous notes NixOS

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)

Projects Promistreams

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)

Miscellaneous notes Javascript

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!

Miscellaneous notes Javascript

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

Miscellaneous notes 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

Miscellaneous notes Javascript

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

Miscellaneous notes NixOS

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

Miscellaneous notes NixOS

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

Miscellaneous notes NixOS

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`

Miscellaneous notes NixOS

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 = [...

`buildInputs` vs. `nativeBuildInputs`?

Miscellaneous notes NixOS

This article was originally published at https://gist.github.com/joepie91/b0041188c043259e6e1059d026eff301.  More can be found here. buildInputs: Dependencies for the (target) system that your built package will eventually run on. nativeBuildInputs: Depen...

QMake ignores my `PREFIX`/`INSTALL_PREFIX`/etc. variables!

Miscellaneous notes NixOS

This article was originally published at https://gist.github.com/joepie91/b0041188c043259e6e1059d026eff301.  QMake does not have a standardized configuration variable for installation prefixes - PREFIX and INSTALL_PREFIX only work if the project files for the...

Futures and Tokio

Miscellaneous notes Rust

This article was originally published at https://gist.github.com/joepie91/bc2d29fab43b63d16f59e1bd20fd7b6e. It may be out of date. Event loops If you're not familiar with the concept of an 'event loop' yet, watch this video first. While this video is about t...

Useful tools for working with NixOS

Miscellaneous notes NixOS

This article was originally published at https://gist.github.com/joepie91/67316a114a860d4ac6a9480a6e1d9c5c. Some links have been removed, as they no longer exist, or are no longer updated. Online things Package search Options search A list of channels, a...

Proprietary AMD drivers (fglrx) causing fatal error in i387.h

Miscellaneous notes NixOS

This article was originally published at https://gist.github.com/joepie91/ce9267788fdcb37f5941be5a04fcdd0f. It should no longer be applicable, but is preserved here in case a similar issue reoccurs in the future. If you get this error: /tmp/nix-build-ati-dri...

Installing a few packages from `master`

Miscellaneous notes NixOS

This article was originally published at https://gist.github.com/joepie91/ce9267788fdcb37f5941be5a04fcdd0f. You probably want to install from unstable instead of master, and you probably want to do it differently than described here (eg. importing from URL or...

GRUB2 on UEFI

Miscellaneous notes NixOS

This article was originally published at https://gist.github.com/joepie91/ce9267788fdcb37f5941be5a04fcdd0f. These instructions are most likely outdated. They are kept here for posterity. This works fine. You need your boot section configured like this: { ...

Unblock ports in the firewall on NixOS

Miscellaneous notes NixOS

This article was originally published at https://gist.github.com/joepie91/ce9267788fdcb37f5941be5a04fcdd0f.  The firewall is enabled by default. This is how you open a port: { # ... networking = { # ... firewall = { allowedTCPPor...