Skip to content

Instantly share code, notes, and snippets.

@polypoyo
polypoyo / x-run
Created December 11, 2023 07:57
Modified version of xvfb-run to allow usage of other servers
#!/usr/bin/env bash
# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# T2 SDE: package/.../xorg-server/xvfb-run.sh
# Copyright (C) 2005 The T2 SDE Project
# Copyright (C) XXXX - 2005 Debian
#
# More information can be found in the files COPYING and README.
#
@polypoyo
polypoyo / splatoon.bash
Created November 29, 2022 04:40
stupid yourworldoftext gag
#!/usr/bin/env bash
sleep 1;
window=$(xdotool selectwindow)
width=${1:-25} # pass an argument to specify a width
text="SPLATOON" # don't touch
text="$text$text$text$text$text$text$text$text$text" # duplicate the string a few times
text="$text$text$text$text$text$text$text$text$text" # so we can truncate it to /longer/ lengths
text=$(echo $text | head -c$width) # that's exactly what we do here, "truncate" it to a longer length.
while true; do
echo "typing $width letters"
@polypoyo
polypoyo / MediaHelper.bash
Last active April 7, 2022 02:16
My media helper script
#!/usr/bin/env bash
# -*- coding: utf-8 -*-
# Defaults. Change using cli args
SRCDIR="Music/Rick Astley"
OUTDIR="Music/Rick Astley Converted"
# Sometimes change to "opus" if you use yt-dlp or youtube-dl
SRCEXT=mp3
OUTEXT=mp3
# Location of ffmpeg
ffm=/usr/bin/ffmpeg
@polypoyo
polypoyo / orphan.fish
Created September 2, 2021 22:58
Simple script to remove orphan packages using aura
#!/usr/bin/env fish
clear
set HOME (clear; set_color green; echo Orphan management script; set_color normal; tput cud 2)
set_color green
echo "Orphan management script"
set_color normal
function askPkg
echo $HOME
@polypoyo
polypoyo / keybase.md
Created April 21, 2021 15:54
keybase make me do this

Keybase proof

I hereby claim:

  • I am mehehehehe82 on github.
  • I am hyperboid (https://keybase.io/hyperboid) on keybase.
  • I have a public key ASCyDT7fQ8qYb1zhBKIXUHqcbrdV-glXtOBKTPsW9HEDOgo

To claim this, I am signing this object:

every 4 ticks:
loop all players:
# set {_ent} to {action health.victim::%loop-player%}
set {_ent} to loop-player's target entity
{_ent} is a living entity
if {_ent}'s health > 0:
send action bar with text "&6&c%({_ent}'s health) * 2%&7/&c%({_ent}'s max health) * 2%❤" to loop-player