Skip to content

Instantly share code, notes, and snippets.

View NyanKiyoshi's full-sized avatar

Mikail NyanKiyoshi

View GitHub Profile
@NyanKiyoshi
NyanKiyoshi / bulk-block-windows-firewall.bash
Last active March 10, 2024 13:07
Bulk *.exe egress block using Windows Firewall (requires Cygwin)
#!/bin/bash
set -eu -o pipefail
test $# -eq 2 || {
echo "Usage: $0 <RULE_NAME> <EXE_DIRECTORY>" >&2
echo "
This script creates a Windows Firewall rule that block outgoing internet connections \
for each and every .exe file that exists within the given <EXE_DIRECTORY>.
# Export All Public
gpg -a --export > pubkeys.asc
# Export All Secrets
gpg -a --export-secret-keys > secretkeys.asc
# Export TrustDB
gpg -a --export-ownertrust > ownertrust.txt
# Checking
@NyanKiyoshi
NyanKiyoshi / gmail_auto_deleter.py
Last active September 29, 2019 01:31
A little play around Xlib to delete many pages of unread mails in old gmail inboxes; Demo gif: https://i.imgur.com/ijXOVtf.gif
# pip install xlib
# Usage:
# Go to https://mail.google.com/mail/u/1/#section_query/(in%3Ainbox+OR+label%3A%5Eiim)+is%3Aunread/p5
# Then run the script.
from time import time, sleep
from typing import Tuple, Union, Optional
from Xlib import X
from Xlib.X import ButtonPress, ButtonRelease
@NyanKiyoshi
NyanKiyoshi / graphql-playground-firefox-tabs-scroll.css
Created May 26, 2019 10:54
Enable scrolling on GraphQL Playground on Firefox
.playground > div:first-child {
overflow-x: auto !important;
}
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define AppName "Urbanotopus"
#define AppEntryPoint "Urbanotopus.exe"
#define AppURL "https://github.com/Urbanotopus/urbanotopus/releases"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)