Skip to content

Instantly share code, notes, and snippets.

@xgp
xgp / Dockerfile
Last active April 23, 2024 13:01
Keycloak 17 example using JGroups JDBC_PING discovery protocol for Infinispan
FROM quay.io/keycloak/keycloak:17.0.0 as builder
ENV KC_METRICS_ENABLED=true
ENV KC_FEATURES=preview
ENV KC_DB=postgres
ENV KC_HTTP_RELATIVE_PATH=/auth
# specify the custom cache config file here
ENV KC_CACHE_CONFIG_FILE=cache-ispn-jdbc-ping.xml
# copy the custom cache config file into the keycloak conf dir
@aslakknutsen
aslakknutsen / build.gradle
Last active September 12, 2015 20:23
Running Arquillian with Gradle 2.1 + Spring.io Dependency Management plugin: https://github.com/spring-gradle-plugins/dependency-management-plugin
plugins {
id "io.spring.dependency-management" version "0.2.1.RELEASE"
}
apply plugin: "io.spring.dependency-management"
apply plugin: 'java'
repositories {
mavenCentral()
mavenLocal()
}
@lukewpatterson
lukewpatterson / gist:6491377
Last active January 27, 2016 08:19
db2 in docker
FROM base
RUN echo "deb http://archive.canonical.com/ubuntu precise partner" >> /etc/apt/sources.list
RUN echo "deb-src http://archive.canonical.com/ubuntu precise partner" >> /etc/apt/sources.list
RUN echo "deb http://archive.ubuntu.com/ubuntu precise universe" >> /etc/apt/sources.list
RUN echo "deb-src http://archive.ubuntu.com/ubuntu precise universe" >> /etc/apt/sources.list
RUN apt-get update
RUN apt-get --yes install ksh
@obscurerichard
obscurerichard / README.md
Created September 17, 2012 22:35
Simulates a low bandwidth, high-latency network connection

slow

This bash script offers quick shortcuts to simulate slower network connections. It is useful when you need to simulate a wireless network on a Linux network server, especially when you are using a virtual machine guest on your local machine or in the cloud.

slow 3G                   # Slow network on default eth0 down to 3G wireless speeds
slow reset                # Reset connection for default eth0 to normal
slow vsat --latency=500ms # Simulate satellite internet  with a high latency
slow dsl -b 1mbps         # Simulate DSL with a slower speed than the default

slow modem-56k -d eth0 # Simulate a 56k modem on the eth1 device. eth0 is unchanged.

@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork git@github...my-fork.git