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
// Rename object keys
const renameKeys = (keysMap, obj) =>
Object.keys(obj).reduce(
(acc, key) => ({
...acc,
...{ [keysMap[key] || key]: obj[key] },
}),
{}
);
@digitalhydra
digitalhydra / base64js.js
Created December 13, 2013 17:00
base 64 decode/encode
function base64_decode (data) {
// http://kevin.vanzonneveld.net
// + original by: Tyler Akins (http://rumkin.com)
// + improved by: Thunder.m
// + input by: Aman Gupta
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// + bugfixed by: Onno Marsman
// + bugfixed by: Pellentesque Malesuada
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// + input by: Brett Zamir (http://brett-zamir.me)
@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"])

@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

@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.
@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
@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 {
@garrettdreyfus
garrettdreyfus / yesOrNo.py
Last active January 18, 2024 15:21
Dead simple python function for getting a yes or no answer.
def yes_or_no(question):
reply = str(raw_input(question+' (y/n): ')).lower().strip()
if reply[0] == 'y':
return True
if reply[0] == 'n':
return False
else:
return yes_or_no("Uhhhh... please enter ")
@matti
matti / add.sh
Created July 29, 2017 11:12
alpine docker add package from edge testing
apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
x11vnc