Example of a bare-minimum terraform script to setup an API Gateway endpoint that takes records and puts them into an SQS queue.
Start by creating the SQS queue.
resource "aws_sqs_queue" "queue" {
Example of a bare-minimum terraform script to setup an API Gateway endpoint that takes records and puts them into an SQS queue.
Start by creating the SQS queue.
resource "aws_sqs_queue" "queue" {
package com.jivimberg.sqs.published | |
import kotlinx.coroutines.CancellationException | |
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.isActive | |
import kotlinx.coroutines.yield | |
import java.lang.Thread.currentThread | |
suspend fun CoroutineScope.repeatUntilCancelled(block: suspend () -> Unit) { | |
while (isActive) { |
SSH into your EC2 instance. Run the following:
$ sudo yum install gcc
This may return an "already installed" message. That's OK.
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make
FROM ubuntu | |
RUN dpkg-divert --local --rename --add /sbin/initctl | |
RUN ln -s /bin/true /sbin/initctl | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get upgrade -y | |
RUN apt-get -y install mysql-client mysql-server |
/* | |
* @(#)PowerLaw.java ver 1.2 6/20/2005 | |
* | |
* Modified by Weishuai Yang (wyang@cs.binghamton.edu). | |
* | |
* this file is based on T J Finney's Manuscripts Simulation Tool, 2001 | |
*/ | |
import java.util.Random; |