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 / disable_k400r_tap_click.md
Last active March 21, 2024 14:14
Turn off Logitech k400r Tap to Click

Turn off k400r Tap to Click

Without even installing drivers, the Logitech k400r tap-to-click functionality can be turned off by holding down the "FN" (function) key and the left click button on the trackpad.

Source

@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; }
@ryanmaclean
ryanmaclean / salt_on_mac.md
Last active March 10, 2024 10:38
Install and Run Salt Stack on macOS Servers and Desktops

Install Salt on macOS

Install Homebrew

Install Dependencies

brew install python swig zmq
@ryanmaclean
ryanmaclean / disable_click_to_show_desktop.sh
Last active March 5, 2024 04:27
MacOS Sonoma Turn Off or Disable Click Wallpaper to Reveal Desktop Unless in Stage Manager
#!/usr/bin/env bash
set -euox
##
# Disable click to show desktop
# run with `bash disable_click_to_show_desktop.sh`
# or `chmod +x disable_click_to_show_desktop.sh && ./$_`
# `defaults` is pretty handy! https://ss64.com/mac/defaults.html
##
@ryanmaclean
ryanmaclean / ubuntu_mount_efs.md
Last active March 4, 2024 18:15
Mount EFS on Ubuntu Linux

EFS Mounting on Ubuntu

Get EFS ID

aws configure set preview.efs true
aws efs describe-file-systems --profile TEST --region us-east-2
{
@ryanmaclean
ryanmaclean / create-win10-usb-on-mac.sh
Last active February 20, 2024 01:45 — forked from bmatcuk/create-usb.sh
Create a Bootable UEFI Windows USB stick from an ISO on Apple macOS
# Just a quick update for GPT and to use `rsync` instead of `cp`!
# That means this applies to UEFI boot, though for legacy BIOD boot, feel free to swap
# GPT to MBR below.
# Requires https://homebrew.sh to split the install.wim file
brew install wimlib
# First, we need to find our device. BEFORE inserting your USB drive, run the
# following:
diskutil list
@ryanmaclean
ryanmaclean / logitech_custom_buttons_ubuntu.md
Last active January 23, 2024 07:58
Change Logitech Mouse Button Keys in Ubuntu Vivid

Change Logitech Mouse Buttons in Ubuntu

Dependencies

We'll need to install xbindtools and xev prior to configuring our mouse buttons:

sudo apt-get install xev xbindtools
@ryanmaclean
ryanmaclean / append_etc_hosts.sh
Last active November 27, 2023 08:45
Append or Replace /etc/hosts using Tee
#! /bin/bash
echo "127.0.0.1 localhost" | sudo tee --append /etc/hosts
echo "127.0.0.1" `ec2metadata --local-hostname` | sudo tee --append /etc/hosts
## Remove --append to overwrite the file
@ryanmaclean
ryanmaclean / accept_xcode_license.sh
Last active November 22, 2023 18:26
Accept Xcode License on the Command Line
# Run using "sudo accept_xcode_license.sh"
#
# Solving the OSX Yosemite Xcode Command Line Tools Licensing problem
# for multiple updates in order to script post-install tasks.
# Typical error reads after running "xcode-select --install" when setting up
# Homebrew is: "Agreeing to the Xcode/iOS license requires admin priviledges,
# please re-run as root via sudo"
#
# CREDIT:
# Based on a tip found at http://krypted.com/mac-os-x/licensing-the-xcode-command-line-tools/
@ryanmaclean
ryanmaclean / rocky-docker.sh
Created July 13, 2021 00:18
Install Docker on Rocky Linux
#!/usr/bin/env bash
## Script to install docker-ce on Rocky Linux
## Run using `sudo rocky-docker.sh`
# Ensuring "GROUP" variable has not been set elsewhere
unset GROUP
echo "Removing podman and installing Docker CE"
dnf remove -y podman buildah