This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cassert> | |
#include <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <vector> | |
template <typename I> | |
void sub_divide_rotate(I first, I last) { | |
auto mid = std::distance(first, last) / 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zmq | |
context = zmq.Context() | |
address = "inproc://test" | |
#subscriber -- connecting first | |
sub = context.socket(zmq.SUB) | |
sub.connect(address) | |
sub.setsockopt(zmq.SUBSCRIBE, "test") | |
poller = zmq.Poller() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zmq | |
context = zmq.Context() | |
address = "inproc://test" | |
#publisher | |
pub = context.socket(zmq.PUB) | |
pub.connect(address) | |
#subscriber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zmq | |
context = zmq.Context() | |
address = "inproc://test" | |
#publisher | |
pub = context.socket(zmq.PUB) | |
pub.bind(address) | |
#subscriber |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zmq | |
context = zmq.Context() | |
address = "inproc://test" | |
#subscriber | |
sub = context.socket(zmq.SUB) | |
sub.connect(address) | |
sub.setsockopt(zmq.SUBSCRIBE, "test") | |
poller = zmq.Poller() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zmq | |
context = zmq.Context() | |
address = "inproc://test" | |
#subscriber | |
sub = context.socket(zmq.SUB) | |
sub.bind(address) | |
sub.setsockopt(zmq.SUBSCRIBE, "test") | |
poller = zmq.Poller() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import zmq | |
context = zmq.Context() | |
address = "inproc://test" | |
#subscriber | |
sub = context.socket(zmq.SUB) | |
sub.bind(address) | |
sub.setsockopt(zmq.SUBSCRIBE, "test") | |
poller = zmq.Poller() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set WshShell = CreateObject("WScript.Shell") | |
MsgBox ConvertToKey(WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId")) | |
Function ConvertToKey(Key) | |
Const KeyOffset = 52 | |
i = 28 | |
Chars = "BCDFGHJKMPQRTVWXY2346789" | |
Do | |
Cur = 0 | |
x = 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker-machine create myRegistry -d "virtualbox" | |
docker-machine ssh myRegistry docker swarm init | |
docker-machine ssh myRegistry ifconfig eth1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p ~/my_docker_registry_deploy_folder/certs | |
cd ~/my_docker_registry_deploy_folder/ | |
docker pull registry:2 | |
docker save -o registry.tar registry:2 |
OlderNewer