Skip to content

Instantly share code, notes, and snippets.

View shmup's full-sized avatar
🐌

Jared Miller shmup

🐌
  • computer
  • traverse city, mi
View GitHub Profile
@shmup
shmup / paste.vim
Created February 18, 2024 21:18 — forked from romainl/paste.vim
Sharing is caring
" Mac OS X (requires curl)
" ------------------------
command! -range=% SP <line1>,<line2>w !curl -F 'sprunge=<-' http://sprunge.us | tr -d '\n' | pbcopy
command! -range=% CL <line1>,<line2>w !curl -F 'clbin=<-' https://clbin.com | tr -d '\n' | pbcopy
command! -range=% VP <line1>,<line2>w !curl -F 'text=<-' http://vpaste.net | tr -d '\n' | pbcopy
command! -range=% PB <line1>,<line2>w !curl -F 'c=@-' https://ptpb.pw/?u=1 | tr -d '\n' | pbcopy
command! -range=% IX <line1>,<line2>w !curl -F 'f:1=<-' http://ix.io | tr -d '\n' | pbcopy
command! -range=% EN <line1>,<line2>w !curl -F 'file=@-;' https://envs.sh | tr -d '\n' | pbcopy
command! -range=% XO <line1>,<line2>w !curl -F 'file=@-' https://0x0.st | tr -d '\n' | pbcopy
command! -range=% TB <line1>,<line2>w !nc termbin.com 9999 | tr -d '\n' | pbcopy
@shmup
shmup / perms.txt
Last active February 6, 2024 00:38
linux perm/group/selinux notes
█▓▒░ PERMISSION THINGS ░▒▓█
chgrp pissgroup file | change file's group to pissgroup
chmod 755 directory | set r/w/execute for owner, r/execute for group and others on dir
chown username:groupname file | change owner and group of file
getent group wheel | list all users of a group
gpasswd -a username piss | add user to the group piss (alternative)
gpasswd -d username piss | remove user from the group piss
groupadd piss | create a new group named piss
groupdel piss | delete the group named piss
@shmup
shmup / moolist
Last active January 27, 2024 17:18
quickly run any of the breathing moos on moolist.com with tt++
#!/usr/bin/env bash
# quickly run any of the breathing moos on moolist.com with tt++
# requires: curl, fzy (or fzf but update script), tt++
# https://asciinema.org/a/633014
set -euo pipefail
html_content=$(curl -s 'https://moolist.com/all.php')
telnet_uris=$(
@shmup
shmup / Caddyfile
Created January 7, 2024 23:36
streaming with srs and ffmpeg
:8888 {
root * /crypt
file_server browse
@tsFiles {
path *.ts
}
header @tsFiles Content-Type video/MP2T
log {
output stdout
}
#!/usr/bin/env bash
player="cvlc --loop"
track="https://dev.host/~shmup/tmp/Melancholia_I.mp3"
aquarium="http://asciiquarium.live"
reset() {
tput cnorm; stty echo; tput sgr0; clear
}
@shmup
shmup / Search my gists.md
Created December 19, 2023 04:41 — forked from santisbon/Search my gists.md
How to #search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@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
@shmup
shmup / amulet.pl
Last active December 9, 2023 15:51
hunt for amulets in sequential irc chatter
#!/usr/bin/env perl
#############################################################################
# IRSSI plugin to hunt for amulets in sequential chatter.
# ----------------------------------------------------------------------------
# An amulet is a kind of poem that depends on language, code, and luck.
# To qualify, a poem must satisfy these criteria:
#
# Its complete Unicode text is 64 bytes or less.
# The hexadecimal SHA-256 hash of the text includes four or more 8s in a row.
#
@shmup
shmup / toggle-autolock
Last active November 22, 2023 22:51
toggles for autolock and dunst notifications
#!/usr/bin/env bash
# toggles autolock and dunst notifications
# usage: toggle-autolock [start|stop] [-q|--quiet]
QUIET_MODE=0
start_autolock() {
xautolock -time 2 -locker lock >/dev/null 2>&1 &
[[ $QUIET_MODE -eq 0 ]] && echo "😀"
}
@shmup
shmup / scannerdarkly
Last active September 26, 2023 18:21
overlap a music with a scanner
#!/usr/bin/env bash
# overlap a music with a scanner
# needs mpv or vlc
DRONE_URL="https://somafm.com/darkzone256.pls"
DRONE_VOL=70
SCANNER_URL="https://somafm.com/nossl/scanner.pls"
SCANNER_VOL=100