This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import argparse | |
long_help = False | |
for arg in sys.argv: | |
if arg == "--": | |
break | |
if arg == "--long-help": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# 1. history and $HISTFILE do not work in scripts. Therefore a direct path to | |
# the file is needed. | |
# 2. awk gets the first part of the command line, resulting in the command name. | |
# 3. List of command names is then sorted and duplicate entries are removed. | |
# 4. type -P will expand command names to paths, similar to which. But it will | |
# also expand aliases and remove functions from the list. | |
# 5. Final output is then sorted again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
local="${HOME}/.config/retroarch" | |
repo='https://github.com/libretro/docs' | |
open='okular' | |
cd -- "${local}" || exit | |
if [[ "${1}" == '' ]]; then | |
mode="$(printf 'open\nupdate' | fzf)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# (This version is specific for my special use case of personal documents.) | |
# Version 1.1 | |
# 2025-04-07 | |
# | |
# Convert Text files to Image format. | |
# | |
# Usage: | |
# txt2png desc1.txt desc2.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ "${#}" -eq 0 ] ; then | |
cat << EOF | |
usage: tocase option... | |
options: | |
upper all uppercase | |
upper1 upper first character |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [[ "${#}" -eq 0 ]] || [[ "${1}" == '-h' ]]; then | |
self="${0##*/}" | |
cat <<EOF | |
usage: ${self} files... | |
Calculate CRC32 for each file. | |
positional arguments: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
supported_ext=("7z" "zip") | |
help() { | |
cat <<EOF | |
toarchive ext [options] files... | |
toarchive zip -f -k *.smc | |
Convert each file to an archive using 7z or tar, similar to gzip. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "1.5", | |
"default_core_path": "/home/tuncay/.config/retroarch/cores/fbneo_libretro.so", | |
"default_core_name": "Arcade (FinalBurn Neo)", | |
"base_content_directory": "/home/tuncay/Emulation/Roms", | |
"label_display_mode": 0, | |
"right_thumbnail_mode": 2, | |
"left_thumbnail_mode": 0, | |
"sort_mode": 0, | |
"items": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Default values. | |
quality='bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' | |
limit='4.8' | |
metaextras='--add-metadata --write-description --write-info-json --write-sub' | |
OPTIND=1 | |
while getopts ':hbp:s:M' OPTION; do | |
case "$OPTION" in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# echo -e ' \thello world ' | trim | |
sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' |
NewerOlder