Here's the canonical TOML example from the TOML README, and a YAML version of the same. Which looks nicer?
|
1 REM NOTHING | |
2 REM | |
3 REM | |
5 REM DATNOIDS Copyright (c) 1982 By Casey Roche | |
8 REM | |
9 SCREEN 0,0,0 | |
10 KEY OFF:WIDTH 80:COLOR 0,1,0:CLS:PLAY"mb":COLOR 4,0:LOCATE 24,1:PRINT" "+STRING$(78,219):SOUND 1000,1:PRINT" 000000 0000 00000000 00 00 000000 00000000 000000 00000":SOUND 2000,1 | |
80 PRINT" 0222220 022220 02222220 02 20 02222220 02222220 0222220 0222220":SOUND 1000,1:PRINT" 02 20 02 20 22 020 20 02 20 22 02 20 0220 ":SOUND 2000,1 | |
120 PRINT" 02 20 02 20 22 0220 20 02 20 22 02 20 0220 ":SOUND 1000,1:PRINT" 02 20 02222220 22 0202020 02 20 22 02 20 0220 ":SOUND 2000,1 | |
160 PRINT" 02 20 02 20 22 02 0220 02 20 22 02 20 0220":SOUND 1000,1:PRINT" 02 20 02 20 22 02 020 02 20 22 02 20 0220":SOUND 2000,1 |
#!/bin/bash | |
# call this script with an email address (valid or not). | |
# like: | |
# ./makecert.sh joe@random.com | |
mkdir certs | |
rm certs/* | |
echo "make server cert" | |
openssl req -new -nodes -x509 -out certs/server.pem -keyout certs/server.key -days 3650 -subj "/C=DE/ST=NRW/L=Earth/O=Random Company/OU=IT/CN=www.random.com/emailAddress=$1" | |
echo "make client cert" | |
openssl req -new -nodes -x509 -out certs/client.pem -keyout certs/client.key -days 3650 -subj "/C=DE/ST=NRW/L=Earth/O=Random Company/OU=IT/CN=www.random.com/emailAddress=$1" |
go build helloworld.go | |
GOOS=windows GOARCH=amd64 go build helloworld.go |
// https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works | |
package main | |
import ( | |
"fmt" | |
"golang.org/x/crypto/ssh" | |
) | |
const privateKey = `content of id_rsa` |
package main | |
import ( | |
"fmt" | |
"io" | |
"net" | |
"os" | |
"sync" | |
) |
{"hola":"mundo","number":1} |
package main | |
import ( | |
"net" | |
"os/exec" | |
"github.com/k0kubun/pp" | |
) | |
func Hosts(cidr string) ([]string, error) { |
Here's the canonical TOML example from the TOML README, and a YAML version of the same. Which looks nicer?
|
package main | |
import ( | |
"errors" | |
"runtime" | |
"unsafe" | |
"golang.org/x/mobile/app" | |
"golang.org/x/mobile/event/lifecycle" | |
"golang.org/x/mobile/event/paint" |
package main | |
import ( | |
"bytes" | |
"encoding/gob" | |
"fmt" | |
) | |
type MyFace interface { | |
A() |