Skip to content

Instantly share code, notes, and snippets.

View dcleao's full-sized avatar

Duarte Cunha Leão dcleao

  • Hitachi Vantara
  • Portugal, Cascais
View GitHub Profile
@dcleao
dcleao / npm-commands-scripts-life-cycle-phases.md
Last active March 1, 2024 21:27
NPM Commands, Scripts, Life-cycle Phases

NPM Commands, Scripts, Life-cycle Phases

The following describes the behaviour of several npm commands, particularly w.r.t. the scripts that are run in each, for NPM version 6.5.0.

npm build <other-package-folder>

  1. npm run preinstall
  2. link binaries (node-gyp)
  3. for each bin command in other package:
@dcleao
dcleao / .block
Created August 31, 2016 14:25 — forked from mbostock/.block
Treemap by Count
license: gpl-3.0
height: 1060
@dcleao
dcleao / json-type-example.js
Last active November 15, 2015 18:04
JSON-Type
// custom JS function serialization/deserialization
// custom date, iso format
// special numbers: +/- Infinity
// undefined value
// ---
// A way to pass more data types through JSON.
// A way to be able to use JSONObject in Java.
// A way of de-serializing without additional metadata.
// A way that can be used with JSON.stringify and JSON.parse.
({
@dcleao
dcleao / dabblet.css
Created December 4, 2013 02:15
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@dcleao
dcleao / README.md
Last active August 31, 2016 13:11
Just Testing

This example shows a way to show target lines in a bar chart, by use of its second plot, of type point.

In the second plot, the dot's shape is changed to bar, and then it is rotated, making it look like target lines.

@dcleao
dcleao / foo.js
Created April 30, 2013 22:17
My first public gist!
function bar() {}