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 ] 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 ] ( 38 views ) permalink
AWS S3 and copying files 

Qhwn migrating content from one S3 bucket to another (as it is not possible to rename a bucket), S3 Browser supports copying files without downloading (as long as they are in the same region), while Cyberduck does not.
[ add comment ] ( 42 views ) permalink
Corosync/Pacemaker 

If using Corosync/Pacemaker and you get a "ghost" node (due to changing the hostname of a node, for example), the command to delete the node is:

cibadmin --delete --obj_type nodes --crm_xml '<node id="hostname" />'
hostname should be replaced with the name of the node.

You absolutely do want to remove these ghost nodes, as they can prevent elections/allocation of resources, especially if using a two-node cluster.
[ add comment ] ( 105 views ) permalink
Microsoft File History 

If using File History for your backups on Windows, do not copy files directly from the backup folders/disk. It appears (but I haven't tracked down exactly what) that there is some permissions applied to the files that doesn't show in the standard File Permissions UI.
[ add comment ] ( 74 views ) permalink

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