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 ( | |
"errors" | |
"fmt" | |
"strings" | |
) | |
// Simple errors | |
type NotFoundError struct{ s string } |
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 ( | |
"io" | |
"log" | |
"os" | |
"time" | |
) | |
type writer struct { |
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 ( | |
"context" | |
"fmt" | |
"log" | |
"github.com/docker/docker/api/types" | |
"github.com/docker/docker/api/types/events" | |
"github.com/docker/docker/api/types/filters" |
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
# A watchdog script to monitor the ping status and reboot the device | |
# when there is no connection after a specified number of tries. | |
#!/bin/sh | |
echo '\nStarted watchdog script.' | |
address=8.8.8.8 # or a local gateway address | |
max=5 # number of retries before reboot | |
interval=120 # seconds between each retry |
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
{ | |
"id": "https://tools.ietf.org/rfc/rfc7807.txt", | |
"$schema": "http://json-schema.org/draft-06/schema#", | |
"description": "schema for a rfc7807", | |
"definitions": { | |
"validation": { | |
"type": "object", | |
"required": [ | |
"type" | |
], |
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
{ | |
"@context": { | |
"tdd": "https://www.w3.org/2019/wot/tdd#", | |
"schema": "https://schema.org/", | |
"registration": "tdd:registration", | |
"ttl": "tdd:ttl", | |
"expires": "schema:expires" | |
} | |
} |
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
{ | |
"@context":[ | |
"https://www.w3.org/2019/wot/td/v1", | |
"https://gist.githubusercontent.com/farshidtz/41f71668a113843cddec8e1593653303/raw/97ddfeb58adad8aecf5a810778ce0c8b37dca36d/tdd-context.jsonld" | |
], | |
"security":"nosec", | |
"securityDefinitions":{ | |
"nosec":{ | |
"scheme":"no_sec" | |
} |
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
{ | |
"@context": [ | |
"https://www.w3.org/2019/wot/td/v1", | |
{ | |
"tdd": "https://www.w3.org/2021/wot/discovery#" | |
} | |
], | |
"@type": "tdd:Directory", | |
"id": "urn:uuid:262bd21d-8c74-4ba6-a2b5-9a2da6061b0c", | |
"security": "basic_sc", |
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
{ | |
"@context": { | |
"discovery": "https://www.w3.org/2021/wot/discovery#", | |
"tdd": "https://www.w3.org/2021/wot/discovery#", | |
"DirectoryDescription": { | |
"@id": "discovery:DirectoryDescription" | |
}, | |
"LinkDescription": { | |
"@id": "discovery:LinkDescription" | |
} |
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
# Create a VPC, It comes with a default (automatically created route table) | |
resource "aws_vpc" "main" { | |
cidr_block = "10.0.0.0/24" | |
enable_dns_support = true | |
enable_dns_hostnames = true | |
enable_classiclink = false | |
instance_tenancy = "default" | |
tags = { |
OlderNewer