Image by kjpargeter on Freepik
> gpg --default-new-key-algo rsa4096 --gen-key
Image by kjpargeter on Freepik
> gpg --default-new-key-algo rsa4096 --gen-key
| #!/usr/bin/bash | |
| # source: https://stackoverflow.com/questions/238073/how-to-add-a-progress-bar-to-a-shell-script/68298090#68298090 | |
| percentBar () { | |
| local prct totlen=$((8*$2)) lastchar barstring blankstring; | |
| printf -v prct %.2f "$1" | |
| ((prct=10#${prct/.}*totlen/10000, prct%8)) && | |
| printf -v lastchar '\\U258%X' $(( 16 - prct%8 )) || | |
| lastchar='' | |
| printf -v barstring '%*s' $((prct/8)) '' | |
| printf -v barstring '%b' "${barstring// /\\U2588}$lastchar" |
| def generate_random_colors( | |
| min_color=0, | |
| max_color=231, | |
| base_colors_total=7, | |
| lighter_colors_total=24, | |
| plot=False, | |
| ): | |
| """Generate random color hex codes. | |
| Firstly, it will generate random integer from min_color (0-(255 - lighter_colors_total - 1)) to max_color (0-(255 - lighter_colors_total)). |
| def generate_xadic_colors(hex_color, n_colors=7, plot=False, verbose=False): | |
| """ "Convert.""" | |
| hls_color = hex2hls(hex_color) | |
| triadic_colors = [] | |
| for offset in range(0, 360, 360 // n_colors): | |
| triadic_colors.append( | |
| ((hls_color[0] + offset / 360) % 1.0, hls_color[1], hls_color[2]) | |
| ) | |
| _colors = [hls2hex(hls_color) for hls_color in triadic_colors][0:n_colors] | |
| if verbose: |
| def generate_lighter_colors(base_color, n_color): | |
| """Given base color, return 'n' color hex codes from base color to lightest | |
| color.""" | |
| color_rgb = tuple(int(base_color[1:][i : i + 2], 16) for i in (0, 2, 4)) | |
| color_rgb_ligher = tuple( | |
| [c for c in range(color, 255, (255 - color) // n_color)][0:n_color] | |
| for color in color_rgb | |
| ) | |
| lighter_colors = [ |
| set -g TMUX_PLUGIN_MANAGER_PATH "$GITHUB_REPO_ROOT" | |
| set -g @plugin 'tmux-plugins/tpm' | |
| set -g @plugin 'wenijinew/glamour.tmux' |
| Pattern | Description | |
|---|---|---|
| Blank Line | Match no files - can serve as a separator for readability. | |
| Lines starting with hash(#) | Comment by default. | |
| Trailing spaces | being ignored unless they are quoted with backslash (\). | |
| ! | Negates the pattern. | |
| \ | escape sensitive chars(E.g. # or ! or trailing spaces). | |
| Ends with slash(/) | match directory and any paths under it. | |
| No slash(/) | match pathname relative to .gitignore file or the top-level of the work tree if not from .gitignore. | |
| * | match anything except slash(/) | |
| ? | match any one char except slash(/) |
| #!/usr/bin/env python | |
| import getopt, sys | |
| ABNORMAL_STATE=2 | |
| EMPTY="" | |
| def hello(name): | |
| print("Hello, ", name) |