-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
735 additions
and
128 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## icanhazdadjoke | ||
--- | ||
##### Author: [Zack McCauley](https://www.github.com/wardsparadox) | ||
|
||
### Description: | ||
Curls on click icanhazdadjoke.com's API for a fun joke | ||
Would recommend using the optionalDisplay:true keys to hide it | ||
|
||
### Preference Keys |
24 changes: 24 additions & 0 deletions
24
...EasterEggs/icanhazdadjokes/com.github.wardsparadox.hello-it.eastereggs.icanhazdadjokes.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
# Pending Updates Script for Managed Software Center | ||
### The following line load the Hello IT bash script lib | ||
. "$HELLO_IT_SCRIPT_SH_LIBRARY/com.github.ygini.hello-it.scriptlib.sh" | ||
|
||
function displayJoke { | ||
osascript -e "display dialog \"$(curl -s -H "User-Agent: HelloIT" -H "Accept: text/plain" https://icanhazdadjoke.com/)\" buttons {\"Haha\"} with icon POSIX file \"/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ErasingIcon.icns\"" | ||
} | ||
|
||
|
||
function onClickAction { | ||
displayJoke | ||
} | ||
|
||
function setTitleAction { | ||
updateTitle "Would you like to see a joke?" | ||
updateState "${STATE[4]}" | ||
updateTooltip "Brought to you by icanhazdadjoke.com" | ||
} | ||
|
||
### The only things to do outside of a bash function is to call the main function defined by the Hello IT bash lib. | ||
main "$@" | ||
|
||
exit 0 |
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.