Install convmv if you don't have it
sudo apt-get install convmv
Convert all files in a directory from NFD to NFC:
convmv -r -f utf8 -t utf8 --nfc --notest .
# SGR color constants | |
# rene-d 2018 | |
class Colors: | |
""" ANSI color codes """ | |
BLACK = "\033[0;30m" | |
RED = "\033[0;31m" | |
GREEN = "\033[0;32m" | |
BROWN = "\033[0;33m" | |
BLUE = "\033[0;34m" |
#!/usr/bin/env bash | |
# https://en.wikipedia.org/wiki/ANSI_escape_code | |
print_colors() | |
{ | |
# Print column headers. | |
printf "%-4s " '' ${bgs[@]} | |
echo |
#!/usr/bin/env bash | |
# https://en.wikipedia.org/wiki/ANSI_escape_code | |
print_colors() | |
{ | |
# Print column headers. | |
printf "%-4s " '' ${bgs[@]} | |
echo |
#!/bin/echo must be source: | |
# bash debugger | |
# Rene Devichi. https://unlicense.org | |
# Usage: `source bashdb.db` at the beginning of your script | |
# Inline version: | |
# curl -sL -o /tmp/bashdb.sh https://gist.github.com/rene-d/fd2d2c37dfc1371255818d73f7b5f1db/raw/bashdb.sh | |
# trap "rm -f /tmp/bashdb.sh" EXIT | |
# . /tmp/bashdb.sh |
#! /usr/bin/env python3 | |
import requests | |
import sys | |
from subprocess import call | |
import yaml | |
import os | |
import json | |
import argparse |
#!/usr/bin/env python3 | |
from curses import wrapper | |
from math import pi, sin, cos | |
def bresenham(x0, y0, x1, y1): | |
""" | |
Bresenham's line algorithm. | |
Yield integer coordinates on the line from (x0, y0) to (x1, y1). |
#!/usr/bin/env python3 | |
""" | |
Read terminal properties and imgcat in Python. | |
References: | |
https://en.wikipedia.org/wiki/ANSI_escape_code | |
https://iterm2.com/documentation-escape-codes.html | |
https://iterm2.com/documentation-images.html | |
""" |
#!/usr/bin/env python3 | |
# Chromium-like browsers cache viewer (Linux, macOS) | |
import argparse | |
import binascii | |
import struct | |
from datetime import datetime | |
from pathlib import Path | |
import traceback |
Install convmv if you don't have it
sudo apt-get install convmv
Convert all files in a directory from NFD to NFC:
convmv -r -f utf8 -t utf8 --nfc --notest .
#!/usr/bin/env python3 | |
from tkinter import Tk, Canvas, Frame, BOTH | |
from typing import List | |
import random | |
root = Tk() | |
root.geometry("600x600") | |
f = Frame() |