Skip to content

Instantly share code, notes, and snippets.

View tsharley's full-sized avatar

TJ Sharley tsharley

View GitHub Profile
@tsharley
tsharley / README-Fancy.md
Created November 11, 2024 09:24 — forked from ramantehlan/README-Fancy.md
README template I use for most of my projects.

Introduction

  • Add your project logo.
  • Write a short introduction to the project.
  • If you are using badges, add them here.

📒 Index

@tsharley
tsharley / Mac SSH Autocomplete
Created May 12, 2024 05:51 — forked from aliang/Mac SSH Autocomplete
Add auto complete to your ssh, put into your .bash_profile
_complete_ssh_hosts ()
{
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
comp_ssh_hosts=`cat ~/.ssh/known_hosts | \
cut -f 1 -d ' ' | \
sed -e s/,.*//g | \
grep -v ^# | \
uniq | \
grep -v "\[" ;
@tsharley
tsharley / docker-compose.yml
Created March 17, 2024 10:36 — forked from davidostermann/docker-compose.yml
Docker compose Postgres Adminer
version: '3.1'
services :
db:
image: postgres:10-alpine
ports:
- "5432:5432"
environment:
POSTGRES_USER: user1
POSTGRES_PASSWORD: changeme
POSTGRES_DB: tododb
@tsharley
tsharley / ANSI.md
Created January 28, 2024 16:56 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@tsharley
tsharley / bash_pre_post_hook.md
Last active January 25, 2024 13:51 — forked from jeandat/pre_post_hook_prompt.md
Bash pre- & post-command hooks

Bash pre- & post-command hooks

Explained here.

AT_PROMPT=1

function PreCommand() {
	# This will run before any command is executed.
	if [ -z "$AT_PROMPT" ]; then