Skip to content

Instantly share code, notes, and snippets.

View kg6zvp's full-sized avatar

Sam McCollum kg6zvp

View GitHub Profile
@kg6zvp
kg6zvp / Calculator.java
Last active April 19, 2018 19:35
Calculator Class for Tutorial 12 - Business Logic and @Inject
package com.airhacks;
import java.util.Arrays;
import java.util.stream.Collectors;
import javax.enterprise.context.RequestScoped;
/**
*
* @author smccollum
*/
@kg6zvp
kg6zvp / persistence.xml
Last active April 28, 2018 01:16
Tutorial Database Part 2 persistence.xml gist
<?xml version="1.0" encoding="UTF-8"?>
<persistence>
<persistence-unit name="tutorial">
<properties>
<property name="javax.persistence.schema-generation.database.action" value="create" />
<!-- Don't worry about these, they are there to make the tutorial easier to follow -->
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.use_sql_comments" value="true"/>

Keybase proof

I hereby claim:

  • I am kg6zvp on github.
  • I am kg6zvp (https://keybase.io/kg6zvp) on keybase.
  • I have a public key ASB1SwTBS2cDKuN1pyl5UP99dpy8C25cxlVTChqlLdHxYAo

To claim this, I am signing this object:

@kg6zvp
kg6zvp / build-ttv4.sh
Last active October 9, 2018 04:43
Build thorntail-v4 and install to local maven cache
#!/bin/bash
#apk update && apk add openssl ca-certificates git # uncomment if you're using the maven:alpine image
git clone 'https://github.com/kg6zvp/thorntail.git'> /dev/null
cd thorntail/ && git checkout 4x_stable
# git checkout $COMMIT_HASH # uncomment this line if you want to lock CI down to a specific commit hash
mvn -DskipDocker -DskipTests install -pl '!docs,!howto/openshift,!howto/openshift-s2i'
cd .. && rm -rf thorntail
@kg6zvp
kg6zvp / mirror_to_github.sh
Created September 12, 2018 19:30
Mirror a git repo up to github
#!/bin/bash
# CI_REPOSITORY_URL: source repo
# DEST_REPO_URL: destination repo (ie: username/repo.git)
# GH_EMAIL: github e-mail
# GH_NAME: github name
# GITHUB_PERSONAL_ACCESS_TOKEN: github access token
# GH_USERNAME: github username
# SRC_BR: source branch
# DEST_BR: destination branch
@kg6zvp
kg6zvp / prometheus-deployment-kubernetes.yaml
Created May 30, 2019 19:30
Rudimentary Prometheus Deployment on Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
name: prometheus-deployment
labels:
app: prometheus
spec:
replicas: 1
selector:
matchLabels: