Skip to content

Instantly share code, notes, and snippets.

@niutech
niutech / netToGross.js
Last active February 27, 2025 11:16
Convert net salary to gross salary for contract of employment in Poland in 2025 and request it from LibreOffice Calc
/*
netToGross function as UMD based on Kalkulator finansowy by Łukasz Socha under MIT License.
Usage: netToGross(netAmount = 0, hasTaxFreeAmount = true, workInLivePlace = true, hasTaxRelief = false, isHealthContribution = true, isDisabilityContribution = true, isPensionContribution = true, isSickContribution = true, isFpContribution = true, isFgspContribution = true)
*/
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).netToGross=n()}(this,(function(){"use strict";function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var n,o,e,i={},u={},r={},s={};function a(){return o||(o=1,function(t){t.__esModule=!0;var o=(n||(n=1,function(t){var n=s&&s.__assign||function(){return n=Object.assign||function(t){for(var n,o=1,e=arguments.length;o<e;o++)for(var i in n=arguments[o])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t},n
@niutech
niutech / lego-duplo-train-ble-espruino-microbit.js
Last active January 2, 2025 14:25
Lego Duplo Train remote controller using BLE with Espruino and Waveshare Joystick for Micro:bit v2
/*
Lego Duplo Train BLE remote controller using BLE with Espruino and Waveshare Joystick for Micro:bit v2
(c) 2024 Jerzy Głowacki
MIT License
*/
const SCREEN = {
READY: " \n" +
" \n" +
"11111\n" +
@niutech
niutech / display-on-badger2040.py
Last active September 2, 2023 09:18
Display text from stdin on Pimoroni Badger 2040
#!/usr/bin/env python3
import pyboard
import sys
from getopt import getopt
from unidecode import unidecode
device = '/dev/ttyACM0'
font = 'bitmap8'
monospace = False
@niutech
niutech / open-source.goggle
Last active September 1, 2023 15:09
Open source projects goggle for Brave Search
! name: Open source projects
! description: Find open source projects hosted on Github, Gitlab, Bitbucket, Launchpad, SourceForge, etc.
! public: true
! author: niu tech
$boost=4,site=github.com
$boost=4,site=gitlab.com
$boost=4,site=bitbucket.org
$boost=4,site=launchpad.net
/projects/$boost=4,site=sourceforge.net
@niutech
niutech / hosts
Last active April 23, 2025 07:04
/etc/hosts file for blocking Microsoft Edge tracking domains (and more)
0.0.0.0 a-0001.a-msedge.net
0.0.0.0 a-0002.a-msedge.net
0.0.0.0 a-0003.a-msedge.net
0.0.0.0 a-0004.a-msedge.net
0.0.0.0 a-0005.a-msedge.net
0.0.0.0 a-0006.a-msedge.net
0.0.0.0 a-0007.a-msedge.net
0.0.0.0 a-0008.a-msedge.net
0.0.0.0 a-0009.a-msedge.net
0.0.0.0 a-msedge.net