Skip to content

Instantly share code, notes, and snippets.

View justindav1s's full-sized avatar

Justin Davis justindav1s

  • Red Hat
  • United Kingdom
View GitHub Profile
apiVersion: v1
kind: LimitRange
metadata:
name: limit-ranges
spec:
limits:
- type: Container
max:
cpu: "800m"
apiVersion: v1
kind: ResourceQuota
metadata:
name: resource-quota
namespace: cicd
spec:
hard:
requests.cpu: '1'
requests.memory: 1Gi
limits.cpu: '2'
@justindav1s
justindav1s / nfs_pv.sh
Last active January 25, 2020 13:38
Create NFS Persistent Volumes
#!/usr/bin/env bash
PV_STUB="nfspv000"
OCP="api.ocp4:6443"
NFS_HOST=192.168.10.25
oc login https://${OCP}
for i in {1..30}; do
https://conemu.github.io/
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.keycloak.RSATokenVerifier;
import org.keycloak.common.VerificationException;
import org.keycloak.representations.AccessToken;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.keycloak.RSATokenVerifier;
import org.keycloak.common.VerificationException;
import org.keycloak.representations.AccessToken;
#!/bin/bash
# This script requires jq, a command line to to parse and format JSon.
# https://stedolan.github.io/jq/
function padBase64 {
STR=$1
MOD=$((${#STR}%4))
if [ $MOD -eq 1 ]; then
STR="${STR}="
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.json.JSONException;
import org.json.JSONObject;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.keycloak.representations.idm.ClientRepresentation;
import org.springframework.boot.test.context.SpringBootTest;
Log log = LogFactory.getLog(MyTokenController.class);
CloseableHttpClient httpClient
= HttpClients.custom()
.setSSLHostnameVerifier(new NoopHostnameVerifier())
.build();
HttpComponentsClientHttpRequestFactory requestFactory
= new HttpComponentsClientHttpRequestFactory();
requestFactory.setHttpClient(httpClient);
#!/bin/bash
# This script requires jq, a command line to to parse and format JSon.
# https://stedolan.github.io/jq/
function padBase64 {
STR=$1
MOD=$((${#STR}%4))
if [ $MOD -eq 1 ]; then
STR="${STR}="