Skip to content

Instantly share code, notes, and snippets.

View atroia's full-sized avatar
🎧

Aaron Troia atroia

🎧
  • Idaho
View GitHub Profile
@atroia
atroia / fantasyWHIP.scpt
Created April 12, 2024 00:26
Baseball WHIP
display dialog "Enter hits:" default answer ""
set runs to the text returned of the result
display dialog "Enter walks:" default answer ""
set walks to the text returned of the result
display dialog "Enter innings:" default answer ""
set inning to the text returned of the result
set inningMod to inning mod 1
@atroia
atroia / fantasyERA.scpt
Created April 11, 2024 19:12
Determine Pitchers ERA - AppleScript
-- User input 1
display dialog "Enter the runs scored:" default answer ""
set runsScored to the text returned of the result
set fullGameRuns to runsScored * 9
-- User input 2
display dialog "Enter the lenth the picher has pitched (in decimal):" default answer ""
set inning to the text returned of the result
-- Determine if decimal, covert properly
@atroia
atroia / sigCheck.jsx
Last active November 9, 2023 19:30
Print Signature Check
var scptName = "Export PDFs"
var scptVersion = "v1.6.1"
var g = {};
var d = app.activeDocument;
var pageCount = d.pages.length;
main();
function main() {
try {
@atroia
atroia / showTextThreads.jsx
Created October 5, 2023 23:59
Turn InDesign Text Threads on/off
app.menuActions.itemByID(24332).invoke();
# -------------------------------
# EPUB MANAGEMENT
# -------------------------------
# KF8
# ------------------------------------------------------------
alias mkkf8='cd OEBPS;kindle29;mv content.mobi ../../Amz_KF8_v$(date +'%Y%m%d-%H%M%S').mobi; cd ../..; mv *.mobi ~finals; cd ~finals; open "`ls -t | grep .mobi | head -1`"' # adds incrementing number to file name an$
alias kindle29='echo -e "\n\n/* ----- KindleGen 2.9 ----- */\n";/Volumes/Active/ScriptsLibrary/bin/kindlegen2.9/kindlegen content.opf -c2 -verbose'
# -------------------------------
# ENVIRONMENT CONFIGURATION
# -------------------------------
# Change Prompt
# ------------------------------------------------------------
shopt -s extglob #needed for strc alias, formerly the ext alias
export PS1='\W > ' #default '\h:\W \u$ '
if [ -f ~/.bashrc ] ; then
source ~/.bashrc
fi