Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
# NOTICE: This project has been moved to its own repository https://github.com/ConnerWill/Convert-ImageToASCIIArt | |
function Convert-ImageToAsciiArt { | |
<# | |
.SYNOPSIS | |
Function to convert an image to ascii art. | |
.DESCRIPTION | |
The function Convert-ImageToAsciiArt takes an image file path and converts the image to ASCII art. | |
The ASCII art is created by replacing each pixel in the image with an ASCII character based on the brightness of the pixel. |
#!/bin/env bash | |
### FUNCTION ###{{{ | |
function bash_progress_bar(){ | |
## Localize Variables ##{{{ | |
local \ |
##: ============================================== | |
##: [ SSHD_CONFIG ] | |
##: ============================================== | |
##: Title: hardened-sshd_config | |
##: Path: /etc/ssh/sshd_config | |
##: Author: github.com/ConnerWill | |
##: Date: 2022-07-16 | |
##: | |
##: https://man.openbsd.org/sshd_config.5 | |
##: https://linux.die.net/man/5/sshd_config |
Download release from https://downloads.openwrt.org/releases/21.02.0/targets/bcm27xx/bcm2711/openwrt-21.02.0-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz
gunzip openwrt-21.02.0-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz
dd if=openwrt-21.02.0-bcm27xx-bcm2711-rpi-4-ext4-factory.img of=/dev/SDCARD status=progress
mount rootfs to your pc
#!/bin/bash | |
# https://en.wikipedia.org/wiki/ANSI_escape_code#Colors | |
# Control Sequence Introducer | |
# https://en.wikipedia.org/wiki/ANSI_escape_code#CSI_(Control_Sequence_Introducer)_sequences | |
function csi() { | |
ESC="\033" | |
parameters=$(echo $@ | sed -e 's/ /;/g') | |
echo "$ESC[${parameters}m" | |
} |
using namespace System.Management.Automation | |
using namespace System.Management.Automation.Language | |
if ($host.Name -eq 'ConsoleHost') | |
{ | |
Import-Module PSReadLine | |
} | |
#Import-Module PSColors | |
#Import-Module posh-git | |
Import-Module -Name Terminal-Icons |
This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.
Description | Syntax |
---|---|
Get the length of a string | ${#VARNAME} |
Get a single character | ${VARNAME[index]} |