Skip to content

Instantly share code, notes, and snippets.

View strongant's full-sized avatar

strongant strongant

View GitHub Profile
@strongant
strongant / 0_reuse_code.js
Created May 11, 2016 02:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@strongant
strongant / jetbrick.print.js
Created November 21, 2016 01:52 — forked from subchen/jetbrick.print.js
JavaScript 实现打印功能(只打印网页中的一部分)
(function(window, $) {
/**
* 实现打印功能(只打印网页中的一部分)
*
* Usage:
* <button jw-click-print="#printContext">Print</button>
*/
var print = function($dom) {
$("iframe.js-print").remove();
@strongant
strongant / consul-a-install.txt
Last active January 4, 2022 08:48 — forked from sdorsett/consul-a-install.txt
install 3 node consul cluster on Centos 7
yum install -y epel-release
yum install -y bind-utils unzip jq
cd ~/
wget https://releases.hashicorp.com/consul/1.5.3/consul_1.5.3_linux_amd64.zip
unzip consul_1.5.3_linux_amd64.zip
mv consul /usr/local/bin/
adduser consul
mkdir /etc/consul.d
chown -R consul:consul /etc/consul.d/
mkdir /var/consul
@strongant
strongant / _keycloak-cluster-config.md
Created April 8, 2022 15:16 — forked from dasniko/_keycloak-cluster-config.md
How to configure a keycloak cluster properly (legacy Wildfly edition)

Keycloak Cluster Configuration (How to) - Legacy Wildfly Distribution!!!

This is a short and simple example on how to build a proper Keycloak cluster, using JDBC_PING as discovery protocol and an NGINX server as reverse proxy.

Please see also my video about Keycloak Clustering: http://www.youtube.com/watch?v=P96VQkBBNxU

@strongant
strongant / Dockerfile
Created April 11, 2022 14:28 — forked from thomasdarimont/Dockerfile
Keycloak.X JGroups JDBC Ping
FROM quay.io/keycloak/keycloak:17.0.1 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
@strongant
strongant / Dockerfile
Created June 11, 2022 07:01 — forked from xgp/Dockerfile
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
@strongant
strongant / java8-centos-amazon-linux.md
Created June 27, 2022 08:58 — forked from diegopacheco/java8-centos-amazon-linux.md
How to Install Java 8 in CentOS / Amazon Linux?
# Remove java 7
sudo yum remove -y java

# Install basic packages
sudo yum install -y git

# Download and install java 8
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz"
tar -xzvf jdk-8u131-linux-x64.tar.gz
@strongant
strongant / maven.txt
Created June 28, 2022 15:45
Maven 3.5.2 Linux Installation Script
#//INSTRUCTIONS TO INSTALL MAVEN ON LINUX
#//Downloads install file from Maven Distro
wget http://www-us.apache.org/dist/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz
tar xzf apache-maven-3.5.2-bin.tar.gz
#//Enables script to write to directory /usr/local so that it can make the directory /maven
sudo chmod 777 /usr/local
sudo mkdir /usr/local/maven
@strongant
strongant / uao.md
Created August 27, 2022 14:13 — forked from sgyyz/uao.md
uao command - unzip your project and import to intellij automatically
  1. import project into idea command
$ curl -L "https://gist.githubusercontent.com/chrisdarroch/7018927/raw/9a6d663fd7a52aa76a943fe8a9bc6091ad06b18d/idea" -o /usr/local/bin/idea
$ chmod +x /usr/local/bin/idea
  1. unzip and open project command
$ curl -L "https://gist.githubusercontent.com/sgyyz/adfa4f05af3d81cf0e17e19cf7044c85/raw/b6b9e871d5a4f5435a09d00b0a52e3db0b90699a/uao.sh" -o /usr/local/bin/uao.sh
$ chmod +x /usr/local/bin/uao.sh
$ ln -sf /usr/local/bin/uao.sh /usr/local/bin/uao
@strongant
strongant / README
Created August 31, 2022 13:21 — forked from cedricziel/README
Simple setup for keycloak and docker.
* run gen_keys.sh
* run keycloak_server.sh
Take a look at kcadm on how to import more diverse data points like idp metadata and client configurations.
Also take a look at the simple import / export stuff at https://hub.docker.com/r/jboss/keycloak/