Skip to content

Instantly share code, notes, and snippets.

View splatch's full-sized avatar

Łukasz Dywicki splatch

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Austrian Association for Software Tool Integration (AASTI)
under one or more contributor license agreements. See the NOTICE file
distributed with this work for additional information regarding copyright
ownership. The AASTI licenses this file to you under the Apache License,
Version 2.0 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
@rponte
rponte / macrodef-sample.xml
Created May 18, 2011 18:19
ant macrodef sample
<!-- Create migrate task -->
<macrodef name="migrate">
<attribute name="command" />
<attribute name="environment" />
<element name="extraarguments" optional="true" />
<sequential>
<echo>** Executing "migrate @{command}" on "@{environment}" environment **</echo>
<java classname="org.apache.ibatis.migration.Migrator"
failonerror="true" fork="true" classpathref="classpath">
<sysproperty key="file.encoding" value="UTF-8"/>
@mcupak
mcupak / set-resolve-parameter-values.out
Created October 9, 2017 06:37
Changing resolve-parameter-values in jboss-cli.xml.
$ sed -i "s/<resolve-parameter-values>false<\/resolve-parameter-values>/\
<resolve-parameter-values>true<\/resolve-parameter-values>/" \
$JBOSS_HOME/bin/jboss-cli.xml
@artizirk
artizirk / connect.py
Last active January 26, 2022 21:32
Automaticaly connect the first available modem using ModemManager, supports hotplug
#!/usr/bin/env python3
import dbus
from gi.repository import GObject as gobject
from enum import Enum
from dbus.mainloop.glib import DBusGMainLoop
class MMModemState(Enum):
MM_MODEM_STATE_FAILED = -1
MM_MODEM_STATE_UNKNOWN = 0
MM_MODEM_STATE_INITIALIZING = 1
@sebastianhaas
sebastianhaas / socketcan-interface.service
Created August 6, 2016 15:02
An example systemd unit file to setup a SocketCAN interface on startup
[Unit]
Description=SocketCAN interface can0 with a baudrate of 250000
After=multi-user.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/sbin/ip link set can0 type can bitrate 250000 ; /sbin/ifconfig can0 up
ExecReload=/sbin/ifconfig can0 down ; /sbin/ip link set can0 type can bitrate 250000 ; /sbin/ifconfig can0 up
ExecStop=/sbin/ifconfig can0 down
@MrOplus
MrOplus / Stunnel+TinyProxy(CentOS).sh
Last active October 14, 2022 10:36
Stunnel+TinyProxy Installer
#!/bin/bash
STUNNEL_PORT=443
TINY_PROXY_PORT=8888
function install_packages {
yum update -y
yum install make g++ gcc autogen automake autoconf asciidoc cmake git -y
yum groupinstall 'Development Tools' -y
}
function install_stunnel {
yum install -y openssl stunnel
@thomasdarimont
thomasdarimont / KeycloakAdminClientExample.java
Created January 12, 2016 19:15
Some Keycloak client examples
package de.tdlabs.training.keycloak;
import static java.util.Arrays.asList;
import javax.ws.rs.core.Response;
import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
import org.keycloak.admin.client.Keycloak;
import org.keycloak.admin.client.KeycloakBuilder;
import org.keycloak.representations.idm.CredentialRepresentation;
@thomasdarimont
thomasdarimont / readme.md
Last active March 31, 2023 23:58
How to enable OpenTracing in Keycloak 10.x

How enable Micro Profile OpenTracing in Keycloak 10.x

Keycloak 10.0.1 is based on Wildfly 19 which comes with support for OpenTracing. However the OpenTracing support in Keycloak is not active by default. This small example demonstrates how to enable OpenTracing in the latest Keycloak version based on the article Micro_Profile_OpenTracing_Comes_To_WildFly

This example tries to explore a solution for KEYCLOAK-8288.

@detiber
detiber / README.md
Last active April 16, 2023 02:21
Using CFSSL as an external CA for kubeadm

CFSSL as an external CA for non-ha kubeadm intialized clusters

Using cfssl to Create an External CA Infrastructure

Install cfssl

# This requires an existing Go environment with GOPATH set
go get -u github.com/cloudflare/cfssl/cmd/...
@shbatm
shbatm / 001-README.md
Last active August 20, 2023 21:33
Home Assistant USBIP Z-Wave Setup w/ More Robust Restart Management