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
| -- 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" |
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
| import BaseHTTPServer | |
| from SimpleHTTPServer import SimpleHTTPRequestHandler | |
| import sys | |
| import base64 | |
| key = "" | |
| class AuthHandler(SimpleHTTPRequestHandler): | |
| ''' Main class to present webpages and authentication. ''' | |
| def do_HEAD(self): |