Skip to content

Instantly share code, notes, and snippets.

View andreykaipov's full-sized avatar
🐈
cat i'm a kitty cat

Andrey Kaipov andreykaipov

🐈
cat i'm a kitty cat
View GitHub Profile
#!/bin/sh
input="${1:?Provide a file or text}"
shift
output="${1:-image.png}"
if [ -r "$input" ]; then
input="$(cat "$input")"
fi
#!/bin/sh
get_links() {
curl -so/tmp/osrs.list https://downloads.khinsider.com/game-soundtracks/album/old-school-runescape
pages="$(grep -Po '<td class="clickable-row"><a href="\K[^"]+' /tmp/osrs.list)"
echo >osrs.links
for page in $pages; do
@andreykaipov
andreykaipov / cobra.go
Last active September 20, 2023 20:28
Cobra and Kong CLI comparison
package main
import (
"fmt"
"strings"
"github.com/spf13/cobra"
)
func main() {
@andreykaipov
andreykaipov / list.sh
Last active August 31, 2023 21:53
Delete your Slack messages
#!/bin/bash
set -eu
: "${d?}"
: "${token?}"
curl() {
path=$1
shift
api=https://slack.com/api
@andreykaipov
andreykaipov / uac-whitelist.ps1
Last active March 3, 2025 22:11
UAC Whitelist for Windows 10
# The following script (ab)uses the Windows 10 Task Scheduler to create a UAC
# whitelist for applications.
#
# Why? Because Windows does not let you fine-tune your UAC settings. It's
# either you turn off all dialogs and risk some app messing your shit up as it
# runs in a privileged context, or you turn on notifications for everything and
# risk your sanity and hearing loss from the loud bell that chimes through your
# ears every time you want to view your CPU temps or adjust your fan speeds.
#
# Any programs added to the whitelist below will not show a UAC prompt when
Mon Jul 24 17:59:37 UTC 2017