Skip to content

Instantly share code, notes, and snippets.

View edenwaith's full-sized avatar

Chad Armstrong edenwaith

View GitHub Profile
@edenwaith
edenwaith / build_app_bundle.sh
Last active January 2, 2021 03:00
Build and deploy the Mac app bundle for QT AGI Studio
#!/bin/sh
# build_app_bundle.sh
# Author: Chad Armstrong (chad@edenwaith.com)
# Date: 17 October 2020 - 1 January 2021
# Note: Run this script in the same directory as the agistudio.app bundle
# Print out the current working directory
function cwd {
PWD=`pwd`
echo "Current working directory is: $PWD\n"
@edenwaith
edenwaith / FindAGIGameID.c
Last active January 9, 2021 17:54
Check to see if an AGI Sierra game is either version 2 or 3.
/*
* FindAGIGameID.c
* Description: Check to see if an AGI Sierra game is either version 2 or 3.
* Author: Chad Armstrong
* Date: 29 April 2020
* To compile: gcc -Wall -o FindAGIGameID FindAGIGameID.c
* To run: ./FindAGIGameID
*
* References:
* - https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/glob.3.html
@edenwaith
edenwaith / CloseAcmeTabs.scpt
Created February 25, 2020 18:14
AppleScript to close all Atlassian-related tabs in Google Chrome
-- File: CloseAcmeTabs.scpt
-- Description: Iterate through all open Google Chrome windows and close any Atlassian-related tabs.
-- Author: Chad Armstrong
-- Date: 25 February 2020
tell application "Google Chrome"
-- Iterate through every Chrome tab and find any Atlassian pages (JIRA, Confluence)
set windowList to every tab of every window whose (URL starts with "https://wiki.acme.com/") or (URL starts with "https://jira.acme.com/")
set tabsToClose to 0
repeat with tabList in windowList
@edenwaith
edenwaith / local.markunreademails.plist
Last active January 22, 2020 17:23
Launch Agent property list to launch the Mark Unread Emails AppleScript each day at 9:00.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.markunreademails</string>
<key>ProgramArguments</key>
<array>
<!-- osascript /Users/chadarmstrong/Projects/Scripts/MarkUnreadEmails.scpt -->
<string>/usr/bin/osascript</string>
@edenwaith
edenwaith / MarkUnreadEmails.scpt
Last active January 21, 2024 13:52
An AppleScript to go through the mailboxes in Outlook and mark unread messages as read
-- File: MarkUnreadEmails.scpt
-- Description: Go through the mailboxes in Outlook and mark unread messages as read
-- Author: Chad Armstrong
-- Date: 22 November 2019
tell application "Microsoft Outlook"
set myInbox to folder "Inbox" of default account
set github to folder "GitHub" of myInbox
set other to folder "Other" of myInbox
@edenwaith
edenwaith / AppleScript.plist
Created November 23, 2019 02:22 — forked from Angles/AppleScript.plist
AppleScript for TextWrangler v2.0
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!-- (ORIGINAL AUTHOR, ORIGINAL HEADER)
BBEdit Applescript Codeless Language Module.
Bill Hernandez <http://www.mac-specialist.com/>
Version 1.0.1
Updated - Monday, November 20, 2006 ( 6:41 PM )
Updated - Tuesday, November 21, 2006 ( 10:05 PM )
@edenwaith
edenwaith / CountOpenChromeTabs.scpt
Last active May 29, 2022 07:56
AppleScript: Count the number of open tabs in Google Chrome
-- CountOpenChromeTabs.scpt
-- Author: Chad Armstrong
-- Date: 30 August 2019
-- Description: Count the number of open tabs in Google Chrome
-- To run from CLI: osascript CountOpenChromeTabs.scpt
-- To create an alias command:
-- In ~/.bash_profile, add the line: alias counttabs='osascript ~/Projects/Scripts/CountOpenChromeTabs.scpt'
-- Refresh the bash shell environment: source ~/.bash_profile
tell application "Google Chrome"
@edenwaith
edenwaith / agi-logic.plist
Created May 21, 2019 01:25
BBEdit Codeless Language Module for Sierra On-Line's AGI LOGIC
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BBEditDocumentType</key>
<string>CodelessLanguageModule</string>
<key>BBLMColorsSyntax</key>
<true/>
<key>BBLMIsCaseSensitive</key>
<true/>
@edenwaith
edenwaith / lcd_exp.ino
Created November 27, 2018 01:25
Take input from the keyboard and print it to a 16x2 LCD display.
#include <LiquidCrystal.h>
// LiquidCrystal display with:
// rs on pin 12
// rw on pin 11
// enable on pin 10
// d4-7 on pins 5 - 2
// LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);
// LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
@edenwaith
edenwaith / clear_cal_cache.sh
Last active March 1, 2024 07:54
Clear the cached calendars for macOS Calendar
#!/bin/sh
# Author: Chad Armstrong
# Date: 29 August 2018
# Description: Clear the cached calendars for macOS Calendar
# References:
# https://michaelkummer.com/technology/fix-calendar-cant-save-event-x-exchange/
# https://wilkinsit.ca/mac-osx/clear-calendar-cache-mac-os/
# https://stackoverflow.com/a/3510850/955122