Skip to content

Instantly share code, notes, and snippets.

Avatar

Chad Armstrong edenwaith

View GitHub Profile
@edenwaith
edenwaith / build_ags.sh
Created Dec 12, 2020
A script to build a shell Mac app bundle from AGS 3.5.0
View build_ags.sh
#!/bin/sh
# Place this script in the folder which contains CMakeLists.txt
export BUILD_TYPE=release
mkdir build_$BUILD_TYPE
cd build_$BUILD_TYPE
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
make
@edenwaith
edenwaith / make-android-icons.sh
Last active Dec 11, 2020
Take an image and output to various Android resolutions (ldpi - xxxhdpi)
View make-android-icons.sh
#!/bin/sh
# make-android-icons.sh
# Author: Chad Armstrong
# Date: 11 December 2020
# Description: Take an image and output to various Android resolutions (ldpi - xxxhdpi)
# This script runs under macOS and requires ImageMagick to be installed.
# Need ImageMagick first
@edenwaith
edenwaith / build_app_bundle.sh
Last active Jan 2, 2021
Build and deploy the Mac app bundle for QT AGI Studio
View build_app_bundle.sh
#!/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 Jan 9, 2021
Check to see if an AGI Sierra game is either version 2 or 3.
View FindAGIGameID.c
/*
* 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 Feb 25, 2020
AppleScript to close all Atlassian-related tabs in Google Chrome
View CloseAcmeTabs.scpt
-- 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 Jan 22, 2020
Launch Agent property list to launch the Mark Unread Emails AppleScript each day at 9:00.
View local.markunreademails.plist
<?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 Sep 7, 2021
An AppleScript to go through the mailboxes in Outlook and mark unread messages as read
View MarkUnreadEmails.scpt
-- 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 Nov 23, 2019 — forked from Angles/AppleScript.plist
AppleScript for TextWrangler v2.0
View AppleScript.plist
<?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 Sep 7, 2021
AppleScript: Count the number of open tabs in Google Chrome
View CountOpenChromeTabs.scpt
-- 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
BBEdit Codeless Language Module for Sierra On-Line's AGI LOGIC
View agi-logic.plist
<?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/>