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 / parse-config-file-for-uncommented-lines.sh
Last active May 18, 2022 02:36
Bash script to parse and log only the configured *(uncommented)* lines/settings in a configuration file. *Used ‘kitty.conf’ as an example*.
# -----------------------------------------------------
# List of configured 'kitty.conf' options
#
# This File Only Shows The Set Options In 'kitty.conf'
# Which Makes It Easier To Know Which Options Are Configured
#
# This file is not a live/up-to-date list of set options,
# if an option was set and this file wasnt updated,
# the option will not show in this file until it is updated
#
@ConnerWill
ConnerWill / Enable-ChocolateyCompletion.ps1
Created May 18, 2022 02:32
Enable Chocolatey (choco) tab completion for PowerShell. Code block is to be added to your PowerShell profile (“$profile”). Source: https://docs.chocolatey.org/en-us/troubleshooting
# Import the Chocolatey Profile that contains the necessary code to enable
# tab-completions to function for `choco`.
# Be aware that if you are missing these lines from your profile, tab completion
# for `choco` will not function.
# See https://ch0.co/tab-completion for details.
# Source https://docs.chocolatey.org/en-us/troubleshooting
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
@ConnerWill
ConnerWill / figlet-tr.sh
Last active May 18, 2022 03:03
Pointless bash function to show an interesting figlet font with basic help menu. More of a test/example/template than anything :-) Requires figlet
### figlet-tr help
funcname="figlet-tr"
figlettrhelp="
TITLE:
$funcname [-h|--help] [string]
@ConnerWill
ConnerWill / bash-stdout-stderr-redirection.sh
Last active June 27, 2022 16:04
Hide stdout and stderr with this code after your command
#############################################################################
#############################################################################
## ##
## Hide stdout and stderr with this code after your command ##
## ##
## > /dev/null 2>&1 ##
## ##
## EXAMPLE: ##
## ##
## This command will now show any output: ##
@ConnerWill
ConnerWill / PowerShell-templates-snippets.md
Last active July 18, 2022 05:27
powershell resources

PowerShell-templates-snipets.md

Create a new PSCustomObject

@ConnerWill
ConnerWill / pkg
Last active July 18, 2022 18:08
'pkg' package manager wrapper for both Debian and Arch distros. (now in color! and with fzf!!!)
#!/data/data/com.termux/files/usr/bin/bash
set -eu
# Setup TERMUX_APP_PACKAGE_MANAGER
source "/data/data/com.termux/files/usr/bin/termux-setup-package-manager" || exit 1
show_help() {
local cache_size
local cache_dir=""
if [ "$TERMUX_APP_PACKAGE_MANAGER" = "apt" ]; then
@ConnerWill
ConnerWill / yay-search-pkg-array.sh
Last active July 18, 2022 23:34
Search for packages and return formatted names and descriptions: to be used to feed into fzf :):(
#!/bin/bash
##############################################################################:
##############################################################################:
##:
##:
####: DEFINE_CHAR_VARIABLES
##: {{{ DEFINE_CHAR_VARIABLES
_thin_line_sep="---------------------------------------------------"
@ConnerWill
ConnerWill / gh-gist-clone-pretty.md
Last active July 19, 2022 00:00
Clone GitHub Gists to folders named after the gist ... NOT THE HASH OF THE GIST ! :):(

Cloning this script with this script

  [dampsock@localhost] $ gh-gist-clone-pretty "e9e3a3902474ff4938c95a9c0c3d5bf1"
    Cloning into 'gh-gist-clone-pretty.sh'...
    remote: Enumerating objects: 3, done.
    remote: Counting objects: 100% (3/3), done.
    remote: Compressing objects: 100% (3/3), done.
    remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
    Receiving objects: 100% (3/3), done.
@ConnerWill
ConnerWill / entities.json
Last active July 21, 2022 02:14
Unicode symbols are Unicode characters which are not part of a script used to write a natural language, but is nonetheless available for use as part of a text.
{
"&AElig": { "codepoints": [198], "characters": "\u00C6" },
"Æ": { "codepoints": [198], "characters": "\u00C6" },
"&AMP": { "codepoints": [38], "characters": "\u0026" },
"&": { "codepoints": [38], "characters": "\u0026" },
"&Aacute": { "codepoints": [193], "characters": "\u00C1" },
"Á": { "codepoints": [193], "characters": "\u00C1" },
"Ă": { "codepoints": [258], "characters": "\u0102" },
"&Acirc": { "codepoints": [194], "characters": "\u00C2" },
"Â": { "codepoints": [194], "characters": "\u00C2" },
@ConnerWill
ConnerWill / gen-reponames-figlet.md
Created July 29, 2022 21:56
repo name in figlet fonts generator
gh repo list --visibility public  |grep ConnerWill/ | cut -f1 | cut -d/ -f2 |  xargs -I{} figlet -f wideterm {} | sort

AutoHotKey-Script-Pack

CAPshift

ConnerWill

CopyAddVPNCommand