Skip to content

Instantly share code, notes, and snippets.

View austinsonger's full-sized avatar
🙃
Localhost

Austin Songer, CISSP austinsonger

🙃
Localhost
View GitHub Profile
@aashari
aashari / 00 - Cursor AI Prompting Rules.md
Last active May 21, 2025 08:29
Cursor AI Prompting Rules - This gist provides structured prompting rules for optimizing Cursor AI interactions. It includes three key files to streamline AI behavior for different tasks.

Cursor AI Prompting Framework Usage Guide

This guide explains how to use the structured prompting files (core.md, refresh.md, request.md) to optimize your interactions with Cursor AI, leading to more reliable, safe, and effective coding assistance.

Core Components

  1. core.md (Foundational Rules)
    • Purpose: Establishes the fundamental operating principles, safety protocols, tool usage guidelines, and validation requirements for Cursor AI. It ensures consistent and cautious behavior across all interactions.
    • Usage: This file's content should be persistently active during your Cursor sessions.
@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 16, 2025 08:00
Meld v3.21.0 (r4) hot-fix for macOS on Intel CPU / Apple Silicon 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 February 20, 2025 14:25
A shell script to perform OCR on images/PDFs using macOS built-in OCR engine -- https://doratex.hatenablog.jp/entry/20230629/1687977178
#!/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 October 1, 2024 18:23
List gists as links with descriptions
#!/usr/bin/env bash
# git clone [email protected]: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
- ScreenBrush (https://imagestudiopro.com/screenbrush/)
- Presentify (https://presentifyapp.com/)
- PhotoScape X (http://x.photoscape.org/)
- Paint X (https://paint-x.com/)
- Skitch (https://evernote.com/intl/zh-tw/products/skitch)
- Seashore (https://github.com/robaho/seashore)
- CleanShot X (https://cleanshot.com/)
- Snipaste (https://www.snipaste.com/)
- GifCapture (https://github.com/onmyway133/GifCapture)