This guide shows how to set up a bidirectional client/server authentication for plain TLS sockets.
Newer versions of openssl are stricter about certificate purposes. Use extensions accordingly.
Generate a Certificate Authority:
| # http://robertwesterlund.net/post/2014/12/27/removing-utf8-bom-using-powershell | |
| foreach($file in Get-ChildItem -Path $PSScriptRoot -Include *.php -Recurse -ErrorAction Continue -Force) { | |
| $reader = $file.OpenRead() | |
| $byteBuffer = New-Object System.Byte[] 3 | |
| $bytesRead = $reader.Read($byteBuffer, 0, 3) | |
| if ($bytesRead -eq 3 -and | |
| $byteBuffer[0] -eq 239 -and | |
| $byteBuffer[1] -eq 187 -and | |
| $byteBuffer[2] -eq 191) |
| # How to encrypt/decrypt your text/blob secret with AWS KMS with AWS cli | |
| KEY_ID=alias/my-key | |
| SECRET_BLOB_PATH=fileb://my-secret-blob | |
| SECRET_TEXT="my secret text" | |
| ENCRYPTED_SECRET_AS_BLOB=encrypted_secret_blob | |
| DECRYPTED_SECRET_AS_BLOB=decrypted_secret_blob # Result of decrypt-blob target | |
| encrypt-text: |
| /* ----------------------------------------- * | |
| Lazy List Implementation | |
| * ----------------------------------------- */ | |
| // Haskell-like infinite List, implemented with es6 generators | |
| // Lazyness lets you do crazy stuff like | |
| List.range(0, Infinity) | |
| .drop(1000) | |
| .map(n => -n) |
This guide shows how to set up a bidirectional client/server authentication for plain TLS sockets.
Newer versions of openssl are stricter about certificate purposes. Use extensions accordingly.
Generate a Certificate Authority:
| #/etc/init/no-ip.conf | |
| #upstart service for noip2 | |
| description "No-IP Linux Dynamic Update Client (DUC)" | |
| author "No-IP <[email protected]>" | |
| # When to start the service | |
| start on runlevel [2345] | |
| # When to stop the service |
| var cluster = require('cluster'); | |
| var http = require('http'); | |
| var numCPUs = require('os').cpus().length; | |
| if (cluster.isMaster) { | |
| // Fork workers. | |
| for (var i = 0; i < numCPUs; i++) { | |
| cluster.fork(); | |
| } | |
| cluster.on('exit', function(worker, code, signal) { |
| This playbook has been removed as it is now very outdated. |
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
| # Apt-install various things necessary for Ruby, guest additions, | |
| # etc., and remove optional things to trim down the machine. | |
| apt-get -y update | |
| apt-get -y remove apparmor | |
| apt-get -y install linux-headers-$(uname -r) build-essential | |
| apt-get -y install zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev libssl-dev openssl libreadline5-dev | |
| apt-get clean | |
| # Remove this file to avoid dhclient issues with networking | |
| rm -f /etc/udev/rules.d/70-persistent-net.rules |