Skip to content

Instantly share code, notes, and snippets.

View thingsiplay's full-sized avatar

Tuncay thingsiplay

View GitHub Profile
@thingsiplay
thingsiplay / Arcade - A-Z Uncommon Arcade Games (Game Titles).txt
Created October 27, 2022 17:51
A-Z Uncommon Arcade Games Gamelists for FinalBurn Neo (fbneo) emulator
Avenging Spirit
B.Rap Boys
Chanbara
Dungeon Magic
Exvania
Fortress 2 Blue Arcade
Gundhara
Hopper Robo
Itazura Tenshi
Joinem
@thingsiplay
thingsiplay / vimtime
Created September 28, 2022 18:36
Some shell commands to investigate startup times of Vim.
# Some shell commands to investigate startup times of Vim.
# Intended to be used on their own, in example by copy-paste.
# Measure the startup time.
vim --startuptime /dev/stdout +qall && echo && time vim +q
# Remove the first column and sort the output based on time elapsed for that particular entry.
vim --not-a-term --startuptime /dev/stdout +qall | awk '{$1="" ; print $0}' | grep -E '^ *[0-9]' | sort
# Get detailed information.
@thingsiplay
thingsiplay / balb_playlists.sh
Last active August 29, 2022 14:17
Download RetroArch playlists from balb and convert paths to native Linux installation.
#!/bin/env bash
# https://gist.github.com/thingsiplay/21595bf70743dde56539696f7bd942ad
# Downloads playlists from "balb" user to be used in RetroArch under native
# installation for Linux. It will download all playlists, convert internal
# paths, change the filename and move it to the playlists folder. You have to
# set all three "_dir" variables below, as the default values are only my
# personal setup.
@thingsiplay
thingsiplay / fontsearch.sh
Last active June 9, 2022 10:55
Cleaner output font name output when searching for font
#!/bin/sh
fc-list \
| grep -ioE ": [^:]*$1[^:]+:" \
| sed -E 's/(^: |:)//g' \
| tr , \\n \
| sort \
| uniq
@thingsiplay
thingsiplay / arcade_monitor.slangp
Last active April 8, 2025 02:42
My Shader Presets for RetroArch shaders_slang
#reference "shaders_slang/presets/crt-royale-kurozumi.slangp"
geom_mode_runtime = "3.000000"
interlace_detect_toggle = "0.000000"
@thingsiplay
thingsiplay / ocr
Created May 13, 2022 17:12
ocr - select screen portion and recognize text from non text source such as videos
#!/bin/env bash
input="$(mktemp)"
output="$(mktemp)"
import "$input.png"
tesseract -l eng "$input.png" "$output" 2> /dev/null
cat "$output.txt"
rm -f "$input"
@thingsiplay
thingsiplay / biggest.sh
Last active May 24, 2024 00:47
biggest - list biggest files and folders
#!/bin/env bash
# biggest - list biggest files and folders
#
# Usage:
# biggest
# biggest *.png
du --apparent-size --all --max-depth 1 --one-file-system "$@" \
| sort --numeric-sort --ignore-leading-blanks --reverse \
@thingsiplay
thingsiplay / checkmails.sh
Created April 24, 2022 11:05
Count unread mails in Thunderbird and write to stdout.
#!/bin/env bash
# Count unread mails in Thunderbird and write to stdout.
# Usage:
# checkmails.sh
# Path to your Thunderbird profile.
profile="$HOME/.thunderbird/aabbcc007.default"
# Regex to find the unread message lines.
@thingsiplay
thingsiplay / .zshrc
Created April 11, 2022 20:40
cdd - jump to a directory you visited previously (ZSH function)
# cdd - jump to a directory you visited previously
# A Function for ZSH config file.
#
# Usage:
# $ cdd
# $ cdd "regex"
#
# Don't forget to enable "setopt auto_pushd", so that each "cd" command will
# add a folder to the list automatically.
#
@thingsiplay
thingsiplay / py
Created March 25, 2022 13:59
py - check Python script with mypy and flake8, then execute it
#!/bin/env bash
# py - check Python script with mypy and flake8, then execute it
export PATH=".:$PATH"
file=$(/usr/bin/which --skip-alias --skip-functions "$1")
shift
export MYPY_CACHE_DIR="/tmp/.mypy_cache"
mkdir -p "$MYPY_CACHE_DIR"
mypy "$file" \