Skip to content

Instantly share code, notes, and snippets.

View nilstgmd's full-sized avatar
💭
🚀

Nils Meder nilstgmd

💭
🚀
  • Adobe Systems Engineering
  • Hamburg, Germany
  • 19:16 (UTC +02:00)
View GitHub Profile
@nilstgmd
nilstgmd / pet-snippet.toml
Created March 12, 2017 19:19
description
[[snippets]]
description = "test1"
command = "foo bar"
@nilstgmd
nilstgmd / installOCAgent.sh
Created February 20, 2016 18:36
Commands to install and run the OpsCenter Agent on a Cassandra node.
#!/bin/bash
echo "Installing Agent..."
mkdir /opt/agent; \
wget -O - http://downloads.datastax.com/community/datastax-agent-5.1.0.tar.gz \
| tar xzf - --strip-components=1 -C "/opt/agent"
cd /opt/agent/conf
echo "stomp_interface: $OPS_IP" >> ./address.yaml
touch /root/.agentconfig
cd /opt/agent
@nilstgmd
nilstgmd / cassandraDockerCluster.sh
Last active February 20, 2016 19:19
Starting a three node Cassandra cluster with `spotify/cassandra:cluster` docker image.
#!/bin/bash
#
# A script to setup a Cassandra cluster running in Docker containers.
#
# Per default there will be 3 nodes in the cluster and one container
# running OpsCenter.
#
# Note: The script assumes you are working on a Mac running docker-machine.
#
# Usage (The "-n=4" option is added to start 4 nodes):
{
"id": "api_test_defined_id",
"CLIENT_ID": "SharedCloud",
"data": {
"my_custom_key": "I like trains.",
"my_list": [
"eins",
"zwo"
]
},
curl -v -H "Content-Type: application/json" -X POST -d "{\"id\": \"curl_test_defined_id\",\"CLIENT_ID\": \"SharedCloud\",\"data\": {\"my_custom_key\": \"I like trains.\",\"my_list\": [\"eins\",\"zwo\"]},\"tags\": [\"test\", \"demo\", \"curl\"]}" https://CHANGEME/data
{
"id": "lambda_test_defined_id",
"CLIENT_ID": "SharedCloud",
"data": {
"my_custom_key": "I like trains.",
"my_list": [
"eins",
"zwo"
]
},
console.log('INFO: Loading event');
var AWS = require('aws-sdk');
var dynamodb = new AWS.DynamoDB();
exports.handler = function(event, context) {
console.log("INFO: Request received:\n", JSON.stringify(event));
console.log("INFO: Context received:\n", JSON.stringify(context));
var tableName = "data-us-east1";
var datetime = new Date().getTime().toString();