This file contains hidden or 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
| <?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/> |
This file contains hidden or 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
| #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); |
This file contains hidden or 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 | |
| # 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 |
This file contains hidden or 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/swift | |
| import Foundation | |
| /* | |
| * rle.swift | |
| * | |
| * Author: Chad Armstrong | |
| * Date: 21 July 2018 | |
| * Description: Example of encoding a string using Run Length Encoding | |
| * Example: The string aabbbaaaac will be encoded as 2a3b4a1c |
This file contains hidden or 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
| /* | |
| * export_words_tok.m | |
| * | |
| * Description: Reverse engineer the WORDS.TOK file from an AGI Sierra game. | |
| * The results are saved into two files: words.txt and words.json | |
| * Author: Chad Armstrong ([email protected]) | |
| * Date: 25-28 June 2018 | |
| * To compile: gcc -w -framework Foundation export_words_tok.m -o export_words | |
| * | |
| * Resources: |
This file contains hidden or 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
| /* | |
| * filesize.m | |
| * Description: Multiple ways to calculate the size of a file's resource fork | |
| * Author: Chad Armstrong | |
| * Date: 14 April 2018 (Updated 28 October 2022) | |
| * To compile: gcc -w -framework Cocoa filesize.m -o filesize | |
| * To run: ./filesize path/to/file | |
| */ | |
| /* References: |
This file contains hidden or 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
| -- Source: http://hints.macworld.com/article.php?story=2002041207430253 | |
| display dialog "Force Empty Trash?" buttons ¬ | |
| {"Cancel", "Trash"} default button "Trash" with icon note | |
| set the user_choice to the button returned of the result | |
| if the user_choice is "Trash" then | |
| display dialog "Are you sure?" buttons {"No", "Yes"} ¬ | |
| default button "No" with icon note | |
| set the user_choice to the button returned of the result |
This file contains hidden or 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
| /* | |
| * checkFilePermissions.m | |
| * Description: A collection of methods which checks if a given file can be deleted | |
| * and checks other permissions and properties. | |
| * Author: Chad Armstrong | |
| * Date: 1 December 2017 | |
| * To compile: gcc -w -framework Foundation -framework AppKit checkFilePermissions.m -o checkFilePermissions | |
| */ | |
| #import <Foundation/Foundation.h> |
This file contains hidden or 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
| // | |
| // Generated by class-dump 3.5 (64 bit). | |
| // | |
| // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. | |
| // | |
| #pragma mark Blocks | |
| typedef void (^CDUnknownBlockType)(void); // return type and parameters are unknown |
This file contains hidden or 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 application "System Events" to tell process "Finder" | |
| -- Menu bar item 1 is the Apple menu | |
| click menu item "Lock Screen" of menu 1 of menu bar item 1 of menu bar 1 | |
| end tell |