# This code is licensed under the terms of the MIT license https://opensource.org/license/mit | |
# Copyright (c) 2021 Marat Reymers | |
## Golden config for golangci-lint v1.59.1 | |
# | |
# This is the best config for golangci-lint based on my experience and opinion. | |
# It is very strict, but not extremely strict. | |
# Feel free to adapt and change it for your needs. | |
run: |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
# what we want: | |
# client -> OpenVPN -> Tor -> Internet | |
# Install & configure OpenVPN | |
# https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04 | |
# assumed OpenVPN configuration | |
# 10.8.0.1/24-Subnet | |
# tun0-Interface |
This document details how I setup LE on my server. Firstly, install the client as described on http://letsencrypt.readthedocs.org/en/latest/using.html and make sure you can execute it. I put it in /root/letsencrypt
.
As it is not possible to change the ports used for the standalone
authenticator and I already have a nginx running on port 80/443, I opted to use the webroot
method for each of my domains (note that LE does not issue wildcard certificates by design, so you probably want to get a cert for www.example.com
and example.com
).
For this, I placed config files into etc/letsencrypt/configs
, named after <domain>.conf
. The files are simple:
English short name lower case | Alpha-2 code | Alpha-3 code | Numeric code | ISO 3166-2 | |
---|---|---|---|---|---|
Afghanistan | AF | AFG | 004 | ISO 3166-2:AF | |
Åland Islands | AX | ALA | 248 | ISO 3166-2:AX | |
Albania | AL | ALB | 008 | ISO 3166-2:AL | |
Algeria | DZ | DZA | 012 | ISO 3166-2:DZ | |
American Samoa | AS | ASM | 016 | ISO 3166-2:AS | |
Andorra | AD | AND | 020 | ISO 3166-2:AD | |
Angola | AO | AGO | 024 | ISO 3166-2:AO | |
Anguilla | AI | AIA | 660 | ISO 3166-2:AI | |
Antarctica | AQ | ATA | 010 | ISO 3166-2:AQ |
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
For symmetic encryption, you can use the following: | |
To encrypt: | |
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt | |
To decrypt: | |
openssl aes-256-cbc -salt -a -d -in encrypted.txt -out plaintext.txt | |
For Asymmetric encryption you must first generate your private key and extract the public key. |
public class InMemoryDbSet<T> : IDbSet<T> where T : class | |
{ | |
readonly HashSet<T> _set; | |
readonly IQueryable<T> _queryableSet; | |
public InMemoryDbSet() : this(Enumerable.Empty<T>()) { } | |
public InMemoryDbSet(IEnumerable<T> entities) { |