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
// | |
// CustomRoundedImageView.swift | |
// | |
// Created by Chad Armstrong on 3/2/24. | |
// Example in SwiftUI to demonstrate creating an Image with rounded corners with different radii | |
import SwiftUI | |
struct CustomRoundedRectShape: Shape { |
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
-- Any iOS Simulator which isn't the most current version has issues with working with the | |
-- system's clipboard, which makes things difficult if one wants to copy a lengthy username | |
-- into a field. This script is a workaround which will get the text from the system's | |
-- clipboard and then paste that text into a field in the active iOS Simulator. | |
-- Reference: https://stackoverflow.com/questions/15188852/copy-paste-text-into-ios-simulator | |
tell application "System Events" | |
set theText to get the clipboard as text | |
delay 1 | |
repeat with aCharacter in characters of theText | |
keystroke aCharacter |
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
/* ordered_dithering.c | |
* Code by Stephen Hawley from page 713 from the book Graphics Gems | |
* Generates a dithering matrix from the command line arguments. | |
* The first argument, size, determines the dimensions of the | |
* matrix, 2^size by 2^size | |
* The optional range argument is the range of values to be | |
* dithered over. By default, it is (2^size)^2, or simply the | |
* total number of elements in the matrix. | |
* The final output is suitable for inclusion in a C program. | |
* Date: 3 September 2023 |
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
/* | |
* ordered_dither.m | |
* | |
* Description: Convert an image to a black and white image and use ordered dithering | |
* Author: Chad Armstrong (chad@edenwaith.com) | |
* Date: 4-5 September 2023 | |
* To compile: gcc -w -framework Foundation -framework AppKit -framework QuartzCore ordered_dither.m -o ordered_dither | |
* To run: ./ordered_dither path/to/image.png [dither level] | |
* | |
*/ |
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
-- QFG5 Mac OS 9 Installer | |
-- Author: Chad Armstrong (chad@edenwaith.com) | |
-- Version History: | |
-- • Version 1.1 (April - May 2022) | |
-- • Version 1.0 (8 October 2001) | |
tell application "Finder" | |
set startupDisk to (name of startup disk) | |
set applicationsFolder to startupDisk & ":Applications:" |
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
-- File: CreateAccessibilityInspectorAlias.scpt | |
-- Description: Create an alias in the Applications folder which points to the | |
-- Accessibility Inspector.app contained within Xcode. | |
-- Author: Chad Armstrong (chad@edenwaith.com) | |
-- Date: 8 December 2021 | |
tell application "Finder" | |
set destinationFolder to "Macintosh HD:Applications" | |
set sourceApplication to "Macintosh HD:Applications:Xcode.app:Contents:Applications:Accessibility Inspector.app" | |
make new alias file at destinationFolder to sourceApplication | |
end tell |
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 | |
# 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 |
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 | |
# 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 |
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 | |
# 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" |
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
/* | |
* 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 |
NewerOlder