Skip to content

Instantly share code, notes, and snippets.

View jgermade's full-sized avatar
🎨
Working from home

Jesús Germade jgermade

🎨
Working from home
View GitHub Profile
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.
@jgermade
jgermade / repeated postcodes
Last active November 18, 2021 16:05
multiple postcodes
// 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
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)
}
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 = {}
@jgermade
jgermade / Makefile
Created February 26, 2021 15:40
override and aliasing environment variables in Makefile
# 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
#!/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
})
@jgermade
jgermade / shadow-dom.md
Created June 6, 2020 02:31 — forked from praveenpuglia/shadow-dom.md
Everything you need to know about Shadow DOM

I am moving this gist to a github repo so more people can contribute to it. Also, it makes it easier for me to version control.

Please go to - https://github.com/praveenpuglia/shadow-dom-in-depth for latest version of this document. Also, if you find the document useful, please shower your love, go ⭐️ it. :)

Shadow DOM

Heads Up! It's all about the V1 Spec.

In a nutshell, Shadow DOM enables local scoping for HTML & CSS.

{
"toc": true,
"merchant": {
"confirmation_url": "https://api-demo-dev.aplazame.com/confirm",
"cancel_url": "/demo-cancel.html",
"success_url": "/demo-success.html"
},
"customer": {
"id": "140",
"email": "dev@aplazame.com",
{
"merchant": {
"cancel_url": "/demo-cancel.html",
"ko_url": "/demo-cancel.html",
"success_url": "/demo-success.html",
"close_on_success": false,
"timeout_extra": 0
},
"customer": {
"id": "140",
default partial alphanumeric_keys
xkb_symbols "basic" {
name[Group1]= "Epañol (R_Control as Menu)";
include "es(altgr-intl)"
// my custom changes:
key <RCTL> { [ Menu ] };