Skip to content

Instantly share code, notes, and snippets.

@shawngmc
shawngmc / readme.md
Last active September 5, 2025 22:22
Optimizing C/C++ compilation

I'm getting interested in optimized compiling.

C/C++

  • Flags
    • Gentoo's Safe CFLAGS might be a great starting point!
    • march:
      • ZNVER4/x86_64v4 looks interesting.
      • ZNVER4 will cause tuning (-mtune), x86_64v4 will not.
  • Gentoo's Safe CFLAGS might be a great starting point
@shawngmc
shawngmc / readme.md
Last active August 27, 2025 19:31
Set Top Box
@shawngmc
shawngmc / cachyos_setup.md
Last active August 5, 2025 08:54
DeckU Project

Setup on Cachy OS w/KDE

CachyOS

  • Auto-Login
    • During CachyOS Install
  • Sleep/Auto-Lock
    • KDE Settings
      • Screen Locking: Lock Screen Automatically -> Never, Apply
      • Power Management, Display and Brightness, Turn Off Screen -> Never, Apply
  • Install Sunshine
    • Install package pacman -S sunshine
@shawngmc
shawngmc / README.md
Last active March 4, 2025 08:34
Lightweight Linux Laptop

GNOME Settings

Power

  • General > Show Battery Percentage: On

Appearance

  • Style: Dark
  • Accent: Green
  • BG: Static, row 1, col 3
@shawngmc
shawngmc / stuff.sh
Created December 11, 2024 04:22
Mac Setup Stuff
# Install brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install bitwarden
brew install visual-studio-code
brew install google-chrome
brew install firefox
@shawngmc
shawngmc / add-path
Last active November 16, 2024 17:26
Bash helper: Add Path
#!/bin/bash
# Based on: https://dev.to/christianpaez/simplifying-path-management-with-bash-4870
# Install via:
# sudo curl -o /usr/bin/add-path -L https://gist.githubusercontent.com/shawngmc/954ef4ccee03a26f1774c5b922e27777/raw/add-path
# sudo chmod 755 /usr/bin/add-path
unset dir_to_add
unset force_add
unset do_add
@shawngmc
shawngmc / readme.MD
Last active January 9, 2024 00:52
I hate SELinux!

Foreword

OK, so I love the idea of SELinux. I like the idea of process permissions and quasi-sandboxing. What I hate about SELinux is:

  • The lack of good, straightforward documentation
  • The awful UI/UX
  • The inconsistency and community split between AppArmor and SELinux

Let's see if I can help myself (and maybe you!) understand it a bit better.

Mode of Operation (How It Works)

Security context/label

@shawngmc
shawngmc / hubspace-clean.log
Last active January 3, 2023 17:15
Hubspace Log
homeassistant | s6-rc: info: service s6rc-oneshot-runner: starting
homeassistant | s6-rc: info: service s6rc-oneshot-runner successfully started
homeassistant | s6-rc: info: service fix-attrs: starting
homeassistant | s6-rc: info: service fix-attrs successfully started
homeassistant | s6-rc: info: service legacy-cont-init: starting
homeassistant | s6-rc: info: service legacy-cont-init successfully started
homeassistant | s6-rc: info: service legacy-services: starting
homeassistant | services-up: info: copying legacy longrun home-assistant (no readiness notification)
homeassistant | s6-rc: info: service legacy-services successfully started
homeassistant | 2023-01-03 17:03:52.653 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration pyscript which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
@shawngmc
shawngmc / apt-chromebook-dev.sh
Created November 14, 2022 21:26
Chromebook packages
# Updates
sudo apt-get update
# Prereqs
# Gnome-keyring - vscode uses, local secrets management
sudo apt-get install -y \
gnome-keyring
# Node/NPM/NVM
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
@shawngmc
shawngmc / .aws-creds
Last active August 16, 2024 19:12
Caddy Example Files
[default]
aws_access_key_id=XXXXXXXXXXXXXXXXXXXX
aws_secret_access_key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
aws_region=us-east-1