Skip to content

Instantly share code, notes, and snippets.

View thingsiplay's full-sized avatar

Tuncay thingsiplay

View GitHub Profile
@thingsiplay
thingsiplay / emojis.json
Created January 21, 2021 20:26 — forked from oliveratgithub/emojis.json
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z
@thingsiplay
thingsiplay / sync_kde_templates.py
Created March 2, 2021 11:08
Sync and manage your templates to a directory
#!/usr/bin/python3
# Dynamically create desktop entries in templates folder by reading all files
# from a source directory. It will add and overwrite desktop-files in
# templates folder and remove them, if no matching template from source
# directory is found.
import sys
import pathlib
import textwrap
@thingsiplay
thingsiplay / proton
Last active March 21, 2024 13:34
Proton script
#!/bin/sh
# Execute Windows programs with Proton from Steams installation folder, without
# starting Steam client.
#
# 1. Create a directory for Proton environment to run in. As an example make a
# folder "proton" in your home directory. This folder must exist in order
# to make Proton work.
#
# 2. Point the variable "env_dir" in this script to that folder or...
@thingsiplay
thingsiplay / rscript
Last active December 1, 2021 15:12
Run Rust source code like a script
#!/bin/sh
# rscript: Rust script interpreter
# Shebang in rust.rscript: #!/usr/bin/env -S rscript 2018
# Directory where compiled binaries are saved to.
# Example: /var/tmp/rscript or /tmp
output_dir=/var/tmp/rscript
# -C panic=abort
# abort, unwind
@thingsiplay
thingsiplay / lplpath
Last active December 20, 2023 22:49
RetroArch playlist key extractor - Dirty way of reading and printing values from .lpl playlist files
#!/usr/bin/bash
# RetroArch playlist key extractor
# Dirty way of reading and printing values from .lpl playlist files.
#
# EXAMPLES:
# lplpath
# lplpath "~/.config/retroarch/playlists/Nintendo - Game Boy.lpl"
KEY=path
@thingsiplay
thingsiplay / vimd
Last active July 15, 2021 13:00
Select textfile in dmenu and open it in Vim.
#!/usr/bin/env bash
# vimd by Tuncay D.
# Select textfile in dmenu and open it in Vim.
#
# Usage:
# vimd
# Or:
# vimd DIRECTORY
@thingsiplay
thingsiplay / proton
Created July 18, 2021 18:44 — forked from brunoais/proton
Proton script
#!/bin/bash
# Execute Windows programs with Proton from Steams installation folder, without
# starting Steam client.
#
# 1. Create a directory for Proton environment to run in. As an example make a
# folder "proton" in your home directory. This folder must exist in order
# to make Proton work.
#
# 2. Point the variable "env_dir" in this script to that folder or...
@thingsiplay
thingsiplay / lpl
Created July 28, 2021 17:42
lpl - Read entries from RetroArch .lpl playlist files in JSON format (powered by jq)
#!/bin/env bash
# lpl - Read entries from RetroArch .lpl playlist files in JSON format
#
# USAGE
# See `lpl -h`
#
# DEPENDENCIES
# getopts - Arguments parser (Bash built-in function)
# readlink - Get fullpath from path (standard program)
@thingsiplay
thingsiplay / selectfile
Last active April 3, 2024 22:38
Use rofi to select file or folder until file is selected, then print it.
#!/usr/bin/env bash
# selectfile
# Use rofi to select file or folder until file is selected, then print it.
# Arguments
# $1=directory to start, defaults to "." (specified in variable default_dir)
# Source directory with systems folders.
default_dir="."
@thingsiplay
thingsiplay / nogrep
Last active November 27, 2021 22:52
nogrep - Search matching lines with sed and print their non matching part of the lines.
#!/bin/sh
# Search matching lines with sed and print their non matching part of the lines.
# Usage:
# nogrep filter [sed_options]
# Examples:
# nogrep 'output' changelog.txt
# ls | nogrep '\(J\).*$' -E