This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GIT USER PROFILE SETTING / SWITCHING | |
# This will strip the current static User from the current repo and Include an external User profile. | |
# This function relies on: Git, A Git Repo, a config file located in ~/config/git/profilename.user.config | |
# Format must be profilename.user.config | |
# Usage: gituser home => ~/config/git/home.user.config | |
# Usage: gituser "Work GitHub" => ~/config/git/Work Github.user.config | |
gituser() { | |
# Sanity check | |
if [ -z "$(which git)" ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tell our specifc panel options to wake up. | |
tell application "System Preferences" | |
reveal anchor "output" of pane id "com.apple.preference.sound" | |
end tell | |
# Save our Current Output Device as well as a List of Available Output Devices. | |
tell application "System Events" | |
tell process "System Preferences" | |
tell window "Sound" | |
tell tab group 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global songDeleted | |
global selectedSong | |
global safetyCheck | |
# This variable is used as a boolean to see if a file has been deleted or not | |
set songDeleted to false | |
# This variable is used to store the alias location of the song to be deleted / added | |
set selectedSong to false | |
# This variable is used to track whether we've attempted a safe workaround to deleting a current song | |
set safetyCheck to false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global songAdded | |
global selectedSong | |
# This variable is used as a boolean to see if a file has been added to iTunes or not | |
set songAdded to false | |
# This variable is used to store the alias location of the song to be deleted / added | |
set selectedSong to false | |
getSong() | |
addSong(selectedSong) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global songAdded | |
global songDeleted | |
global selectedSong | |
global safetyCheck | |
# This variable is used as a boolean to see if a file has been added to iTunes or not | |
set songAdded to false | |
# This variable is used as a boolean to see if a file has been deleted or not | |
set songDeleted to false | |
# This variable is used to store the alias location of the song to be deleted / added |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
########################################### | |
## | |
## Name: idleSleepDisplay.sh | |
## | |
## Description: Sleep Display if Idle | |
## Author: James W Mann <[email protected]> | |
## | |
## Notes: Minimum Idle time is set for 30 minutes ( 1800 seconds ) by default. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# | |
# Initialize & Install MacOS Dev Tools with Default Homebrew / Casks | |
# To execute: save and `chmod +x ./macos-init.sh` then `./macos-init.sh` | |
# | |
# MacVim Requires the entirety of XCode to install, so install XCode before. | |
# Then Run `sudo xcode-select -s /Applications/Xcode.app/Contents/Developer` to use those command-line tools. | |
# Modern Homebrew should be installing XCode commandline tools on its own if it's missing | |
# If it doesn't, `xcode-select --install` should install it. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Author: James W Mann (jwmann) | |
# Dependencies: homebrew, SwitchAudioSource (https://github.com/deweller/switchaudio-osx) | |
# Notes: If SwitchAudioSource, the script will install it automatically | |
# See all audio devices: $> SwitchAudioSource -a | |
# Manually switch with: $> SwitchAudioSource -s device_name | |
toggle_audio() { | |
brew=/usr/local/bin/brew | |
if [ -f $brew ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
sortMedia() { | |
EXIFTOOL=/opt/homebrew/bin/exiftool | |
DEFAULT_SOURCE_DIR_PATH="./" # Current Directory | |
DEFAULT_DESTINATION_DIR_PATH="/Volumes/home/Photos/" # NAS Photos | |
EXIFDATETAG="${3:-CreateDate}" | |
PREFIX="${4:-jwm}" | |
SORT_FILETYPE="${5:-true}" | |
ALLOW_DUPS="${6:-true}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Auto-Like Strava Posts | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2.0 | |
// @description Like all the posts! | |
// @author James W Mann | |
// @match https://www.strava.com/dashboard | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=strava.com | |
// @grant none | |
// ==/UserScript== |
OlderNewer