Skip to content

Instantly share code, notes, and snippets.

@AdamBien
AdamBien / 63rdAirhacksQ&A.md
Last active June 6, 2019 19:15
63rdAirhacksQ&A.md

Ask questions and see you at June, 6th, 6.PM. CET: http://www.ustream.tv/channel/adambien

Also checkout recent episode:

62nd airhacks.tv

Please keep the questions Java EE-stic. Means: as short and as concise as only possible. Feel free to ask several, shorter questions.

@ijokarumawak
ijokarumawak / 0.README.md
Last active September 9, 2023 03:01
The simplest NiFi Wait Notify example

This flow using Wait processor to wait for the all split FlowFiles to be processed. When it runs, following log messages can be seen:

2019-04-05 10:02:58,752 INFO [Timer-Driven Process Thread-7] o.a.nifi.processors.standard.LogMessage LogMessage[id=eafe4890-0169-1000-9927-a81fbbafafc6] Processing 1/5 message for 875bd765-209d-4136-a75d-5d14241384fe
2019-04-05 10:02:58,769 INFO [Timer-Driven Process Thread-3] o.a.nifi.processors.standard.LogMessage LogMessage[id=eafe4890-0169-1000-9927-a81fbbafafc6] Processing 2/5 message for 875bd765-209d-4136-a75d-5d14241384fe
2019-04-05 10:02:58,770 INFO [Timer-Driven Process Thread-3] o.a.nifi.processors.standard.LogMessage LogMessage[id=eafe4890-0169-1000-9927-a81fbbafafc6] Processing 3/5 message for 875bd765-209d-4136-a75d-5d14241384fe
2019-04-05 10:02:58,770 INFO [Timer-Driven Process Thread-3] o.a.nifi.processors.standard.LogMessage LogMessage[id=eafe4890-0169-1000-9927-a81fbbafafc6] Processing 4/5 message for 875bd765-209d-4136-a75d-5d14241384fe
2019-04-05 10:02:5
/*
Adapted from https://github.com/sindresorhus/github-markdown-css
The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
@wknapik
wknapik / empty_bucket.sh
Last active March 5, 2024 09:53
Empty an s3 bucket of all object versions and delete markers in batches of 400
#!/usr/bin/env bash
set -eEo pipefail
shopt -s inherit_errexit >/dev/null 2>&1 || true
if [[ ! "$#" -eq 2 || "$1" != --bucket ]]; then
echo -e "USAGE: $(basename "$0") --bucket <bucket>"
exit 2
fi
@themouette
themouette / git_commands.sh
Last active May 26, 2020 14:32
check git branches status
# Find common ancestor of 2 branches:
git rev-parse BRANCH1 BRANCH2
# Last commit date (relative time) on BRANCH
git --no-pager for-each-ref BRANCH --format='%(committerdate:relative)'
# Last commit date on BRANCH
git --no-pager show --format='%ai'
# Last commit author on BRANCH
git --no-pager show --format='%an'
@javathought
javathought / JAXBDemo.scala
Created January 25, 2018 08:15
scala + jaxb
package io.github.javathought.commons.xml
import java.io.StringWriter
import javax.xml.bind.JAXBContext
import javax.xml.bind.annotation._
import javax.xml.bind.annotation.adapters.{XmlAdapter, XmlJavaTypeAdapter}
import io.github.javathought.commons.xml.XmlTypes._
import org.apache.commons.io.IOUtils
@arun-gupta
arun-gupta / readme.adoc
Last active December 8, 2021 05:04
Federated Kubernetes Cluster using Kops on AWS

Let’s set up a federation between earth and mars Kubernetes cluster on AWS.

Earth cluster

  1. Create hosted zone:

    ID=$(uuidgen) && \
       aws route53 create-hosted-zone \
       --name earth.kubernetes-aws.io \

Thread Pools

Thread pools on the JVM should usually be divided into the following three categories:

  1. CPU-bound
  2. Blocking IO
  3. Non-blocking IO polling

Each of these categories has a different optimal configuration and usage pattern.

@SalmonKing72
SalmonKing72 / docker-machine-insecure-registry.md
Last active July 7, 2021 11:44
docker-machine: adding insecure registry configuration to an existing machine/VM

The issue

  • deployed a local docker registry container to a docker-machine VM
  • cannot push to local docker registry
  • get an error including a message similar to, "http: server gave HTTP response to HTTPS client"

The solution

  • in order to push to this local registry you need to make some modifications to your docker VM
  • open c:\users\<user-name>\.docker\machine\machines\default\config.json or ~/.docker/machine/machines/default/config.json in an editor
  • find the InsecureRegistry property and append "localhost:5000" to it
  • go to your docker terminal
@inancgumus
inancgumus / xmlToJson.xslt
Created May 16, 2017 10:20
XML to JSON using XSLT
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="utf-8"/>
<xsl:template match="/*[node()]">
<xsl:text>{</xsl:text>
<xsl:apply-templates select="." mode="detect" />
<xsl:text>}</xsl:text>
</xsl:template>