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
run: | |
# Timeout for analysis, e.g. 30s, 5m. | |
# Default: 1m | |
timeout: 5m | |
# Exit code when at least one issue was found. | |
# Default: 1 | |
issues-exit-code: 1 | |
# Include test files or not. | |
# Default: true | |
tests: false |
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
GeoIP_country_continent = [ | |
"--", "AS", "EU", "EU", "AS", "AS", "NA", "NA", "EU", "AS", "NA", "AF", | |
"AN", "SA", "OC", "EU", "OC", "NA", "AS", "EU", "NA", "AS", "EU", "AF", | |
"EU", "AS", "AF", "AF", "NA", "AS", "SA", "SA", "NA", "AS", "AN", "AF", | |
"EU", "NA", "NA", "AS", "AF", "AF", "AF", "EU", "AF", "OC", "SA", "AF", | |
"AS", "SA", "NA", "NA", "AF", "AS", "AS", "EU", "EU", "AF", "EU", "NA", | |
"NA", "AF", "SA", "EU", "AF", "AF", "AF", "EU", "AF", "EU", "OC", "SA", | |
"OC", "EU", "EU", "NA", "AF", "EU", "NA", "AS", "SA", "AF", "EU", "NA", | |
"AF", "AF", "NA", "AF", "EU", "AN", "NA", "OC", "AF", "SA", "AS", "AN", | |
"NA", "EU", "NA", "EU", "AS", "EU", "AS", "AS", "AS", "AS", "AS", "EU", |
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
package creds | |
func NewProvider() (Provider) { | |
} | |
type Provider interface { | |
FindCredentials() (Creds) | |
} |
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
NewConnector() (Connector) { | |
return &sshConnector{...} | |
} | |
type sshConnector struct { | |
dialer dialer | |
} | |
func (s *sshConnector) NewConnection(...) { | |
s.dialer.Dial() |
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
#!/bin/bash | |
OUTPUT=$(mktemp -d --tmpdir=/tmp "$(date -Iseconds).$(basename $0).XXXXXXX") | |
echo "$@" > "${OUTPUT}/cmdline" | |
env > "${OUTPUT}/env" | |
cat - \ | |
| tee "${OUTPUT}/input" \ | |
| /usr/cni/bin/$(basename $0) $@ \ | |
| tee "${OUTPUT}/output" | |
cd "${OUTPUT}" |
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
#!/bin/bash | |
echo 'This worked!' |
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
FROM ubuntu | |
ADD myscript.sh /myscript.sh | |
RUN chmod +x myscript.sh | |
CMD /myscript.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
did_they_come_back() { | |
echo "#### Starting did_they_come_back() ####" | |
#TODO: Make this take out bad entries from $REBOOT_CANDIDATES | |
for line in `cat "${REBOOT_ATTEMPTED}"`; do | |
attempted_host=`echo $line | awk -F: '{ print $1 }'` | |
if grep -q "${attempted_host}" "${REBOOT_CANDIDATES}" ; then | |
echo "${attempted_host} still not up but requested during last run:" \ | |
$line |tee -a ${PROBLEMATIC} "${NOTIFICATION_EMAIL}" > /dev/null | |
else |
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
did_they_come_back() { | |
echo "#### Starting did_they_come_back() ####" | |
#TODO: Make this take out bad entries from $REBOOT_CANDIDATES | |
for line in `cat "${REBOOT_ATTEMPTED}"`; do | |
attempted_host=`echo $line | awk -F: '{ print $1 }'` | |
if grep -q "${attempted_host}" "${REBOOT_CANDIDATES}" ; then | |
echo "${attempted_host} still not up but requested during last run:" \ | |
$line |tee -a ${PROBLEMATIC} "${NOTIFICATION_EMAIL}" > /dev/null | |
else |
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
has_it_been_24_hrs() { | |
echo "#### Starting has_it_been_24_hrs ####" | |
echo "Contents of REBOOT_CANDIDATES (/tmp/rebot-testing/ssh_outage/reboot_candidates:" | |
cat ${REBOOT_CANDIDATES} | |
echo "Contents of REBOOT_LOG (/tmp/rebot-testing/reboot_history/reboot_log:" | |
cat ${REBOOT_LOG} | |
#echo "# Starting timestamp comparison #" | |
echo "" | |
rm -f "${REBOOT_CANDIDATES}.tmp" && touch "${REBOOT_CANDIDATES}.tmp" |
NewerOlder