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/bash | |
| bitrate=36 | |
| if [[ -n $2 ]] | |
| then | |
| bitrate=$2 | |
| fi | |
| inputfilename="$1" | |
| outputfilename="${inputfilename%.mp3}.bitrate${bitrate}.mp3" | |
| echo "Compressing into $outputfilename" | |
| ffmpeg -i $inputfilename -b:a ${bitrate}k -ac 1 $outputfilename |
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/bash | |
| TZ=America/Chicago | |
| vim "$(date '+%Y-%m-%d')-$1.md" |
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
| alias mdcopy="pandoc --from markdown --to html | textutil -convert rtf -stdin -stdout -format html | sed -e \"s/..e2..80..99/'/g\" | pbcopy -Prefer rtf" |
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
| const style=`.container { | |
| display: flex; | |
| justify-content: center; /* horizontal centering */ | |
| align-items: center; /* vertical centering */ | |
| height: 2em; /* define a height for demonstration purposes */ | |
| }` | |
| const sabbath_closed_html=` | |
| <html> | |
| <style>${style}</style> |
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
| <script> | |
| function replacelinks() { | |
| document.querySelectorAll('a').forEach(el => el.href = "/resources-links/website-closed-for-the-sabbath"); | |
| } | |
| function close() { | |
| const closedOnSabbathUrl = "https://gisbornefpchurch.org.nz/resources-links/website-closed-for-the-sabbath"; | |
| const d = new Date(); | |
| // is Sabbath in local time or in NZ | |
| const isSabbath = d.getDay() === 0 || (d.getUTCDay() === 6 && d.getUTCHours() >= 12) || (d.getUTCDay() === 0 && d.getUTCHours() < 12) | |
| if(window.location.href != closedOnSabbathUrl && isSabbath){ |