https://www.youtube.com/playlist?list=PLKK11Ligqitg9MOX3-0tFT1Rmh3uJp7kA
package main | |
// The string values of the 2 classes | |
// They can be "positive" >< "negative" as in this example | |
// They can also be "ham" >< "spam", i.e. | |
const ( | |
positive = "positive" | |
negative = "negative" | |
) |
EXE = shell | |
SRC = . | |
LDFLAGS = -ldflags="-s -w" | |
windows: | |
GOOS=windows go build -o $(EXE)_win.exe $(LDFLAGS) $(SRC) | |
macos: | |
GOOS=darwin go build -o $(EXE)_macos $(LDFLAGS) $(SRC) |
https://alexcabal.com/creating-the-perfect-gpg-keypair/
-
Create a regular GPG keypair. By default GPG creates one signing subkey (your identity) and one encryption subkey (how you receive messages intended for you).
-
Use GPG to add an additional signing subkey to your keypair. This new subkey is linked to the first signing key. Now we have three subkeys.
-
This keypair is your master keypair. Store it in a protected place like your house or a safe-deposit box. Your master keypair is the one whose loss would be truly catastrophic.
I’m currently working (I’m just at the beginning, and I’m quite slow) on a personal project that will use Keepass files (kdb and kdbx).
I tried to find some documentation about .kdb and .kdbx format, but I didn’t find anything, even in the Keepass official website. I you want to know how these file formats are structured, you must read Keepass’s source code. So I wrote this article that explains how Keepass file format are structured, maybe it will help someone.
// CPU friendly | |
for { | |
select { | |
case <-time.After(time.Second): | |
// do something | |
} | |
} | |
// instead of busy loop | |
for { |
I just got this working so I figured I'd share what I found, since there's hardly any information about this anywhere online except an RFC, the GPG mailing list and one tutorial from the GnuPG blog.
You can use automatic key discovery with WKD (Web key directory) to make it easy for users to import your key, in GPG since version 2.1.12. Since this feature is fairly new, it isn't yet available in the current LTS release of Ubuntu (16.04; xenial), however it is available in Debian stable (stretch).
I couldn't add a DNS CERT or DANE / OPENPGPKEY record through my email service (which also hosts my nameservers). I tried making the PKA record - a foo._pka.example.com
TXT record but GPG doesn't seem to recognize it and fails; I'm still investigating why.
So the last option for self-hosted auto-discovery was WKD.
First thing I had to do was add an email address to my key. My primary UID is just my name so the key represents my identity rather
package main | |
import ( | |
"fmt" | |
"sync" | |
"time" | |
) | |
func main() { | |
// Create a wait group of any size |