Skip to content

Instantly share code, notes, and snippets.

@sqwxl
sqwxl / setup.sh
Last active March 20, 2025 13:13
Setup Playdate SDK (v2.6.2) on Fedora atomic OS (ostree, silverblue, sericea, kinoite)
#!/bin/bash
set -e
case $(uname -m) in
x86_64)
#supported
;;
*)
echo -e "System not supported.\nAn x86_64 OS is required. Please request support for your platform."
@sqwxl
sqwxl / git.fish
Last active October 12, 2024 15:55
Never again accidentally run `commit --amend` instead of `rebase --continue` in a merge conflict
function git
if test $argv[1] = commit; and contains -- --amend $argv
git_commit_safe_amend $argv[2..-1]
else
command git $argv
end
end
@sqwxl
sqwxl / spin
Last active September 7, 2022 13:39
Simple bash spinner
#!/usr/bin/env bash
# source this file in your scripts and use as so:
# <command> & spin "Text to display while command is running"
function spin() {
local tag="$1"
local pid=$! # get the pid of the last background process
local sp="⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏"
local i=1