Skip to content

Instantly share code, notes, and snippets.

@obfusk
obfusk / break.py
Last active November 10, 2025 05:32
python "breakpoint" (more or less equivalent to ruby's binding.pry); for a proper debugger, use https://docs.python.org/3/library/pdb.html
import code; code.interact(local=dict(globals(), **locals()))
@matthewpi
matthewpi / README.md
Last active November 10, 2025 05:30
Nix on Fedora

NixOS on Fedora

Please note that these instructions are not offically supported or condoned by Nix and are not guaranteed to always work, but from my testing everything seems to work perfectly fine.

These steps may not be required if NixOS/nix#2374 is resolved.

SELinux

These commands are required for both Fedora Workstation and Fedora Silverblue

@sandhikagalih
sandhikagalih / script.js
Created June 13, 2024 15:05
Javascript Image Preview
const input = document.getElementById('avatar');
const previewPhoto = () => {
const file = input.files;
if (file) {
const fileReader = new FileReader();
const preview = document.getElementById('avatar-preview');
fileReader.onload = function(event) {
preview.setAttribute('src', event.target.result);
}
fileReader.readAsDataURL(file[0]);
@tj
tj / git aliases.sh
Last active November 10, 2025 05:27
Some helpful git aliases
alias gd="git diff"
alias gc="git clone"
alias ga="git add"
alias gbd="git branch -D"
alias gst="git status"
alias gca="git commit -a -m"
alias gpt="git push --tags"
alias gp="git push"
alias gpr="git pull-request"
alias grh="git reset --hard"
@lisez
lisez / hugo-auto-deoply.yml
Last active November 10, 2025 05:18
如何使用 Github Actions 自動部署 Hugo
# link: https://sujingjhong.com/posts/how-to-deploy-hugo-automatically-with-github-actions/
# author: lisez <mm4324@gmail.com>
name: Auto publish to public site
# 只有推送到 master 才自動化
on:
push:
branches:
- master
@shmup
shmup / proton
Created December 7, 2023 19:41
easily run an .exe with proton on linux
#!/usr/bin/env bash
# This script launches a Windows executable using Proton within a Linux environment.
# It requires exactly one argument: the path to the executable to run.
# It sets up a separate Proton prefix for each executable to avoid conflicts.
# Usage: proton <path-to-executable>
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <executable-path>"
exit 1
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active November 10, 2025 05:16
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:
KFZUS-F3JGV-T95Y7-BXGAS-5NHHP
T3ZWQ-P2738-3FJWS-YE7HT-6NA3K
KFZUS-F3JGV-T95Y7-BXGAS-5NHHP
65Z2L-P36BY-YWJYC-TMJZL-YDZ2S
SFZHH-2Y246-Z483L-EU92B-LNYUA
GSZVS-5W4WA-T9F2E-L3XUX-68473
FTZ8A-R3CP8-AVHYW-KKRMQ-SYDLS
Q3ZWN-QWLZG-32G22-SCJXZ-9B5S4
DAZPH-G39D3-R4QY7-9PVAY-VQ6BU
KLZ5G-X37YY-65ZYN-EUSV7-WPPBS
@GGPrompts
GGPrompts / pmux.md
Last active November 10, 2025 05:04
Claude Code Slash Command: pmux - Interactive Prompt Engineer with tmux send-keys for multi-Claude orchestration
description
Interactive Prompt Engineer with tmux send-keys - directly send prompts to Claude Code sessions

Interactive Prompt Engineering Agent (Tmux Edition)

You are a prompt engineering expert helping craft optimal prompts through interactive dialog-based refinement that ends with sending the prompt directly to a Claude Code session via tmux send-keys.

Context: Tmux Multi-Session Workflow