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
#!/usr/bin/python | |
import sys | |
import json | |
f1 = open(sys.argv[1]) | |
f1json = json.load(f1) | |
for aggregation in ['Sets', 'Gets', 'Totals']: | |
for stat in ['Count', 'Average Latency', 'Min Latency', 'Max Latency', 'p50.00', 'p99.00', 'p99.90']: |
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
package main | |
import ( | |
"context" | |
"crypto/sha256" | |
"fmt" | |
"log" | |
"os" | |
"strconv" | |
"time" |
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
#!/usr/bin/python3 | |
import csv | |
import os | |
NODE_IPS=["192.168.0.1", "192.168.0.2", "192.168.0.3", "192.168.0.4"] | |
NUM_CPUS=6 | |
RAFT_GROUP=3 | |
TOTAL_SLOTS=16384 |
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
#!/usr/bin/python3 | |
import csv | |
import os | |
NODE_IPS=["192.168.0.1", "192.168.0.2", "192.168.0.3", "192.168.0.4"] | |
NUM_CPUS=6 | |
RAFT_GROUP=3 | |
TOTAL_SLOTS=16384 |
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
#! /usr/bin/env python3 | |
# Be sure to run | |
# pip3 install redis-py-cluster | |
# pip3 install redis | |
# for Python Redis Utils | |
from rediscluster import RedisCluster | |
startup_nodes = [{"host": "127.0.0.1", "port": "19901"}] | |
rc = RedisCluster(startup_nodes=startup_nodes, decode_responses=True) |
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
#!/usr/bin/env python3 | |
from redisearch import Client, TextField | |
import csv | |
client = Client('WPOI', | |
host='localhost', | |
password='', | |
port=6379 | |
) |
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
package main | |
import ( | |
b64 "encoding/base64" | |
"fmt" | |
"regexp" | |
"strings" | |
"time" | |
) |
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
resource "aws_route53_resolver_endpoint" "re-dns-in-endpoint" { | |
name = "re-dns-in-endpoint" | |
direction = "INBOUND" | |
security_group_ids = [ | |
module.nodes.re-security-group, | |
] | |
ip_address { | |
subnet_id = module.vpc.subnets-public[0] |
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
#!/usr/bin/python3 | |
import redis, ipaddress | |
r = redis.Redis(host='localhost', port=6379) | |
def ip2long(ip): | |
""" | |
Convert an IP string to long | |
""" |
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 redis | |
''' | |
The Cert comes from /etc/opt/redislabs/proxy_cert.pem! | |
''' | |
redis_host = '1.2.3.4' | |
redis_port = 14873 | |
redis_password = 'MyPassword' |