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
#==============================# | |
# Gremlin Daemon Configuration # | |
#==============================# | |
# This file is used to expose configuration to the Gremlin daemon process (`gremlind`) | |
# NOTE: Some process managers such as sysvinit may require these variables to be preceded | |
# by `export` | |
# When the Gremlin daemon starts, it will automatically issue a `gremlin init` command to |
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
## Gremlin Identifier; uniquely identifies this machine with Gremlin | |
## (can also set with GREMLIN_IDENTIFIER environment variable) | |
identifier: gremlin-01 | |
## Gremlin Team Id; you can find this value at https://app.gremlin.com/settings/teams | |
## (can also be set with GREMLIN_TEAM_ID environment variable) | |
team_id: 11111111-1111-1111-1111-111111111111 | |
## Gremlin Client Tags; Tag your machine with key-value pairs that help you target this machine during attacks | |
## (can also set with GREMLIN_CLIENT_TAGS environment variable) |
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
#!/bin/bash | |
sudo zypper update \ | |
&& sudo zypper addrepo https://rpm.gremlin.com/gremlin.repo \ | |
&& sudo zypper refresh \ | |
&& curl -fsSL https://rpm.gremlin.com/gremlin-pgp-public.key | xargs -0 printf "%s\n" > gremlin-pgp-public.key \ | |
&& sudo rpm --import gremlin-pgp-public.key \ | |
&& sudo zypper install libcap-progs \ | |
&& sudo zypper install gremlin gremlind \ | |
&& sed -e "\$aSSL_CERT_FILE=/etc/ssl/ca-bundle.pem" /etc/default/gremlind.example \ | |
| sudo tee /etc/default/gremlind >/dev/null \ |
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
#!/bin/bash | |
set -e | |
set -o pipefail | |
set -x | |
WORKTREE= | |
GITDIR= | |
test -z $WORKTREE && exit 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
task increment { | |
doLast { | |
String patch=version.substring(version.lastIndexOf('.')+1) | |
int m=patch.toInteger()+1 | |
String majorMinor=version.substring(0,version.lastIndexOf('.')) | |
String s=buildFile.getText().replaceFirst("version='${version}'","version='${majorMinor}.${m}'") | |
buildFile.setText(s) | |
} | |
} |
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
/** | |
* This dynamodb configuration is for batch processing, taking up to 30 seconds to finish communicating | |
* with the database | |
*/ | |
public final AmazonDynamoDB getDynamoDBForBatchProcessing() { | |
return AmazonDynamoDBClientBuilder.standard() | |
.withRegion(this.regions) | |
.withClientConfiguration(new ClientConfiguration() | |
.withConnectionTimeout(500) | |
.withClientExecutionTimeout(30000) |
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
/* | |
* This dynamodb configuration is for real-time processing, which avoids spending too much time trying to | |
* connect to dynamodb -- failing quickly with a ClientExecutionTimeout if dynamo cannot be reached within 1 second | |
*/ | |
public final AmazonDynamoDB getDynamoDBForRealTimeProcessing() { | |
return AmazonDynamoDBClientBuilder.standard() | |
.withRegion(this.regions) | |
.withClientConfiguration(new ClientConfiguration() | |
.withConnectionTimeout(500) | |
.withClientExecutionTimeout(1000) |
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
#!/bin/bash | |
# Remove every docker container, excluding volumes. | |
# Takes any number of arguments which SHOULD serve as arguments to `docker rm`. | |
function dockerrme(){ | |
target="$(docker ps -aq | grep -v $(docker volume ls -q))" | |
if [ ! -z "$target" ] | |
then | |
docker rm $@ $target | |
fi | |
} |
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 org.foo.app; | |
import com.amazonaws.auth.profile.ProfileCredentialsProvider; | |
import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClient; | |
import com.amazonaws.services.dynamodbv2.document.DynamoDB; | |
import com.amazonaws.services.dynamodbv2.document.Table; | |
import com.amazonaws.services.dynamodbv2.local.main.CommandLineInput; | |
import com.amazonaws.services.dynamodbv2.local.main.ServerRunner; | |
import com.amazonaws.services.dynamodbv2.local.server.DynamoDBProxyServer; | |
import com.amazonaws.services.dynamodbv2.model.*; |