openssl req -x509 -newkey rsa:4096 -sha256 -keyout example.key -out example.crt -subj "/CN=example.com" -days 3650 -passout pass:foobar
openssl x509 -x509toreq -in example.crt -out example.csr -signkey example.key -passin pass:foobar
openssl req -x509 -newkey rsa:4096 -sha256 -keyout example.key -out example.crt -subj "/CN=example.com" -days 3650 -passout pass:foobar
openssl x509 -x509toreq -in example.crt -out example.csr -signkey example.key -passin pass:foobar
Sometimes we need to add redundancy to some service or server which happen to be a public-facing entry point of our infrastructure. For example, imagine we want to add a high availability pair for a load balancer which sits on the edge of network and forwards traffic to alive backend servers.
┌─────────────┐
│ │
┌─────►│ Backend 1 │
│ │ │
│ └─────────────┘
package textwidth | |
import ( | |
"unicode" | |
"golang.org/x/text/width" | |
) | |
// IsComb returns true if r is a Unicode combining character. Alias of: | |
// |
<?xml version='1.0'?> | |
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | |
<fontconfig> | |
<match target="font"> | |
<edit mode="assign" name="rgba"> | |
<const>rgb</const> | |
</edit> | |
</match> | |
<match target="font"> | |
<edit mode="assign" name="hinting"> |
;;; inbox.el --- display inbox status information -*- coding: utf-8 -*- | |
;; Copyright (C) 2014 Sergei Glushchenko. | |
;; Author: Sergei Glushchenko <gl.sergei@gmail.com> | |
;; This program is free software: you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation, either version 3 of the License, or | |
;; (at your option) any later version. |
/*?sr/bin/env go run "$0" "$@"; exit $? #*/ | |
// This is actually not a shebang, the first line is both valid shell script and valid go code | |
// Just run: chmod +x pass.go; ./pass.go | |
package main | |
import ( | |
"bufio" | |
"crypto/sha256" | |
"encoding/base64" | |
"fmt" |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"net" | |
"os" | |
"time" | |
) |
// Electron's quick start sample, naively ported to Go | |
// https://github.com/atom/electron/blob/master/docs/tutorial/quick-start.md | |
// | |
// go get -u gopherjs | |
// gopherjs build main.go | |
// electron $(pwd) | |
package main | |
import ( |