-
Kinesis Freestyle (Terrible key switches. Mushy and un-lovable)
-
Kinesis Freestyle Edge (Traditional layout with too many keys, mech switches, proably too big to be tented easily/properly)
-
Matias Ergo Pro (Looks pretty great. Have not tried.)
-
ErgoDox Kit (Currently, my everyday keyboard. Can buy pre-assembled on eBay.)
-
ErgoDox EZ (Prolly the best option for most people.)
| import re | |
| # http://stackoverflow.com/a/13752628/6762004 | |
| RE_EMOJI = re.compile('[\U00010000-\U0010ffff]', flags=re.UNICODE) | |
| def strip_emoji(text): | |
| return RE_EMOJI.sub(r'', text) | |
| print(strip_emoji('🙄🤔')) |
| { | |
| "tree" : { | |
| "nodeName" : "NODE NAME 1", | |
| "name" : "NODE NAME 1", | |
| "type" : "type3", | |
| "code" : "N1", | |
| "label" : "Node name 1", | |
| "version" : "v1.0", | |
| "link" : { | |
| "name" : "Link NODE NAME 1", |
In this step we'll create a swarm cluster from two nodes. You should've received access to two nodes in AWS.
- SSH in to the first node:
ssh -i docker_demo.pem ubuntu@IP1 - Figure out the internal IP address of the node:
ifconfigand check the eth0 address (10.0....) - Initialize the Swarm cluster: `docker swarm init --listen-addr INTERNAL_IP --advertise-addr INTERNAL_IP
- Open a new tab and SSH to the other node:
ssh -i docker_demo.pem ubuntu@IP2 - Check the internal IP of that node:
ifconfigand eth0 - Join to the cluster with the command the previous command printed out. Before executing the command, you need to the extend it with the
--listen-addrand--advertise-addrparameters (using the internal IP of the second node):docker swarm join TOKEN --listen-addr 10.0.... --advertise-addr 10.0..... node1... - Get back to the first node and verify the results:
docker node ls
| cmdAddr, _ := net.ResolveTCPAddr("tcp", n.cfg.Addr) | |
| lcmd, err := net.ListenTCP("tcp", cmdAddr) | |
| if err != nil { | |
| log.Fatalln(err) | |
| } | |
| defer lcmd.Close() | |
| quitChan := make(chan os.Signal, 1) | |
| signal.Notify(quitChan, os.Interrupt, os.Kill, syscall.SIGTERM) | |
| wg := sync.WaitGroup{} | |
| for { |
| # -*- coding: utf-8 -*- | |
| import asyncio | |
| import aioredis | |
| from aiohttp import web | |
| import json | |
| @asyncio.coroutine | |
| def ulist(request): | |
| data = yield from request.json() |
| from hashlib import md5 | |
| from bisect import bisect | |
| class Ring(object): | |
| def __init__(self, server_list, num_replicas=3): | |
| nodes = self.generate_nodes(server_list, num_replicas) | |
| hnodes = [self.hash(node) for node in nodes] | |
| hnodes.sort() |
| file, err := os.Open(path) | |
| if err != nil { | |
| return err | |
| } | |
| defer file.Close() | |
| // Only the first 512 bytes are used to sniff the content type. | |
| buffer := make([]byte, 512) | |
| _, err = file.Read(buffer) | |
| if err != nil { |
This guide will demonstrate the steps required to encrypt and decrypt files using OpenSSL on Mac OS X. The working assumption is that by demonstrating how to encrypt a file with your own public key, you'll also be able to encrypt a file you plan to send to somebody else using their private key, though you may wish to use this approach to keep archived data safe from prying eyes.
Assuming you've already done the setup described later in this document, that id_rsa.pub.pcks8 is the public key you want to use, that id_rsa is the private key the recipient will use, and secret.txt is the data you want to transmit…
$ openssl rand 192 -out key
$ openssl aes-256-cbc -in secret.txt -out secret.txt.enc -pass file:key