(note: replace ORGANIZATION
and PROJECT
)
git clone git clone git@github.com:ORGANIZATION/PROJECT.git my-repository
#!/bin/bash | |
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine | |
# Used to provide DDNS service for my home | |
# Needs the DNS record pre-creating on Cloudflare | |
# Proxy - uncomment and provide details if using a proxy | |
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport> | |
# Cloudflare zone is the zone which holds the record |
# Set AWS credentials and S3 paramters | |
AWS_KEY="" | |
AWS_SECRET="" | |
S3_BUCKET="" | |
S3_BUCKET_PATH="/" | |
S3_ACL="x-amz-acl:private" | |
function s3Upload | |
{ | |
path=$1 |
wget --continue --no-check-certificate -O jdk-8-linux-x64.tar.gz --header Cookie: oraclelicense=a http://download.oracle.com/otn-pub/java/jdk/8-b132/jdk-8-linux-x64.tar.gz |
import java.io.ByteArrayOutputStream; | |
import java.io.OutputStream; | |
import java.io.PrintStream; | |
import org.slf4j.Logger; | |
public class LoggingOutputStream extends OutputStream { | |
public static void redirectSysOutAndSysErr(Logger logger) { | |
System.setOut(new PrintStream(new LoggingOutputStream(logger, LogLevel.INFO))); |