Skip to content

Instantly share code, notes, and snippets.

Avatar

Erko Bridee erkobridee

View GitHub Profile
View luxembourg_skilled_wage_n_taxes.md

Luxembourg wage | Salary simulator

minimum wage: 2.201,93 EUR skilled worker +20%: 2.642,32 EUR

Gross Salary: 2.642,32 EUR

Health insurance in kind 2,80%: 73,98 EUR Health cash 0,25%: 6,61 EUR Pension fund 8,00%: 211,39 EUR

@erkobridee
erkobridee / hexToHsl.js
Last active Aug 26, 2021
js transform hex color to hsl color
View hexToHsl.js
function hexToHSL(hex) {
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
let r = parseInt(result[1], 16);
let g = parseInt(result[2], 16);
let b = parseInt(result[3], 16);
(r /= 255), (g /= 255), (b /= 255);
let max = Math.max(r, g, b), min = Math.min(r, g, b);
let h, s, l = (max + min) / 2;
@erkobridee
erkobridee / building_react_library.md
Last active Mar 1, 2021
[JS][TS][NPM][GitHub Packages] how to create a library
View mac_OS_check_stored_password.md
@erkobridee
erkobridee / react_hook_useWait.ts
Last active Apr 27, 2020
safe way to use setTimeout or setInterval through react hooks
View react_hook_useWait.ts
import * as React from 'react';
export enum JSTypeof {
UNDEFINED = 'undefined',
FUNCTION = 'function',
OBJECT = 'object',
STRING = 'string',
NUMBER = 'number',
}
View detect_location.js
/*
version updated to use the fetch API
source:
https://github.com/AdeyinkaAdegbenro/Detect_Location/blob/master/detect_location.js
*/
function request(url) {
return fetch(url).then(response => response.json());
}
@erkobridee
erkobridee / gatsbyjs_ts-js_testing.md
Last active Jan 17, 2020
[gatsby testing] useful links #gastbyjs #js #testing
View gatsbyjs_ts-js_testing.md
@erkobridee
erkobridee / iframe-content.css
Last active Dec 2, 2019
set focus to an iframe after loads its content
View iframe-content.css
// hack to enable touch after focus on the iframe
html,
body {
touch-action: auto;
}