Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
set -e
function print_git_tree() {
git log \
--graph \
--no-color \
--source \
--all \
--max-count=5 \
MERGE INTO some_table AS saved
USING (
VALUES (?, ?, ?, CURRENT_TIMESTAMP)
) AS param (
servicename,
processorname,
messageId,
createdat
)
ON (
@Override
protected void doStart() throws Exception {
super.doStart();
transactionTemplate.execute(new TransactionCallback<Boolean>() {
@Override
public Boolean doInTransaction(TransactionStatus status) {
Savepoint savepoint = status.createSavepoint():
try {
// we will receive an exception if the table doesn't exists or we cannot access it
#!/usr/bin/env bash
shorten() {
if [[ -z ${1} ]]; then
echo "Please pass the string to split as 1st argument"
exit 1
fi;
text="${1}"
if [[ -z ${2} ]]; then
@turing85
turing85 / gist:4acfa561e3f8eff640ad0834a892db3a
Last active January 21, 2023 01:47
so-75190415-docker-compose
services:
frontend:
container_name: frontend
build:
context: ../
dockerfile: docker/base.dockerfile
target: frontend
args:
@turing85
turing85 / Dockerfile
Last active January 10, 2025 09:40
Multistage dockerfile to install software into an UBI micro image
ARG MICRODIR=/microdir
ARG PACKAGES_TO_INSTALL="java-17-openjdk-devel"
FROM registry.access.redhat.com/ubi8-micro@sha256:eb4245271537034f69ee336a4a2b31d3fbae4048ec1db53ff89de749c35cf537 AS BASE
FROM registry.access.redhat.com/ubi8@sha256:83c0e63f5efb64cba26be647e93bf036b8d88b774f0726936c1b956424b1abf6 AS BUILD
ARG MICRODIR
ARG PACKAGES_TO_INSTALL
RUN mkdir ${MICRODIR}
COPY --from=BASE / ${MICRODIR}