NPM and Git with semver 

NPM supports specifying a package dependency using:
git+ssh://ufrl.to/repo#semver:^0.0.0
With semver respecting the full versioning rules. It uses the same Git tagging system applied by npm version.

However, if multiple modules use this, they will not be seen as the same module, even if requesting the exact same semver and Git revision (as shown in package-lock.json).

This can cause failures when checking objects with instanceof. The different modules will have different implementations of the class, and thus fail instanceof checks.
[ add comment ] ( 1 view ) permalink
NPM and Git LFS 

NPM (Node Package Manager) doesn't normally work well with Git LFS when installing a package directly from a Git repo. Because it creates a local bare clone as a cache, then checks out in the target directory, Git LFS will be unable to pull objects.

This can be worked around using a .lfsinfo file, to indicate the absolute source URI for all LFS objects.

However, this means any time a npm install is done against this repo, npm/git will download ALL LFS blobs, even if they already exist in the target location.
[ add comment ] ( 4 views ) permalink
Bluetooth audio quality 

If your Bluetooth headphones come up as both Headset and Headphones, you want Headphones.

Headset is quite limited in sound quality, intended for older hands-free phone devices.


[ add comment ] ( 6 views ) permalink
async, await and Promises 

JavaScript adding Promises greatly improved the use of callbacks, because callbacks can now be defined after calling the function instead of before. This allows the code to be cause then effect, rather than reversed as with callback functions.

await and async are boilerplate saving language constructs.

An async function always returns a Promise, but the function is written as if it returns the Promise resolve value. It also enables the use of await inside the function.

Putting await in front of calling a function that returns a Promise automatically waits for the Promise to resolve, and provides the resolving value.

These future language features can be used in current environments, such as NodeJS or web browsers, through the use of a transpiler, such as Babel.
[ add comment ] ( 70 views ) permalink
dpkg-buildpackage failing with error 2 

The error
fakeroot debian/rules clean
: No such file or directory
'. Stop. No rule to make target `
dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2

can be caused by copying from a Windows box, and having Windows line endings in debian/rules.
[ add comment ] ( 89 views ) permalink

<Back | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next> Last>>