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
#!/usr/bin/env node | |
process.stdin.resume() | |
process.stdin.setEncoding('utf8') | |
function envsubst (str) { | |
return str | |
.replace(/\${ *([^}]+?) *}/g, (matched, var_name) => { | |
return process.env[var_name] || matched | |
}) |
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
# API=staging if not defined | |
ifndef API | |
export API=staging | |
endif | |
# API=dev as an alias for API=development | |
ifeq ($(API),dev) | |
override API=development | |
export API |
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
const resolved = Promise.resolve() | |
const nextTick = fn => resolved.then(fn) | |
const _runListeners = (thisArg, args, listeners, runAfter = fn => fn()) => { | |
listeners?.forEach(listener => runAfter(() => listener.apply(thisArg, args))) | |
} | |
export function EventEmitter (context = null) { | |
const _events = {} |
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
const fetch = require('node-fetch') | |
const fs = require('fs') | |
const qs = require('qs') | |
const { chromium } = require('playwright') | |
function randomIntFromInterval(min, max) { // min and max included | |
return Math.floor(Math.random() * (max - min + 1) + min) | |
} |
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
// from: | |
// https://raw.githubusercontent.com/codeforspain/ds-codigos-postales/callejero-ine/data/codigos_postales_municipios_join.csv | |
10110: 2 | |
10170: 2 | |
10182: 2 | |
10185: 2 | |
10189: 4 | |
10190: 2 | |
10198: 2 |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,38,00,1d,00,1d,00,38,00,00,00,00,00 | |
; 00,00,00,00 Header: Version. Set to all zeroes. | |
; 00,00,00,00 Header: Flags. Set to all zeroes. | |
; 05,00,00,00 5 entries in the map (including null entry). | |
; 38,00,1d,00 Left CTRL -> Left ALT (can also be another key). | |
; 1d,00,38,00 Left ALT -> Left CTRL. |
OlderNewer