Skip to content

Instantly share code, notes, and snippets.

View spokanemac's full-sized avatar
📡
Open to remote work.

JD spokanemac

📡
Open to remote work.
View GitHub Profile
@spokanemac
spokanemac / applecare_status.sh
Created November 6, 2024 00:37
If Apple Care is active, there may be a file in the primary Users Library folder.
#!/bin/sh
### If Apple Care is active, there may be a file in the primary Users Library folder.
### Get the current user's username and home folder location
loggedInUser=$(ls -l /dev/console | awk '{ print $3 }')
myUserHome=$(dscl . read /Users/$loggedInUser NFSHomeDirectory | awk '{print $NF}')
echo "The logged in user is $loggedInUser"
#!/bin/zsh
# This script will locate application components and remove them.
# Function to quit the application if it is running
quit_application() {
echo "Attempting to quit '$APP_NAME'..."
osascript -e "tell application \"$APP_NAME\" to quit"
# Wait for a few seconds to allow the application to quit
Key Description
Yes
No
Maybe or Partial
Not Applicable
Unknown or Unclear
*️⃣ Additional Requirements Needed
💲 Additional Cost on top of base licensing
macOS Feature for macOS
@spokanemac
spokanemac / scale-and-rename-image.sh
Last active May 11, 2023 18:16
Script loops over image filename(s) passes as an argument, upscaling it to 144 dpi using sips. It uses sips again to get the new width and height of the image, and renames the file to include the width, height, and "@2x" in the filename.
#!/bin/zsh
# Plugin: Scale and Rename Image
# Description: upscales an image to 144 dpi and renames the file to append the dimmensions.
# Author: Jack-Daniyel Strong <[email protected]>
# Date: 11-May-2023
# Version: 0.1
# ==============================================================================
if [ $# -eq 0 ]; then
echo "No arguments provided. Please provide image file(s) as arguments."
#!/bin/bash
#Check to see if RunClient is missing (indicates removal)
if [ ! -e /Library/MonitoringClient/RunClient ]; then
# if not found, let's download the latest and reinstall
/usr/bin/curl -L1 https://YOURSUBDOMAIN.monitoringclient.com/downloads/MonitoringClient.pkg -o /tmp/MonitoringClient.pkg
/usr/sbin/installer -target / -pkg /tmp/MonitoringClient.pkg
/bin/rm /tmp/MonitoringClient.pkg
exit 0
fi
@spokanemac
spokanemac / kiosk.sh
Last active October 27, 2018 23:44
Chrome Kiosk launch script for Raspberry Pi
#!/bin/bash
# Stop the Raspberry Pi’s display power management system from kicking in and blanking out the screen.
xset s noblank
xset s off
xset -dpms
# hide the cursor
unclutter -idle 0.5 -root &
@spokanemac
spokanemac / wpa_supplicant.conf
Created October 26, 2018 22:34
Raspberry Pi WiFi Initial configuration file. Replace YOURSSID and YOURPASSWORD with whatever is used for your network setup.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="YOURSSID"
psk="YOURPASSWORD"
scan_ssid=1
}
#!/usr/bin/env python
#
# A script to automate Watchman Monitoring's run plugin and zipping the resulting files
# Jack-Daniyel Strong
# 28-Feb-2017
#
# Import Libraries
import sys, os, zipfile, signal
from datetime import datetime

Keybase proof

I hereby claim:

  • I am spokanemac on github.
  • I am jackdaniyel (https://keybase.io/jackdaniyel) on keybase.
  • I have a public key whose fingerprint is E795 037D 422A 81D9 0189 2D94 1090 CD8F EF88 A0DC

To claim this, I am signing this object: