Skip to content

Instantly share code, notes, and snippets.

View AverageHelper's full-sized avatar
🏳️‍⚧️

AverageHelper

🏳️‍⚧️
View GitHub Profile
import sys, os, stat, errno, operator, time, datetime, requests
from fuse import FUSE, Operations, LoggingMixIn, FuseOSError
from mastodon import Mastodon
from cachetools import TTLCache, cachedmethod
from mastodon.return_types import MediaAttachment, Account, Status
class PathItem:
def __init__(self, path_type, mtime=None, size=0, symlink_target=None, read_fn=None, listdir_fn=None):
self.path_type = path_type
self.mtime = mtime or time.time()
@poyotanp
poyotanp / how-to-disable-middle-click-paste.md
Last active April 15, 2025 01:22
How to disable middle-click paste in KDE Plasma (Wayland)

Environment

  • Arch Linux
  • KDE Plasma 6.1.5 (Wayland)

Solution

For native Wayland applications

  1. open the KDE system settings
  2. select "Workspace" -> "General Behavior"
#!/bin/zsh
# WARNING! The script is meant to show how and what can be disabled. Don’t use it as it is, adapt it to your needs.
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12), macOS Ventura (13) and macOS Sonoma (14)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user
@Blocksnmore
Blocksnmore / Readme.md
Last active January 17, 2025 20:21
Discord emote exporter

Discord emote exporter

  1. Paste the contents of RunOnClient.js into your developer console once you're inside the specific server > settings > emojis
  2. Copy the long message sent in developer console formatted link - name

If you want to take those exported emojis into guilded:

  1. Create a emojis.txt file with those contents and an index.ts file with RunOnDesktop.js's content
  2. Run the file using Deno with the following command: deno run --allow-read --allow-write index.ts
  3. Upload all JSON files in the newly created exported folder to a file sharing site (or copy paste the contents onto a paste site)
  4. Paste those json links into guilded & import them
@grizmio
grizmio / gist:51f7d43a22909b745d33c1c6db5c7e86
Created March 22, 2022 16:58
CAPACITOR_ANDROID_STUDIO_PATH and android studio flatpak
mcedit ~/.zshrc
export CAPACITOR_ANDROID_STUDIO_PATH='/var/lib/flatpak/app/com.google.AndroidStudio/current/active/files/extra/android-studio/bin/studio.sh'
@ckcr4lyf
ckcr4lyf / node_ipc_malware.md
Last active May 26, 2022 00:12
Explanation of the malware in node-ipc
@MidSpike
MidSpike / readme.md
Last active January 29, 2025 18:02
CVE-2022-23812 | RIAEvangelist/node-ipc is malware / protest-ware
@sindresorhus
sindresorhus / esm-package.md
Last active April 19, 2025 18:24
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@divyajyotiuk
divyajyotiuk / get_twitter_bookmarks.py
Last active February 10, 2024 05:40
Python code to get text and link of the bookmarked tweets and save in markdown
import json
import glob
all_bookmarks = []
md_file = open("bookmarks.md", "w+") # saving in markdown file, if no file exists using '+' creates one
files = [file for file in glob.glob("JSONBookmarks/*")] # using glob to read all files from the folder
for file_name in files:
print(file_name)
with open(file_name) as bk: