Skip to content

Instantly share code, notes, and snippets.

0023
002A
0030..0039
00A9
00AE
200D
203C
2049
20E3
2122
# Source: https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-data.txt
# Compilation of all sections (Extended_Pictographic contributed most)
0023
002A
0030..0039
00A9
00AE
200D
203C
@shvchk
shvchk / padavan-stubby.sh
Last active October 19, 2021 03:16
Configure Stubby on routers with Padavan based firmware
#! /usr/bin/env sh
mkdir /etc/storage/stubby
cat << EOF > /etc/storage/stubby/stubby.yml
resolution_type: GETDNS_RESOLUTION_STUB
round_robin_upstreams: 1
appdata_dir: "/var/lib/stubby"
# tls_authentication: GETDNS_AUTHENTICATION_REQUIRED
tls_query_padding_blocksize: 128
@shvchk
shvchk / xdotool-nofail
Created February 28, 2021 15:45
Do not let xdotool fail, see jordansissel/xdotool#60
#! /usr/bin/env sh
T0=$(date +%s)
while [ $(( `date +%s` - T0 )) -lt 10 ]; do
[ -z "$(xdotool $@ 2>&1)" ] && break
sleep 0.1
done
#!/bin/echo Source this file don't run it
echo "Password:"
read -s RCLONE_CONFIG_PASS
export RCLONE_CONFIG_PASS
if [ -n $RCLONE_PASS_TIMEOUT ]; then
pid=$$
trap 'unset RCLONE_CONFIG_PASS' SIGALRM
@shvchk
shvchk / !README.md
Last active June 5, 2022 04:33
Patch to fix incorrect results of mirrors performance testing utility (python3-software-properties).

Patch to fix incorrect results of mirrors performance testing utility (python3-software-properties).

  • Install mirrors test utility:
    sudo apt install python3-software-properties --no-install-recommends

  • Download and apply patch:
    wget -qO- https://gist.githubusercontent.com/shvchk/b81e4579bff13486871f99404c497759/raw/MirrorTest.py.patch | sudo patch -d/ -p0

  • Use it:
    LC_ALL=C python3 /usr/lib/python3/dist-packages/softwareproperties/MirrorTest.py

@shvchk
shvchk / growing-rings-spinner-dense.html
Created August 12, 2020 23:56
Growing rings dense spinner / loader
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Growing rings</title>
<style>
:root {
--pi: 3.141592653589793;
}
@shvchk
shvchk / growing-rings-spinner.html
Created August 12, 2020 23:55
Growing rings spinner / loader
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Growing rings</title>
<style>
:root {
--pi: 3.141592653589793;
}
@shvchk
shvchk / anbox-env
Last active March 3, 2021 20:55
Anbox environments management
#!/bin/bash
script_name=$(basename "$0")
envs="/var/snap/anbox"
def_env="${envs}/common"
current_env=$(readlink -f "$def_env")
clean=false
show_help() {
cat << EOF
@shvchk
shvchk / anbox-env
Last active May 13, 2020 22:02
Simple Anbox environments management
#!/bin/sh
def_env="/var/snap/anbox/common"
snap stop anbox
rm ${def_env}/logs/* # optional logs cleaning, remove it not needed
rm ${def_env}/data/system.log* # optional logs cleaning, remove it not needed
rm ${def_env}
ln -s ${def_env}-${1} ${def_env}
snap start anbox