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
| package main | |
| import ( | |
| "github.com/tarm/serial" | |
| "log" | |
| "strings" | |
| "time" | |
| ) | |
| var phoneNumers = map[string]bool{ |
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
| #define MESSAGE_TOTAL_LENGTH 301 | |
| #include <SoftwareSerial.h> | |
| SoftwareSerial mSerial(2, 3); // RX, TX | |
| char message[MESSAGE_TOTAL_LENGTH]; | |
| int messageLen = 0; | |
| bool readyToDeleteAllMessages = false; | |
| bool messageStartsWith(const char *str) { |
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
| package main | |
| import ( | |
| "fmt" | |
| "github.com/itchyny/volume-go" | |
| "github.com/micmonay/keybd_event" | |
| "github.com/tarm/serial" | |
| "log" | |
| "strconv" | |
| "strings" |
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
| package main | |
| import ( | |
| "github.com/gorilla/mux" | |
| "log" | |
| "net/http" | |
| ) | |
| func main() { | |
| r := mux.NewRouter() |
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
| #include <avr/io.h> | |
| #include <util/delay.h> | |
| #include <avr/interrupt.h> | |
| #ifndef _UART_H_ | |
| #define _UART_H_ | |
| #define UART_RX_ENABLED (1) // Enable UART RX | |
| #define UART_TX_ENABLED (1) // Enable UART TX |
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
| sudo iptables -F | |
| sudo iptables -P INPUT ACCEPT |
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
| global: | |
| scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute. | |
| evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute. | |
| # scrape_timeout is set to the global default (10s). | |
| # Alertmanager configuration | |
| alerting: | |
| alertmanagers: | |
| - static_configs: | |
| - targets: | |
| - localhost:9093 |
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
| groups: | |
| - name: ping | |
| rules: | |
| - alert: host_down | |
| expr: ping_loss_percent{ip_version="4",job="ping"} == 1 | |
| for: 10s | |
| labels: | |
| severity: page | |
| annotations: | |
| summary: "{{ $labels.target }} / {{ $labels.ip }}" |
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
| global: | |
| resolve_timeout: 5m | |
| route: | |
| group_by: ['alertname'] | |
| group_wait: 30s | |
| group_interval: 10m | |
| repeat_interval: 4h | |
| receiver: 'web.hook' | |
| receivers: |
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
| targets: | |
| - google.com | |
| dns: | |
| refresh: 2m15s | |
| nameserver: 1.1.1.1 | |
| ping: | |
| interval: 10s | |
| timeout: 3s |