Most (or all) of these methods make use of ANSI escape sequences.
For example, using a dictionary:
ansi = {'underline': '\033[4m', 'bold': '\033[1m', 'end':'\033[0m'}
print '{[bold]}Hello World{[end]}'.format(ansi, ansi)
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# SETUP CONSTANTS | |
# Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
# I don't remember where I found this. o_O | |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset |
#!/usr/bin/env bash | |
mkdir ~/ssl/ | |
openssl genrsa -des3 -out ~/ssl/rootCA.key 2048 | |
openssl req -x509 -new -nodes -key ~/ssl/rootCA.key -sha256 -days 1024 -out ~/ssl/rootCA.pem |
git clone https://github.com/owner/git.git
git clone git@github.com:owner/git.git
git config --global https.proxy http://127.0.0.1:1080 | |
git config --global https.proxy https://127.0.0.1:1080 | |
git config --global --unset http.proxy | |
git config --global --unset https.proxy | |
npm config delete proxy |
import argparse | |
import subprocess | |
from pathlib import Path | |
from loguru import logger | |
parser = argparse.ArgumentParser(description='合并米家摄像头视频,以天为单位。') | |
parser.add_argument('indir', help='原米家摄像头视频目录。') | |
parser.add_argument('--outdir', default='./', help='合并后视频存放目录,目录不存在会被创建。默认当前目录。') | |
args = parser.parse_args() |
This process is derived from the [official guide][official-guide], but lightly tweaked to make the process smoother and produce an installation that comes up automatically on boot (no need to enter desktop mode) and survives system updates.
This process is derived from the [official guide][official-guide], but lightly tweaked to make the process smoother and produce an installation that both (1) comes up automatically on boot and (2) survives system updates.
tailscale.sh
to your Deck.tailscale.sh