Wes Winham winhamwr@gmail.com
There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.
| #include "robot_bridge_cpp/serial_bridge_node.hpp" | |
| #include <fstream> | |
| #include <sstream> | |
| #include <chrono> | |
| #include <cmath> | |
| #include <algorithm> | |
| using namespace std::chrono_literals; | |
| namespace robot_bridge_cpp |
| #!/bin/bash | |
| # depends on gawk | |
| # if running in a netshoot container, you need to install it: | |
| # apk add --no-cache gawk | |
| # Filename to store the results | |
| output_file="dig_results.txt" | |
| times_file="query_times.txt" | |
| # Clear files if they already exist |
| 0xa8BA5E97DB500655c18A8aa3FEd6DA5d6c8e868F |
| # This is used to provide a Health Check HTTP endpoint | |
| # 1- Each project should have a particular endpoint(s), they should not overlap | |
| # so that mulitple services running on a single node will not confuse our | |
| # operations (this isn't docker, there are rules.) | |
| # 2- If you pass a block to the build method, that code will be evaluated and | |
| # merged into the check. The return type of that block should be a hash | |
| # Usage examples: |
| I inlined the code from microAjax there, to keep dependencies at 0. I think the following cite satisfies the license? | |
| https://code.google.com/archive/p/microajax/ | |
| This code was referenced extensively: | |
| https://bitbucket.org/snippets/jdubray/9dgKp/sam-sample |
Wes Winham winhamwr@gmail.com
There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.
Reading of EventStore events should be idempotent.
When a handler reads an event, it will do two things. It will manipulate its current view of application state (change balance, whatever), and then it will take actions.
As an example, we want a registration service that will read the “wallet-*” category event stream and whenever a wallet is created by something (and creates a 'WalletCreated' event), it will begin an on boarding process. The service will keep a list of wallets in its current state snapshot (which it will act based on), and it will also send commands to send a welcome text message to a customer. Here is an example code snippet for the event handler:
def !
# Mutate internal state| require 'http_eventstore' | |
| client = HttpEventstore::Connection.new | |
| stream_name = 'accounts-002' | |
| #event_data = { event_type: "AccountCreated", | |
| # data: { phoneNumber: '15128798439' }} | |
| #client.append_to_stream(stream_name, event_data) | |
| EventData = Struct.new(:data, :event_type) |
| require 'vertx' | |
| @client = Vertx::HttpClient.new | |
| @client.port = 2113 | |
| @client.host = 'localhost' | |
| module TestStream | |
| class WriteEvent | |
| attr_reader :event_data | |
| attr_reader :client |