Please observe the difference in speed when calling resp.Body.Close()
.
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
@page "/" | |
@using System.Security.Claims | |
@inject AuthenticationStateProvider AuthenticationStateProvider | |
<PageTitle>Home</PageTitle> | |
<h1>Hello, world!</h1> | |
Welcome to your new app. | |
<h3>ClaimsPrincipal Data</h3> |
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 | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/url" | |
"strings" | |
) |
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 | |
import ( | |
"fmt" | |
"os" | |
"strconv" | |
) | |
var ( | |
paragraphs = []string{ |
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
using Org.BouncyCastle.Crypto; | |
using Org.BouncyCastle.Crypto.Encodings; | |
using Org.BouncyCastle.Crypto.Engines; | |
using Org.BouncyCastle.Crypto.Generators; | |
using Org.BouncyCastle.OpenSsl; | |
using Org.BouncyCastle.Security; | |
using System.Text; | |
namespace RSATest |
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
func Addslashes(str string) string { | |
var buf bytes.Buffer | |
for _, char := range str { | |
switch char { | |
case `'`, `"`, `\`: | |
buf.WriteRune(`\`) | |
} | |
buf.WriteRune(char) | |
} | |
return buf.String() |
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
[Unit] | |
Description=CertMaker Bot (to cover your cert needs) | |
After=network.target | |
[Service] | |
Type=simple | |
ExecStart=/home/certmaker-bot/bin/certmaker-bot | |
WorkingDirectory=/home/certmaker-bot/bin | |
User=certmaker-bot | |
Group=certmaker-bot |
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
$sourcecode = ".\main.go" | |
$target = "build\binary-name" | |
# Windows, 64-bit | |
$env:GOOS = 'windows'; $env:GOARCH = 'amd64'; go build -o "$($target)-win64.exe" -ldflags "-s -w" $sourcecode | |
# Linux, 64-bit | |
$env:GOOS = 'linux'; $env:GOARCH = 'amd64'; go build -o "$($target)-linux64" -ldflags "-s -w" $sourcecode | |
# Raspberry Pi | |
$env:GOOS = 'linux'; $env:GOARCH = 'arm'; $env:GOARM=5; go build -o "$($target)-raspi32" -ldflags "-s -w" $sourcecode | |
# macOS | |
$env:GOOS = 'darwin'; $env:GOARCH = 'amd64'; go build -o "$($target)-macos64" -ldflags "-s -w" $sourcecode |
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 | |
import ( | |
"crypto/tls" | |
"fmt" | |
"io" | |
"net/http" | |
) | |
func main() { |
NewerOlder