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/sh | |
printf "Content-Type: text/html\r\n" | |
printf "\r\n" | |
echo "Environment variables:" | |
echo "<pre>" | |
env | sort | |
echo "</pre>" |
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 +x | |
folder=${REQUEST_URI#${SCRIPT_NAME}} | |
echo "Content-Type: text/html; charset=UTF-8" | |
echo "Connection: close" | |
echo "" | |
cat <<EOF | |
<!doctype html> | |
<html lang="en-US"> | |
<head> |
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 main | |
// go run udp-listener-with-interrupt-chan.go -p 8008:8009 | |
// echo hello kosmos | nc -u -v -w 1 0.0.0.0 8009 | |
import ( | |
"fmt" | |
"net" | |
"os" | |
"os/signal" |