Skip to content

Instantly share code, notes, and snippets.

@slowpeek
slowpeek / shopt_ensure.sh
Last active August 20, 2021 15:06
shopt_ensure
# -*- mode: sh; sh-shell: bash; -*-
# shellcheck shell=bash
# MIT license (c) 2021 https://github.com/slowpeek
# Homepage: https://gist.github.com/slowpeek/3e592af3395cfb0e2d20a57c50a87a4b
# bye.sh https://gist.github.com/slowpeek/6127166369d8abd230c30c20cc6a9152
# stack.sh https://gist.github.com/slowpeek/3310c2f09b80d0b2e175122e8c8cae64
# This is a wrapper around bash builtin shopt. It can be used to save
@slowpeek
slowpeek / bye.sh
Last active June 4, 2022 00:52
bye.sh
# -*- mode: sh; sh-shell: bash; -*-
# shellcheck shell=bash
# MIT license (c) 2021 https://github.com/slowpeek
# Homepage: https://gist.github.com/slowpeek/6127166369d8abd230c30c20cc6a9152
##############################################################
##############################################################
## THIS GIST IS OBSOLETE AND IS NO LONGER UPDATED.
## Use here-bye instead: https://github.com/slowpeek/here-bye
@slowpeek
slowpeek / stack.sh
Last active August 20, 2021 15:09
stack.sh
# -*- mode: sh; sh-shell: bash; -*-
# shellcheck shell=bash
# MIT license (c) 2021 https://github.com/slowpeek
# Homepage: https://gist.github.com/slowpeek/3310c2f09b80d0b2e175122e8c8cae64
# bye.sh https://gist.github.com/slowpeek/6127166369d8abd230c30c20cc6a9152
# Simple stack for strings. It operates on var names:
#
@slowpeek
slowpeek / temp.sh
Last active February 28, 2024 20:20
temp.sh
# -*- mode: sh; sh-shell: bash; -*-
# shellcheck shell=bash
# MIT license (c) 2021 https://github.com/slowpeek
# Homepage: https://gist.github.com/slowpeek/f3e851f5c6fa6a7ba1f33d1e903bf4a9
# Temporarily assign a new value to a var and restore it
# later. Strings only. The code is simple on intention, use it
# correctly.
#
@slowpeek
slowpeek / locate-exit.sh
Last active August 31, 2022 17:03
locate-exit.sh
# -*- mode: sh; sh-shell: bash; -*-
# shellcheck shell=bash
# MIT license (c) 2021 https://github.com/slowpeek
# Homepage: https://gist.github.com/slowpeek/7e2731b620d558f44841da6772743d38
# This script can help you find out which line and why (end of code,
# literal exit, 'set -e' violation, bash error) your bash script
# finished execution.
#
@slowpeek
slowpeek / ubuntu-sources
Last active April 10, 2024 22:59
Simple apt sources generator for ubuntu
#!/usr/bin/env bash
# MIT license (c) 2021 https://github.com/slowpeek
# Homepage: https://gist.github.com/slowpeek/beedb0c9c79638d4a7ec0099d0875ecb
# Simple apt sources generator for ubuntu.
############################ DEPRECATION NOTICE ############################
#
# This script has evolved into https://github.com/slowpeek/ubuntu-sources
@slowpeek
slowpeek / nvidia-smi
Last active May 5, 2024 20:21
nvidia-smi dmon adapter: 525, 530, 535, 545
#!/usr/bin/env bash
# MIT license (c) 2022-2024 https://github.com/slowpeek
# Homepage: https://gist.github.com/slowpeek/006680bb06e671bc489d4a3274ff3d19
: <<'README'
Applicable nvidia driver versions: 525, 530, 535, 545, 550
ABOUT --
@slowpeek
slowpeek / demo.org
Last active March 30, 2023 23:57
orgmode renderer bug demo

How it should be:

line1
line2

How it renders nested into a list item (notice the extra tailing blank line):

  • list item
@slowpeek
slowpeek / demo.md
Last active March 31, 2023 21:32
orgmode renderer bug: line breaks in inline code

before some code after

@slowpeek
slowpeek / keyboard.xml
Last active January 14, 2024 15:19
Kodi remote control mod for Nokia 8000
<?xml version="1.0" encoding="UTF-8"?>
<!--
MIT license (c) 2024 https://github.com/slowpeek
Homepage: https://gist.github.com/slowpeek/50b5123d23b038d5b06b1452057be0c2
--
Kodi remote control mod for Nokia 8000