Skip to content

Instantly share code, notes, and snippets.

View aelkz's full-sized avatar
👽
working hard

Raphael Abreu aelkz

👽
working hard
View GitHub Profile
@aelkz
aelkz / keycloak-client-deploy.sh
Created February 9, 2020 02:12
Red Hat Single Sign-On (Keycloak) - Client creation shell script
#!/bin/bash
SSO_URL=localhost:8080
SSO_REALM=REDHAT
SSO_REALM_CERT=$SSO_REALM.pem
SSO_REALM_USERNAME=admin
SSO_REALM_PASSWORD=admin
SSO_API_CLIENT_ID=blueprint-sso-app
SSO_AUTH_URL=http://${SSO_URL}/auth
SSO_TOKEN_URL=http://${SSO_URL}/auth/realms/${SSO_REALM}/protocol/openid-connect/token
@aelkz
aelkz / curl-get-status-code-and-response-body.sh
Created February 6, 2020 19:56 — forked from maxcnunes/curl-get-status-code-and-response-body.sh
Curl - Get status code and response body
URL="http://stackoverflow.com/"
# store the whole response with the status at the and
HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -X POST $URL)
# extract the body
HTTP_BODY=$(echo $HTTP_RESPONSE | sed -e 's/HTTPSTATUS\:.*//g')
# extract the status
HTTP_STATUS=$(echo $HTTP_RESPONSE | tr -d '\n' | sed -e 's/.*HTTPSTATUS://')
@aelkz
aelkz / blah
Created December 12, 2019 18:13
SEAM Migration
x
@aelkz
aelkz / cookie.js
Last active December 5, 2019 15:35
3scale - Developer Portal
@aelkz
aelkz / ca.md
Created September 7, 2019 21:20 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

ansible-playbook -vvv -i /home/raphael.alex/openshift/inventory /usr/share/ansible/openshift-ansible/playbooks/adhoc/uninstall.yml
ansible -vvv nodes -i /home/raphael.alex/openshift/inventory -m file -a "dest=/etc/origin state=absent"
ansible -vvv nodes -i /home/raphael.alex/openshift/inventory -m file -a "dest=/etc/cni state=absent"
yum -y remove openshift-ansible-3.11.123 openshift-ansible-3.11.98 openshift-ansible-3.11.129
yum -y remove ansible ansible*
yum -y remove openshift openshift-* etcd docker docker-common
yum -y remove docker docker-common docker-selinux docker-engine
yum -y docker*
rm -rf /etc/origin /var/lib/openshift /etc/etcd /var/lib/etcd /etc/sysconfig/atomic-openshift* /etc/sysconfig/docker* /root/.kube/config /etc/ansible/facts.d /usr/share/openshift /var/lib/docker
rm -rf /tmp/ansible* /tmp/openshift* /tmp/tmp*
@aelkz
aelkz / .zshrc
Created July 15, 2019 19:17
zshrc (update 15072019)
MAVEN_PATH=/usr/local/devtools/apache-maven-3.5.4/bin/
OC_CLIENT=/usr/local/devtools/oc-cli-v3.11/
#OC_CLIENT=/usr/local/devtools/oc-cli-v4.1/
export PATH=$PATH:$MAVEN_PATH:$OC_CLIENT
# Path to your oh-my-zsh installation.
export ZSH="/Users/raphael/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
@aelkz
aelkz / inventory
Last active August 5, 2019 19:41
ocp-inventory
[OSEv3:vars]
###########################################################################
# Host Variables
###########################################################################
openshift_public_hostname=foobar.io
openshift_master_cluster_hostname=foobar.io
openshift_master_default_subdomain=apps.foobar.io
openshift_master_api_port=8443
openshift_master_console_port=8443
@aelkz
aelkz / .zshrc
Created June 25, 2019 12:31
.zshrc
1 MAVEN_PATH=/usr/local/devtools/apache-maven-3.5.4/bin/
2 #OC_CLIENT=/usr/local/devtools/oc-cli-v3.11/
3 OC_CLIENT=/usr/local/devtools/oc-cli-v4.1/
4
5 export PATH=$PATH:$MAVEN_PATH:$OC_CLIENT
6
7 # Path to your oh-my-zsh installation.
8 export ZSH="/Users/raphael/.oh-my-zsh"
9
10 # Set name of the theme to load --- if set to "random", it will
@aelkz
aelkz / JavaRouter.java
Created June 21, 2019 02:21 — forked from kameshsampath/JavaRouter.java
A Demo/example showing SSL/TLS Customization with Camel
package demo;
import org.apache.camel.CamelContext;
import org.apache.camel.Endpoint;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.http4.HttpComponent;
import org.apache.camel.util.jsse.KeyManagersParameters;
import org.apache.camel.util.jsse.KeyStoreParameters;
import org.apache.camel.util.jsse.SSLContextParameters;
import org.apache.camel.util.jsse.TrustManagersParameters;