./redis.shtest the redis cluster
| export function world(){ | |
| return "hello Sean"; | |
| } |
| function hello() { | |
| return 'World'; | |
| } | |
| export { hello }; |
| const { connect, JSONCodec, AckPolicy } = require("nats"); | |
| async function main(count = 1000){ | |
| const nc = await connect(['nats://localhost:4222']); | |
| // create a jetstream client: | |
| const jsm = await nc.jetstreamManager(); | |
| console.log("JSM connected"); | |
| await jsm.consumers.add("results", { |
| import java.io.*; | |
| import java.nio.*; | |
| import java.nio.channels.*; | |
| import java.net.*; | |
| import java.util.*; | |
| import java.nio.charset.*; | |
| public class Server { | |
| public Selector sel = null; |
| These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
| To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
| USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
| ABSOLUTELY NO WARRANTY. | |
| If you are still reading let's carry on with the code. | |
| sudo apt-get update && \ | |
| sudo apt-get install build-essential software-properties-common -y && \ | |
| sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
| #!/bin/bash | |
| # Provide your API Token | |
| TOKEN= | |
| # Provide the name of the template | |
| TEMPLATE=hive | |
| STATUS="pending" | |
| #Invoke the run | |
| RESULT=$(curl -X POST --silent -H "Content-Type: application/json" -H "X-Auth:$TOKEN" \ | |
| -d '{"template": "'$TEMPLATE'", "repeat": 5, "interval":10, "clients":1 }' \ |
| ---- install Oracle JDK 1.8 | |
| $ wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-linux-x64.rpm | |
| $sudo yum install -y jdk-8u141-linux-x64.rpm | |
| ---- install OpenJDK | |
| $ vi install.sh | |
| yum install -y java-1.8.0-openjdk-devel | |
| yum remove java-1.7.0-openjdk | |
| wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo |
| # Installing ScyllaDB in AWS with DPDK enabled | |
| # Prerequisites: | |
| # - Red Hat Enterprise Linux 7.2 (HVM) | |
| # - Instance type that supports enhanced networking (see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html#enhanced_networking_instance_types) | |
| # - Secondary NIC installed via Network Interfaces in AWS | |
| # - Instance type with 2 hard drives for RAID0 array | |
| ########## DO THIS FIRST ################ | |
| # Fetch the latest linux kernel | |
| yum update -y |
| Updated the address as per transition phase. | |
| Please send your donation to IOTA peer manager development at following address | |
| HRFEUTWRFOWRJQWRTQRINKWLMOFO9BTGAFCSSFLXAYLLSZPNKJUBGYKXFHGENPZCROFESEYQPBVBFHSDBBEGUK9OKA | |
| Many thanks in advance! |