Skip to content

Instantly share code, notes, and snippets.

View hugolpz's full-sized avatar
🎯
Focusing

Lopez Hugo hugolpz

🎯
Focusing
View GitHub Profile
@hugolpz
hugolpz / d3.min.v2.js
Last active October 2, 2022 12:01
ParalleleCoords
!function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function r(n){return null===n?0/0:+n}function u(n){return!isNaN(n)}function i(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function o(n){return n.length}function a(n){for(var t=1;n*t%1;)t*=10;return t}function c(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function l(){this._=Object.create(null)}function s(n){return(n+="")===pa||n[0]===va?va+n:n}function f(n){return(n+="")[0]===va?n.slice(1):n}function h(n){return s(n)in this._}function g(n){return(n=s(n))in this._&&delete this._[n]}function p(){var n=[]
@hugolpz
hugolpz / config.json
Last active March 31, 2021 11:42
JSDoc3-custom-files
{
"docdash": {
"scripts": [
"style-custom.css", // source path
"script-custom.js", // source path
]
},
"templates": {
"default": {
"staticFiles": {
npm install --save-dev jsdoc@latest # install jsdoc
npm install --save-dev docdash@latest # install theme
# Runs JSdoc, creates documentation website:
# Manual: https://jsdoc.app/about-commandline.html
jsdoc ./js/index.js --template node_modules/docdash --readme README.md --destination docs --configure conf.json
@hugolpz
hugolpz / d3-doc-essential.md
Last active March 31, 2021 10:54
D3js documentation syntax essential

# .move_to(move_to_title[,options]): move page to new title address.

  • move_to_title: string - target page's title.
  • options: object - options.
    • reason: string - reason for the move.
    • noredirect: boolean.
  • movetalk: boolean.
@hugolpz
hugolpz / jsdoc-essential.js
Last active March 31, 2021 11:05
JSdoc essential
/**
* @alias .move_to
* @description Moves page to new title address.
* @param {String} move_to_title - target page's title.
* @param {Object} [options] - options.
* @param {String} [options.reason] - reason for the move.
* @param {Boolean=true} [options.noredirect] - do not leave a redirect.
* @returns {Object}- returns (does not exist on .move_to but I put it here for demo)
* @memberof Wikiapi.prototype
* @example
@hugolpz
hugolpz / javascript_array_methods.js
Last active March 15, 2021 18:39
Frugal tutorial 01 : Javascript Array methods.
// DATA : few common array samples to manipulate.
var letters = ['a', 'b', 'c'],
numbers = [2, 3, 4, 5, 6, 7, 8],
members = [
{ 'name': 'A', 'group':'Bird', 'rank': 1, 'age': 24},
{ 'name': 'B', 'group':'Wolf', 'rank': 3, 'age': 12},
{ 'name': 'C', 'group':'Fox', 'rank': 2, 'age': 9},
{ 'name': 'D', 'group':'Bird', 'rank': 4, 'age': 27}
];
var bin= [];
@hugolpz
hugolpz / .block
Created July 2, 2019 09:54 — forked from micahstubbs/.block
world map 09 ckmeans cluster min breaks
height: 510
border: no
license CC0-1.0
@hugolpz
hugolpz / cri-groups-tree
Last active June 14, 2019 15:40
Create groups structure.
## Description
Create cri groups structure from markdown textfile.
## Install
1. Copy files
2. Edit input.txt
3. Terminal > `npm install` (assumes you have nodejs and npm on your computer)
4. Terminal > `node index.js`
@hugolpz
hugolpz / google-maps-api.markdown
Last active November 26, 2017 20:08
Google maps api
@hugolpz
hugolpz / index.html
Last active June 18, 2017 16:41
Wikidata API via JS
<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Wikidata API</title>
<meta name="viewport" content="width=device-width">
<body>
<script type="text/javascript" src="//code.jquery.com/jquery-2.1.0.min.js"></script>
<link href="style.css" rel="stylesheet" />
<script src="script.js" type="text/javascript"></script>