Skip to content

Instantly share code, notes, and snippets.

const int STACK_CAP_DEFAULT = 10;
typedef struct {
int *data;
int len;
int cap;
} Stack;
Stack *Stack_init() {
Stack *stk = malloc(sizeof(Stack));
int **make_dp_mat(int rowSize, int colSize) {
int **dp = (int **)malloc(rowSize * sizeof(int *));
for(int i = 0; i < rowSize; i++){
dp[i] = (int *)malloc(colSize * sizeof(int));
memset(dp[i], 0, colSize * sizeof(int));
}
return dp;
}

Data Replication Strategies for Multi Cluster

=============================================

Amazon RDS

https://aws.amazon.com/rds/

Deploy read-only replicas to increase read performance. Available for MySQL, MariaDB, PostgreSQL, Amazon Aurora. Support for running active-standby instances

package main
import (
"encoding/json"
"fmt"
"math/rand"
"os"
"sort"
"time"
)

Definitions

Definitions for all thrift services under libInletCommon/thrift.

See Apache Thrift documentation for details.

API

Inbound Thrift IPC

Problem as I understand it

Deploying Salt:

  • How to make minions aware of other minions. Cross-minion configuration.
  • Proper ordering of salt states (i.e. Repo.highstate -> base.highstate -> manual stuff -> *.highstate)

Updating configurations:

  • Merging new pillars during an RPM update.
  • Adding/deleting minions from "inventory", handling configuration updates in other minions automatically
  • A/B rollout of new configuration
authtoken: 7dwvpN5kGMQBKEapYDgyL_QCy6wEZqxgdH3qjkbT4h
tunnel:
secret-tunnel:
proto: tcp
addr: 22
@gitschaub
gitschaub / gist1
Last active February 24, 2017 05:06
[Unit]
Description=Share local port(s) with ngrok
After=syslog.target network.target
[Service]
PrivateTmp=true
Type=simple
User=pi
Restart=always
RestartSec=1min
# @timestamp returns success, but does not insert
$ curl http://api.ciscozeus.io/logs/8dcccc00/hellozeus/ -H "Content-Type: application/json" -d '{"logs":[{"@timestamp": "key"}]}'
{"successful":1}
# timestamp return invalid input error
$ curl http://api.ciscozeus.io/logs/8dcccc00/hellozeus/ -H "Content-Type: application/json" -d '{"logs":[{"timestamp": "key"}]}'
{"successful":0,"error":"invalid input"}