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
| # check systemctl status | |
| failed_jobs=$(systemctl --failed | grep -Ei "failed" | wc -l) | |
| if [ "$failed_jobs" -gt 0 ]; then | |
| echo -e "${RED}Failed systemctl jobs detected:${NC}" | |
| tput setaf 1 | |
| systemctl --failed | |
| tput sgr0 | |
| else | |
| echo "No failed systemctl jobs." |
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 | |
| # Set variables | |
| SOURCE="${SOURCE}" | |
| DESTINATION="${DESTINATION}" | |
| IGNORE_FILE="${IGNORE_FILE}" | |
| EXCLUDE_OPTIONS="" | |
| PID=$$ | |
| # Check ignore file |
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
| # start OpenCPN Docker container to compile and test. | |
| # https://opencpn-manuals.github.io/main/opencpn-dev/docker.html | |
| docker run -v /home/<user>/<source-path/:/src -it docker.io/nohal/opencpn-builder:latest bash |
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
| (Name as text) => let | |
| Parameters = Excel.CurrentWorkbook(){[Name="Parameters"]}[Content], | |
| Param = Table.SelectRows(Parameters, each ([Key] = Name)), | |
| Value = | |
| if Table.IsEmpty(Param) = true then null | |
| else Record.Field(Param{0},"Value") | |
| in Value |
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
| let activities = await Activity.aggregate([ | |
| { $match: filter }, // filter to be applied | |
| { $lookup: { // populate the instrument(s) | |
| from: 'instruments', | |
| localField: 'instrument', | |
| foreignField: '_id', | |
| as: 'instrument' | |
| }}, | |
| { $unwind: '$instrument'}, // instrument array to object | |
| { $unwind: '$events' }, // flatten events |