Skip to content

Instantly share code, notes, and snippets.

View ryanmaclean's full-sized avatar
🍩
Running tf apply 💜

Ryan MacLean ryanmaclean

🍩
Running tf apply 💜
View GitHub Profile
@ryanmaclean
ryanmaclean / promiscous_enable.sh
Last active July 18, 2024 14:58
Allow VMWare Fusion Promiscuous Mode on macOS Sierra
#!/bin/bash
sudo touch "/Library/Preferences/VMware Fusion/promiscAuthorized"
@ryanmaclean
ryanmaclean / ub_dhcpd_lease_list.sh
Last active August 23, 2016 20:16
Ubiquity EdgeRouter Lite DHCPd Leases from Command Line
cat /config/dhcpd.leases | grep -E '(lease|client-hostname)' | tr -d {
@ryanmaclean
ryanmaclean / mesos_mac_slave.sh
Created August 9, 2016 00:30
Start Mesos Mac Slave
#!/bin/bash
/usr/local/sbin/mesos-slave --master=10.1.1.1:5050
@ryanmaclean
ryanmaclean / mac_hostname.sh
Created August 9, 2016 00:29
Mac Hostname Script
#!/bin/bash
newhostname=nmp
echo "$(ipconfig getifaddr en0) $newhostname" | sudo tee -a /etc/hosts
sudo scutil --set HostName $newhostname
@ryanmaclean
ryanmaclean / fix_mini.sh
Created August 9, 2016 00:28
Mac Mini 2014 Slow
#!/bin/bash
sudo rm ~/Library/Caches/CloudKit/CloudKitMetadata*;sudo killall cloudd
@ryanmaclean
ryanmaclean / remove_bad_known_host.sh
Created May 19, 2016 00:06
Remove an Entry From known_hosts
#!/bin/bash
# Replace '1d' with the offending line number, for example '10d' would be for the 10th line
# The line number is the number after ":" in your warning, for example:
# "Offending ECDSA key in /home/root/.ssh/known_hosts:10"
sed -i '1d' ~/.ssh/known_hosts
@ryanmaclean
ryanmaclean / check_homebrew_install.sh
Last active January 5, 2022 16:53
Check if Homebrew is Installed Via Bash
#!/bin/sh
# Check to see if Homebrew is installed, and install it if it is not
command -v brew >/dev/null 2>&1 || { echo >&2 "Installing Homebrew Now"; \
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"; }
@ryanmaclean
ryanmaclean / 6mcal.sh
Created April 25, 2016 21:00
Display 6 Month Calendar in Bash
#!/bin/bash
cal -A 3 -B 2
# Result
# February 2016 March 2016 April 2016
#Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa
# 1 2 3 4 5 6 1 2 3 4 5 1 2
# 7 8 9 10 11 12 13 6 7 8 9 10 11 12 3 4 5 6 7 8 9
#14 15 16 17 18 19 20 13 14 15 16 17 18 19 10 11 12 13 14 15 16
#21 22 23 24 25 26 27 20 21 22 23 24 25 26 17 18 19 20 21 22 23
@ryanmaclean
ryanmaclean / osx_port_scan.sh
Created April 25, 2016 05:52
Mac OSX: Port Scan Your Own Network with Netcat from Homebrew
#!/bin/bash
# Turn on job control to do more than one at a time
set -m
# Check to see if Homebrew is installed, and install it if it is not
command -v brew >/dev/null 2>&1 || { echo >&2 "You will need Homebrew to use this tool, installing now"; /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"; }
# Check to see if `netcat` is installed, install it if it is not
command -v netcat >/dev/null 2>&1 || { echo >&2 "You will also need netcat in order to use this tool, installing it now"; brew install netcat; }

git clone --recursive http://github.com/ryanmaclean/5-min-belk-stack.git