Skip to content

Instantly share code, notes, and snippets.

View jzadeh's full-sized avatar
💭
Learning to Learn

Joseph Zadeh jzadeh

💭
Learning to Learn
View GitHub Profile
#!/usr/bin/env zsh
#===========================================================================
# * INFO
#
# macOS Preferences Defaults
# By Christopher Allen @ChristopherA https://github.com/christophera/
# My most basic macOS preferences, in this gist to make it easy to load on
# multiple machines and VMs. Ideally runs on all macOS versions since Yosemite,
@jzadeh
jzadeh / DisableBigSurMonterey.sh
Created October 8, 2024 04:01 — forked from gopsmith/DisableBigSurMonterey.sh
Disable Big Sur and Monterey services
#!/bin/zsh
# CREDITS: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Big Sur revision by b0gdanw https://gist.github.com/b0gdanw/40d000342dd1ba4d892ad0bdf03ae6ea
# TEMPORARILY disabling (e.g. STOPPING via 'bootout') unwanted services on macOS 11 Big Sur and macOS 12 Monterey:
# This version is for a special boot that optimizes for real-time music performance and streaming video.
# Due to the read-only system volume introduced with macOS Catalina, this script can NOT be run in Recovery mode's Terminal.
# For my purposes I leave WiFi enabled, for streaming video to a local router with no internet connection.
#!/bin/zsh
# WARNING! The script is meant to show how and what can be disabled. Don’t use it as it is, adapt it to your needs.
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12), macOS Ventura (13) and macOS Sonoma (14)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user
@jzadeh
jzadeh / install_pyenv_mac_zsh.rst
Created July 31, 2024 04:23 — forked from josemarimanio/install_pyenv_mac_zsh.rst
Installing pyenv on macOS for Zsh using Homebrew
@jzadeh
jzadeh / .zshrc
Created September 24, 2023 23:40 — forked from StumblinGrumblin/.zshrc
My .zshrc File | Make sure to run [$ brew install coreutils]
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="grumbley"
DEFAULT_USER=`whoami`
@jzadeh
jzadeh / homebrew-gnubin.md
Created September 24, 2023 23:39 — forked from skyzyx/homebrew-gnubin.md
Using GNU command line tools in macOS instead of FreeBSD tools

macOS is a Unix, and not built on Linux.

I think most of us realize that macOS isn't a Linux OS, but what that also means is that instead of shipping with the GNU flavor of command line tools, it ships with the FreeBSD flavor. As such, writing shell scripts which can work across both platforms can sometimes be challenging.

Homebrew

Homebrew can be used to install the GNU versions of tools onto your Mac, but they are all prefixed with "g" by default.

All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc.

@jzadeh
jzadeh / hax.sh
Created July 25, 2023 13:00 — forked from iGlitch/hax.sh
macOS provisioning, hardening, tweaking, whatever script - no more phone home
#!/bin/bash
# Let's "secure" even the script for you :)
sudo -v
function ok() {
echo -e "[OK] "$1
}
function bot() {