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
| using System.Text.RegularExpressions; | |
| var client = new HttpClient(); | |
| var response = await client.GetStringAsync("https://www.cloudflare.com/cdn-cgi/trace"); | |
| var tls = Regex.Match(response, @"(?<=tls=).*").Value; | |
| Console.WriteLine(tls); |
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
| select case WHEN EXISTS (SELECT * FROM pg_stat_replication) THEN (SELECT CASE WHEN state = 'streaming' THEN true ELSE false END FROM pg_stat_replication LIMIT 1) WHEN pg_is_in_recovery() THEN (SELECT CASE WHEN status = 'streaming' THEN true ELSE false END FROM pg_stat_wal_receiver LIMIT 1) ELSE true END; |
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
| docker ps -a --format "{{.Names}} {{if eq .State \"running\"}}1{{else}}0{{end}}" | sed 's/-/_/g' | while read line; do echo "$line" | curl --data-binary @- http://localhost:9091/metrics/job/container_status/instance/localhost; done |