Skip to content

Instantly share code, notes, and snippets.

View Endermanbugzjfc's full-sized avatar
🍴
Finding kitchens in forks.

EndermanbugZJFC Endermanbugzjfc

🍴
Finding kitchens in forks.
View GitHub Profile
@Endermanbugzjfc
Endermanbugzjfc / shell-prefill.sh
Last active November 10, 2026 12:07
A script that starts a session of the given shell with a pre-input (pre-filled) command, which will be executed on Enter. The script accepts --shell and --input args, it currently supports sh, bash, nu.
#!/usr/bin/env bash
# Co-authored-by: Codex <noreply@openai.com>
#
# Start a shell with an editable command waiting for Enter.
# Usage: ./shell-prefill.sh --shell bash|sh|nu --input 'echo hello'
# sh uses Bash readline to collect the command, then runs it using sh syntax.
# For sh and bash, a fresh interactive shell follows the initial command;
# shell-local state from that command (variables/functions/options) is not retained.
set -euo pipefail
elementary@elementary:~/idk$ lsblk -o NAME,FSTYPE,SIZE,PARTLABEL
NAME FSTYPE SIZE PARTLABEL
loop0 squashfs 2.3G
nvme0n1 931.5G
├─nvme0n1p1 vfat 512M EFI
├─nvme0n1p2 crypto_LUKS 914.1G root
└─nvme0n1p3 crypto_LUKS 16.9G
nvme1n1 476.9G
├─nvme1n1p1 vfat 260M EFI system partition
├─nvme1n1p2 16M Microsoft reserved partition
@Endermanbugzjfc
Endermanbugzjfc / mkNetBeansJavaPlatform.nix
Last active February 11, 2026 00:47
A simple helper to configure Java Platforms in Nix-managed NetBeans installations.
# Author: Endermanbugzjfc
# License: Unlicense
let
mkNetBeansJavaPlatform = {
openjdk,
openjdkMajorVersion,
label ? "JDK ${openjdkMajorVersion} (Nix)",
}: let
in ''
@Endermanbugzjfc
Endermanbugzjfc / j-b.py
Last active November 17, 2025 11:00
Slur censor for Kitty terminal
import re
import base64
MARKER_GROUP = 1
slur = base64.b64decode("am9i").decode("utf-8")
# print(slur)
def marker(text):
for match in re.finditer(slur, text, re.IGNORECASE):
span = match.span()
@Endermanbugzjfc
Endermanbugzjfc / Ans.vba
Created February 26, 2025 16:19
Personal VBA macro that replace specific words in PowerPoint.
Sub Ans()
For Each Slide In ActivePresentation.Slides
For Each Shape In Slide.Shapes
If Shape.HasTextFrame Then
Set A = Shape.TextFrame.TextRange.Find(FindWhat:="Answer: ")
If Not A Is Nothing Then
Shape.TextFrame.TextRange.Text = "Answer: ___"
End If
End If
@Endermanbugzjfc
Endermanbugzjfc / amazon_banned_me_for_invalid_reason.md
Created February 19, 2025 06:17
Amazon AU banned me for invalid reason
@Endermanbugzjfc
Endermanbugzjfc / figyua.css
Last active January 3, 2026 18:55
A CSS snippet for Obsidian.md. (Scroll to bottom for more information!)
/*
* フィギュア F I G Y U A 手辦
* Unlicense | https://gist.github.com/Endermanbugzjfc/f75e8d271057877403725f60700a6a2a
* Please install the Style Settings plugin to configure this snippet.
*
* Credits:
* - A person on Discord: image scalability.
* - ChatGPT: image visibility toggle.
*/
/* @settings
@Endermanbugzjfc
Endermanbugzjfc / playground.rs
Created February 27, 2024 01:47 — forked from rust-play/playground.rs
Code shared from the Rust Playground
fn mock<T: Into<String>, I: IntoIterator<Item = T>>(_: I) {}
struct Merchant<'a> {
name: &'a str,
billing_portal: &'a str,
billing_period: &'a str,
stripe_id: Option<&'a str>,
}
fn merchant() -> Merchant { unimplemented!(); }
@Endermanbugzjfc
Endermanbugzjfc / confusion.sql
Last active September 11, 2023 10:04
Hint: some general programming ideas are applied on here. Ask yourself: why is the * 2 + used on booleans instead of numbers.
SELECT * FROM Customers
WHERE uuid = "weqsc" OR wtfid = "weqsc"
ORDER BY (uuid IS NOT NULL) * 2 + (wtfid IS NOT NULL) DESC

Keybase proof

I hereby claim:

  • I am endermanbugzjfc on github.
  • I am endermanbugzjfc (https://keybase.io/endermanbugzjfc) on keybase.
  • I have a public key ASAj0td0MLMY2uQspE0mjc3_spUt8ydo3_4uadjwWspBTgo

To claim this, I am signing this object: