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
import re | |
import time | |
import httpx | |
URL = "https://smittestop.dk/status/" | |
r = httpx.get(URL) | |
assert r.status_code == 200, f'{r.status_code}: {r.content}' |
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
var http = require('http'); | |
http.createServer(function (req, res) { | |
// set up some routes | |
switch(req.url) { | |
case '/': | |
console.log("[501] " + req.method + " to " + req.url); | |
res.writeHead(501, "Not implemented", {'Content-Type': 'text/html'}); | |
res.end('<html><head><title>501 - Not implemented</title></head><body><h1>Not implemented!</h1></body></html>'); | |
break; |
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
// Example code for node-abbrev | |
var abbrevlib = require("node-abbrev"); | |
var sys = require("sys"); | |
// valid run modes for the imaginary tool | |
var validModes = ["help", "start", "stop", "status"]; | |
// create Abbreviate instance for the modes | |
// second parameter (case sensitivity) optional, defaults to false | |
var abbrev = new abbrevlib.Abbreviate(validModes); |