This file contains hidden or 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
{ | |
"AWSEBDockerrunVersion": 2, /* newer multi container format */ | |
"authentication": { | |
/* if working with non ECR or non public docker registries, this is required, points to file in S3, | |
that has the correct auth data, this could hold auth for multiple registries, | |
see here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_docker.container.console.html#docker-images-private | |
*/ | |
"bucket": "s3-bucket-name", | |
"key": "prefix" | |
}, |
This file contains hidden or 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
apply plugin: 'java' //needs this to have test task defined | |
test { | |
println "Host system properties" | |
System.properties.each { k,v-> | |
println "$k = $v" | |
} | |
systemProperty 'db.test.mode', System.getProperty("db.test.mode", "EMBEDDED") | |
println "Gradle system properties" | |
systemProperties.each { k,v-> |
This file contains hidden or 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
test { | |
testLogging.showStandardStreams = true | |
testLogging.exceptionFormat = 'full' | |
} |
This file contains hidden or 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 java.io.IOException; | |
import java.util.Vector; | |
/** | |
* Created by moshee | |
* on: 07/06/17 | |
* to compile in place: `javac ConsumeHeap.java` | |
* Execute: `java -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/app-`date +%s`-pid$$.hprof -XX:OnOutOfMemoryError=/opt/app/bin/upload_dump_s3.sh -Xmx2m ConsumeHeap` | |
* HeapDumpOnOutOfMemoryError specifies to automatically create a dump when OOM occures | |
* HeapDumpPath supplies a path to put that file |
This file contains hidden or 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
############################# Filebeat ###################################### | |
filebeat: | |
prospectors: | |
- | |
paths: | |
- /var/log/<APP>/app.log | |
fields: | |
logzio_codec: plain | |
token: ${token} | |
application: app # Custom field and value (can be filtered in logz.io) |
This file contains hidden or 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 com.kenshoo.xlsx2csv.XlsxToCsvConverter; | |
import java.io.*; | |
public class Converter { | |
private final static String SOURCE_FILE_PATH = "/path/example-input.xslx" | |
private final static String DEST_FILE_NAME = "/path/example-result.csv" | |
//building a new converter with default parameters | |
private final XlsxToCsvConverter xlsxToCsvConverter = new XlsxToCsvConverter.Builder().build(); | |
This file contains hidden or 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 time, datetime | |
import csv | |
from facebook_business.api import FacebookAdsApi | |
from facebook_business.adobjects.adaccount import AdAccount | |
from facebook_business.adobjects.adsinsights import AdsInsights | |
from facebook_business.adobjects.adreportrun import AdReportRun | |
from facebook_business.adobjects.campaign import Campaign | |
import boto3 |
This file contains hidden or 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
create_branch() { | |
local ORIGIN_BRANCH="origin/master" | |
if [ -z "$1" ] ; then | |
echo "branch name is required" | |
else | |
if [ ! -z "$2" ] ; then | |
local ORIGIN_BRANCH="$2" | |
fi | |
git checkout -b $1 $ORIGIN_BRANCH | |
git push -u origin $1:$1 |
This file contains hidden or 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 com.kenshoo.teddy.infra; | |
import com.google.inject.Singleton; | |
import io.honeycomb.libhoney.Event; | |
import io.honeycomb.libhoney.HoneyClient; | |
import io.honeycomb.libhoney.builders.HoneyClientBuilder; | |
import io.opentelemetry.sdk.trace.data.SpanData; | |
import io.opentelemetry.sdk.trace.export.SpanExporter; | |
import io.opentelemetry.trace.SpanId; |
This file contains hidden or 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 com.moshe.ldclient; | |
import com.launchdarkly.api.ApiClient; | |
import com.launchdarkly.api.ApiException; | |
import com.launchdarkly.api.Configuration; | |
import com.launchdarkly.api.api.UserSegmentsApi; | |
import com.launchdarkly.api.auth.ApiKeyAuth; | |
import com.launchdarkly.api.model.*; | |
import com.launchdarkly.sdk.LDUser; | |
import com.launchdarkly.sdk.server.LDClient; |