Skip to content

Instantly share code, notes, and snippets.

@galusben
galusben / build.gradle
Created June 19, 2017 17:04
pwinty-java-sdk build gradle that works
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id 'com.github.sherter.google-java-format' version '0.3.2'
}
@galusben
galusben / build.gradle
Created June 19, 2017 17:02
example build.gradle to fetch jar from .m2
apply plugin: 'java'
apply plugin: 'maven'
repositories {
jcenter()
mavenLocal()
}
dependencies {
compile 'uk.co.mattburns.pwinty:pwinty-java-sdk:2.3.1'
}
@galusben
galusben / hoseSlack.sh
Last active March 14, 2018 03:09
Example using Bintray Firehose API with Slack
# Connect to the event notification stream
./jfrog bt st <bintray-org> --user=<bintray-username> --key=<bintray-api-key> --include="download" |
while read line
do
# Extract the path from the whole event response
path=$(echo $line | jq .path -r)
curl <slack-webhook-url> -H"Content-Type:application/json" --data "{\"text\":\"File Downloaded: $path\"}"
done