Skip to content

Instantly share code, notes, and snippets.

View austinsonger's full-sized avatar
🙃
Localhost

Austin Songer,MIS,CEH,ESCA,Project+ (Navy Veteran) austinsonger

🙃
Localhost
View GitHub Profile
@BlackthornYugen
BlackthornYugen / caffeinate_unti.sh
Created December 15, 2023 17:18
Run caffeinate when battery is above a given value, preventing MacOS from sleeping.
#!/bin/bash
# Default values
verbose=0
min_battery=20
log() {
if [[ "$verbose" -gt 0 ]]; then
echo "$@"
fi
@kbagher
kbagher / mac_security_check.sh
Last active January 13, 2024 15:41
The script is a macOS security audit tool, checking vital features like System Integrity Protection, Gatekeeper, Firewall, and FileVault. It evaluates security settings, lists non-Apple kernel extensions, and logs failures for review, providing a quick, comprehensive security overview in an easily interpretable PASS/FAIL format.
#!/bin/bash
###### Tasks Requiring Manual Checking ######
# Review Installed Applications:
# Steps: Open Applications folder and Launchpad.
# Signs of Compromise: Unfamiliar or unexpected applications installed.
# Check App Permissions:
# Steps: System Preferences → Security & Privacy → Privacy tab.
# Signs of Compromise: Unusual permissions granted to unknown applications.
# Audit Browser Extensions:
@bhaktatejas922
bhaktatejas922 / ros2-install-mac.sh
Last active December 15, 2023 18:57
Macos Ros2 install script wth conda
#!/bin/zsh
# Ensure Xcode and Command Line Tools are installed
xcode-select --install
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -license
# Install Homebrew
which -s brew
# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$(/opt/homebrew/bin/brew shellenv)"
# Tap needed repos
brew tap homebrew/cask-fonts
# Install some stuff from Homebrew
brew install --cask \
alex313031-thorium \
@nathansgreen
nathansgreen / new-mac-iinit.sh
Last active February 26, 2024 15:02
Initial setup for a new MacOS install
#!/usr/bin/env sh
# stuff to do when setting up a fresh install of MacOS
set -o errexit -o nounset -o noclobber
[ -e /etc/pam.d/sudo_local ] || \
echo 'auth sufficient pam_tid.so' \
| sudo tee /etc/pam.d/sudo_local
softwareupdate --install-rosetta --agree-to-license
@syneart
syneart / meld_hotfix_sonoma.sh
Last active May 31, 2024 07:56
Meld v3.21.0(r4) hotfix on MacOS with Sonoma(14) Intel CPU / Apple silicon (M1,M2,M3) CPU with Rosetta
### Test on https://github.com/yousseb/meld/releases/tag/osx-20
### OSX - 3.21.0 (r4) Sonoma
### !!! Note: You need put the Meld.app r4 build to the /Applications path first.
#!/bin/zsh
#Fix libpng16.16.dylib not found
install_name_tool -change /usr/local/opt/libpng/lib/libpng16.16.dylib @executable_path/../Frameworks/libpng16.16.dylib /Applications/Meld.app/Contents/Frameworks/libfreetype.6.20.0.dylib
#Fix libbrotlidec.1.dylib not found
@doraTeX
doraTeX / ocr.sh
Last active April 19, 2024 13:04
A shell script to perform OCR on images/PDFs using macOS built-in OCR engine
#!/bin/bash
SCRIPTNAME=$(basename "$0")
function realpath () {
f=$@;
if [ -d "$f" ]; then
base="";
dir="$f";
else
base="/$(basename "$f")";
@peteristhegreat
peteristhegreat / generate.sh
Last active May 30, 2024 01:50
List gists as links with descriptions
#!/usr/bin/env bash
# git clone git@github.com:14e1a09abfdb9e762683c10cfeff3b4a.git gists-blog
# cd gists-blog
# ./generate.sh
# git add .
# git commit -m "updated links"
# git push
page_count=$(curl -I https://api.github.com/users/peteristhegreat/gists | grep link | grep -oP '(?<=\?page=)(\d+)(?=>; rel="last")')
# local
- Fig (https://github.com/withfig/autocomplete)
- Final Cut Pro (https://www.apple.com/tw/final-cut-pro/)
- ScreenBrush (https://imagestudiopro.com/screenbrush/)
- Paint X (https://paint-x.com/)
- Skitch (https://evernote.com/intl/zh-tw/products/skitch)
- Snipaste (https://www.snipaste.com/)
- GifCapture (https://github.com/onmyway133/GifCapture)
- OBS (https://obsproject.com/)
- BlackHole (https://github.com/ExistentialAudio/BlackHole)
@OleksandrKucherenko
OleksandrKucherenko / dependencies.sh
Created August 30, 2022 09:51
MACOSX Script contains helper functions that allows verification of script dependencies. Is required tool installed on the laptop? Is the tool version is right? What developer should do to fix the dependency?
#!/usr/bin/env bash
# shellcheck disable=SC2034
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck disable=SC1090 source=commons.sh
source "$SCRIPT_DIR/commons.sh"
logger dependencies "$@" # register own debug tag & logger functions
#set -x # Uncomment to DEBUG