Skip to content

Instantly share code, notes, and snippets.

View ConnerWill's full-sized avatar
👽
These pretzels are making me thirsty

ConnerWill

👽
These pretzels are making me thirsty
View GitHub Profile
@ConnerWill
ConnerWill / Convert-ImageToAsciiArt.ps1
Last active November 30, 2024 01:53
Convert-ImageToAsciiArt - PowerShell function to convert an image to ascii art
# 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.
@ConnerWill
ConnerWill / bash_progress_bar.sh
Created September 3, 2022 02:29
Bash Progress Bar
#!/bin/env bash
### FUNCTION ###{{{
function bash_progress_bar(){
## Localize Variables ##{{{
local \
@ConnerWill
ConnerWill / ANSI-escape-sequences.md
Last active December 26, 2024 09:53
ANSI Escape Sequences cheatsheet

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@ConnerWill
ConnerWill / hardened-sshd_config
Last active December 8, 2023 16:43
hardened-sshd_config
##: ==============================================
##: [ 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
@dergeberl
dergeberl / README.md
Created September 8, 2021 19:46
Raspberry Pi cm4 dfrobot router board - openwrt 21.02 installation
@gbroques
gbroques / rgb.bash
Last active November 28, 2022 20:19
RGB Colors in Bash
#!/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"
}
@cstroe
cstroe / linux-mint-mate-20.2-install-docker.md
Last active October 21, 2024 07:39
Install Docker on Linux Mint 20.2 Mate Edition

Install Docker on Linux Mint 20.2 Mate Edition

Using the Graphical User Interface (GUI)

  1. Click the Linux Mint Menu Button at the bottom left of the screen to open the Linux Mint Menu.
  2. Under the "System" section, click "Software Manager".
  3. In the Software Manager window, use the search box at the top right and search for "docker".
  4. Click on "Docker.io - Linux Container Runtime".
  5. Click the green "Install" button at the top right. Enter your administrator password when prompted.
  6. Open the Linux Mint Menu again (see step 1), search for "Users and Groups", and click it to open the "User Settings".
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

ZSH CheatSheet

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.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@XSystem252
XSystem252 / RaspberryPi4Archlinux64EncryptionUSBBootBtrfsGuide.md
Last active September 14, 2024 19:37
How To Set Up a Raspberry Pi 4 with Archlinux 64-bit (AArch64) and Full Disk Encryption (+SSH unlock), USB Boot (No SD-Card) and btrfs

How To Set Up a Raspberry Pi 4 with Archlinux 64-bit (AArch64) and Full Disk Encryption (+SSH unlock), USB Boot (No SD-Card) and btrfs

Written by: XSystem
First published on: 20 Dec 2020
Last updated on: 20 Dec 2020

[0] Introduction

Overview