@cryptotaxi247 / infra-1 / commits / caeecd1c

Switch from `ix` to `termbin` (#539)

This fixes https://github.com/NixOS/infra/issues/537 Demo: ``` $ terraform/cache/diagnostic.sh ... > curl_test -6 https://cache.nixos.org/ Pasted at: https://termbin.com/8p7n ```

Jeremy Fleischman committed Jan 22, 2025 at 15:24 UTC caeecd1c97b7f873f091d74c1006bb98703d851b
2 files changed +8 -8
terraform/cache-staging/diagnostic.sh
+4 -4
@@ -1,5 +1,5 @@
1 #!/usr/bin/env nix-shell
2 -#!nix-shell -i bash -p bind.dnsutils -p mtr -p curl
2 +#!nix-shell -i bash -p bind.dnsutils -p mtr -p curl -p netcat
3 # shellcheck shell=bash
4 # impure: needs ping
5 #
@@ -29,8 +29,8 @@ curl_test() {
29 curl -w "$curl_w" -v -o /dev/null "$@"
30 }
31
32 -ix() {
33 - url=$(cat | curl -F 'f:1=<-' ix.io 2>/dev/null)
32 +termbin() {
33 + url=$(cat | nc termbin.com 9999)
34 echo "Pasted at: $url"
35 }
36
@@ -51,4 +51,4 @@ ix() {
51 run curl -I -6 "https://$domain/"
52 run curl -I -6 "https://$domain/"
53 run curl -I -6 "https://$domain/"
54 -) | tee /dev/stderr | ix
54 +) | tee /dev/stderr | termbin
terraform/cache/diagnostic.sh
+4 -4
@@ -1,5 +1,5 @@
1 #!/usr/bin/env nix-shell
2 -#!nix-shell -i bash -p bind.dnsutils -p mtr -p curl
2 +#!nix-shell -i bash -p bind.dnsutils -p mtr -p curl -p netcat
3 # shellcheck shell=bash
4 # impure: needs ping
5 #
@@ -29,8 +29,8 @@ curl_test() {
29 curl -w "$curl_w" -v -o /dev/null "$@"
30 }
31
32 -ix() {
33 - url=$(cat | curl -F 'f:1=<-' ix.io 2>/dev/null)
32 +termbin() {
33 + url=$(cat | nc termbin.com 9999)
34 echo "Pasted at: $url"
35 }
36
@@ -51,4 +51,4 @@ ix() {
51 run curl -I -6 "https://$domain/"
52 run curl -I -6 "https://$domain/"
53 run curl -I -6 "https://$domain/"
54 -) | tee /dev/stderr | ix
54 +) | tee /dev/stderr | termbin