Skip to content

Instantly share code, notes, and snippets.

View jaybutzler's full-sized avatar

Jay Butzler jaybutzler

  • Kimberly-Clark Corp.
  • Wisconsin
  • X @JJButz
View GitHub Profile
@jaybutzler
jaybutzler / update_chain.sh
Last active August 20, 2022 15:56
Use openssl to fetch the certificate chain for a domain and add these certificates to the Ubuntu CA trust store.
#!/bin/bash
#
# Use openssl to fetch the certificate chain for a domain and add these
# certificates to the Ubuntu CA trust store. This is a fast and dirty
# method when using cloud services like ZScaler with SSL scanning, where
# the Cloud Enforcement Node certifcate changes frequently.
if [[ -z "$1" ]] ; then
echo Syntax error, please provide the fully qualified domain name
echo address: "update_chain google.com"
@jaybutzler
jaybutzler / permissions.md
Last active November 17, 2021 14:28
Linux Permissions

Linux Permission (Basics)

Linux permissions are a set of flags associated with each file determines who can access that file, and how they can access it. These flags are called file permissions or modes, as in "mode of access." The command name chmod stands for "change mode." It restricts the way a file can be accessed.

user	group	others
r w x	r w x	r w x
4 2 1	4 2 0	4 0 1

4+2+1 = 7 (rwx) # user
@jaybutzler
jaybutzler / searching_github.md
Created November 9, 2021 18:28
Searching Github
@jaybutzler
jaybutzler / nano_cheatsheet.md
Last active February 10, 2024 07:49
Nano Cheat Sheet

Nano Cheat Sheet

File handling

Command Description
Ctrl+S Save current file
Ctrl+O Offer to write file ("Save as")
Ctrl+R Insert a file into current one
Ctrl+X Close buffer, exit from nano
@jaybutzler
jaybutzler / screenrc.md
Last active November 17, 2021 14:10
Linux screen Configuration

Linux screen Configuration

Plade the following content in the users home directory and file "~/.screenrc".

shell -$SHELL
defscrollback 1024 

shelltitle "$ |bash"
@jaybutzler
jaybutzler / awk_cheatsheet.md
Last active November 5, 2021 15:47
awk_cheatsheet

AWK Cheat Sheet

Basics 1

Command Description
$1 Reference first column
awk '/pattern/ {action}' file Execute action for matched pattern 'pattern' on file 'file'
; Char to seperate two actions
print Print current record line
$0 Reference current record line

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r