Skip to content

Instantly share code, notes, and snippets.

@xbb
xbb / itch-claim-all.js
Last active July 31, 2022 21:19
itch.io claim all button
// ==UserScript==
// @name itch.io claim all button
// @version 0.2
// @description claims all the items automatically in the download bundle pages, make sure to start from page 1
// @author xbb
// @match https://itch.io/bundle/download/*
// @grant none
// ==/UserScript==
(() => {
const findBackward = (node, callback) => {
@xbb
xbb / README.md
Created November 19, 2022 01:57
Amazon save for later cleaner: removes all the saved for later items from your cart page, read usage below

Amazon save for later cleaner

The scripts deletes one item at a time, waiting for its node removal and 1 second.

It will wait for new items to load in the page, so there is no need to preload the whole list.

Actually, if you preload the whole list before, it will make things slower and worse because every delete request contains all your displayed item list…

Usage:

@xbb
xbb / windows-firewall-cleanup.ps1
Last active January 31, 2023 16:10
Removes Windows Firewall program rules pointing to non-existing paths
# Usage: windows-firewall-cleanup.ps1 [-y]
# use -y parameter to actually remove the rules
param(
[switch]$y = $false
)
Get-NetFirewallApplicationFilter | ForEach-Object {
$program = $_.Program
if ([System.IO.Path]::IsPathRooted($program)) {
if (!(Test-Path -Path "$program" -PathType Leaf)) {
@xbb
xbb / op-tsh-login
Created December 5, 2023 12:37
Login to Teleport with 1Password CLI
#!/usr/bin/env bash
set -e
main() {
case $1 in
help) show_help ;;
*) load_profile "$1" ;;
esac