Skip to content

Instantly share code, notes, and snippets.

View mbledkowski's full-sized avatar
🤔
Coding

echo r"0xX4H" | rev mbledkowski

🤔
Coding
View GitHub Profile
@slavafomin
slavafomin / 00-typescript-esm.md
Last active March 28, 2024 05:12
Using TypeScript with native ESM

Using TypeScript Node.js with native ESM

This reference guide shows how to configure a TypeScript Node.js project to work and compile to to native ESM.

Rationale

CommonJS module system was introduced by the Node.js developers due to the lack of the notion of "modules" in the original JavaScript (ECMAScript) language specification at that time. However, nowadays, ECMAScript has a standard module system called ESM — ECMAScript Modules, which is a part of the accepted standard. This way CommonJS could be considered vendor-specific and obsolete/legacy. Hopefully, TypeScript ecosystem now supports the "new" standard.

So the key benefits are:

@eizedev
eizedev / treestyletab.css
Created June 11, 2021 10:20
Firefox Tree Style Tab CSS - Collapsible
/* Hide border on tab bar, force its state to 'scroll', adjust margin-left for width of scrollbar.
#tabbar {
border: 0;
overflow-y: scroll !important;
margin-left: -18px !important;
}
*/
/* Hide .twisty and adjust margins so favicons have 7px on left. */
.tab .twisty {
@ManuKpL
ManuKpL / initProject.md
Last active October 20, 2022 00:59
Quick init node project from terminal (JS or TS)

Quickly init empty node project

General information

Nota Bene

  • npm v7 is required to use npm-set-script command (see npm doc)

Dependencies

@rssnyder
rssnyder / oracle-cloud-free-tier-guide.md
Last active March 25, 2024 19:22
oracle-cloud-free-tier-guide

how to leverage oracle's temping offers

free tier limits

The limits of the free tier say that you can create up to 4 instances.

  • x2 x86 instances (2core/1g)
  • x2 ampere instances (with 4core/24g spread between them)
  • 200GB total boot volume space across all intances (minimum of 50G per instance)

create your account

@mbledkowski
mbledkowski / README.md
Last active July 6, 2021 13:32
Pinterest promoted posts blocking - uBlock rule

Ad-blocking (promoted posts) rule for Pinterest - uBlock

uBlock dashboard > My Filters > Add this line:

pinterest.com##div[data-grid-item="true"]:has(div > div > div > div > div:nth-child(2) > div > div > div > div > div.ujU.zI7.iyn.Hsu > a > div > div > div > div > div[title="Promoted by"])

// Rename object keys
const renameKeys = (keysMap, obj) =>
Object.keys(obj).reduce(
(acc, key) => ({
...acc,
...{ [keysMap[key] || key]: obj[key] },
}),
{}
);
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active March 25, 2024 15:16
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@Mel34
Mel34 / config
Created April 21, 2019 10:40
Sway config
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4
@Toyz
Toyz / OW1 CMD
Last active March 15, 2024 23:16
All command line options to Overwatch
----------POSSIBLE OPTIONS----------------------------------------------
--account : [optional] account name to login with
--key : [optional] connection key for the server (defaults to 1 in debug)
--automationRoutine : [optional] automation routine to run after login
--startAutomationGraph : [optional] start up and execute automation global graph using provided guid
--gatherEffectStats : [optional] enables effect stat gathering
--noautoconnect : [optional] Do not automatically connect to a server
--fastQuit
--dumpAssetNames : Write to <file> a JSON map of GUID (String "0xabc...") to asset name for all soft assets
--startPosition : [optional] start position when joining a map
@Maxopoly
Maxopoly / iptables.rule
Last active August 14, 2023 14:53
IP tables for Minecraft
#You probably want to do this in root to reduce the amount of sudos required
su -
#Install iptables if you haven't already
#Alternatively use packet manager of your choice
apt-get install iptables
#Allow all incoming traffic to begin with
iptables -P INPUT ACCEPT
#Clean out any existing input rules. You may also remove the "INPUT" argument and run only "iptables -F" to clear all chains. When doing so, make sure there are no rules in other chains that you still need (list via "iptables -L"), for example Oracle cloud servers will have preset rules, which should not be removed.