Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| # To avoid permissions problems, run this on Windows PowerShell, Core edition doesn't have SetAccessControl implemented at base level. | |
| # A variant for it is welcome. | |
| # Allow the powershell session to run this script with: | |
| # Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned | |
| function Set-SshPermissions { | |
| param ( | |
| $pkFile | |
| ) |
| # 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" | |
| } |
The background is that the default OpenWRT image for Raspberry Pi lacks drivers for the LAN port (RTL8111) on the DFRobot board. DFRobot provide an image, but that one is made from a quite old daily snapshot of OpenWRT which is not entirely stable. Also, it is better to know how to fish than be given a fish.
DFRobot's page about the router board:
https://wiki.dfrobot.com/Compute_Module_4_IoT_Router_Board_Mini_SKU_DFR0767
OpenWRT main page:
https://openwrt.org/
You are expected to have some general knowledge on Linux and OpenWRT. The instructions for flashing the resulting firmware image are presented on DFRobot's page.
| 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 |