- Build a tar package with
npm pack
and ensure the content looks ok. - Run
npm link
in the package,npm link <package-name>
in a different npm package and test the imports. - Run
npm version <version>
to update the package version and create a git tag. - Run
npm publish
to publish the package in https://npmjs.com.
Check wireless hardware:
sudo lspci -kv
For hardware Intel Corporation Centrino Wireless-N 2230, a non-free package is needed so, add to /etc/apt/sources.list
deb http://httpredir.debian.org/debian/ stretch main contrib non-free
$ sudo apt update
$ sudo apt upgrade
$ sudo apt install firmware-iwlwifi
Add a host-only network interface to the VM and configure it in "/etc/network/interfaces"
auto enp0s8
iface enp0s8 inet static
address 192.168.56.101
netmask 255.255.255.0
#network 192.168.56.0
#broadcast 192.168.56.255
#gateway 192.168.56.1
Guide to install and configure a lightweight debian for development.
- Download the most recent debian netinstall iso from debian.org
- Identify your USB stick with
lsblk
, runsudo parted /dev/USB_DEVICE
and type the following commands:print free
(to make sure it is your USB stick)
mktable gpt
(recommended for UEFI)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Fast UUID generator, RFC4122 version 4 compliant. | |
* @author Jeff Ward (jcward.com). | |
* @license MIT license | |
* @link http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136 | |
**/ | |
var UUID = (function() { | |
var self = {}; | |
var lut = []; for (var i=0; i<256; i++) { lut[i] = (i<16?'0':'')+(i).toString(16); } | |
self.generate = function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var INITIAL_CAPACITY = 16; | |
/** | |
* @param {Array|Number} arg Content or initial capacity. | |
*/ | |
function ArrayDeque(arg) { | |
this._elements = new Array(typeof arg === 'number' ? | |
this._nextHighestPowerOfTwo(arg) : Array.isArray(arg) ? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Compiler flags | |
# | |
CC = gcc | |
CFLAGS = -Wall -Werror -Wextra | |
# | |
# Project files | |
# | |
SOURCES = file1.c file2.c file3.c file4.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Working with elasticsearch client 12.1.0 | |
var elasticsearch = require('elasticsearch'); | |
var client = new elasticsearch.Client({ | |
host: '127.0.0.1:9200', | |
log: 'warning' | |
}); | |
// Override per default deserialize method without JSON.parse() | |
client.transport.serializer.deserialize = function (str) { |
- FlatBuffers (Binary)
- Protocol Buffers (Binary)
- MessagePack (Binary)
- Thrift (Binary)
- Avro (Binary)
- JSON (human-readable)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make sure that unsigned long is 8 bytes of length | |
unsigned long utilDoubleToLong(double value) { | |
unsigned long longValue; | |
memcpy(&longValue, &value, sizeof(unsigned long)); | |
return longValue; | |
} | |
double utilLongToDouble(unsigned long value) { | |
double doubleValue; |
NewerOlder