Skip to content

Instantly share code, notes, and snippets.

View davezen1's full-sized avatar
🌩️
GCP Certified Cloud Architect

David Hodge davezen1

🌩️
GCP Certified Cloud Architect
  • Northern Virginia
View GitHub Profile
@davezen1
davezen1 / Dockerfile
Last active October 31, 2019 18:00
CentOS Amazon Coretto
FROM centos:8
LABEL maintainer="dev@someproject.org"
ARG BUILD_DATE
LABEL org.label-schema.build-date=$BUILD_DATE
# Local RPM JDK 8
ADD ./java-1.8.0-amazon-corretto-devel-1.8.0_232.b09-1.x86_64.rpm /java-1.8.0-amazon-corretto-devel-1.8.0_232.b09-1.x86_64.rpm
# 679MB without yum clean and with clean 663MB
@davezen1
davezen1 / gist:d027637af41e4fea1000e7876675a042
Created August 23, 2018 14:41
CompletableFuture Example
/// Based on Available Processors?
private ExecutorService EXECUTOR_SERVICE = Executors.newFixedThreadPool(15);
////
@Override
public List<String> getStuff(List<String> listOfStuff) {
if(listOfStuff == null || listOfStuff.isEmpty()) {
return Collections.emptyList();
}
@davezen1
davezen1 / roboto-font-woff-only.css
Created June 7, 2018 13:19
Roboto Font - Just woff woff2
@font-face {
font-family: "Roboto";
src: local("Roboto Regular"), local("Roboto-Regular"), url("../../../fonts/roboto/Roboto-Regular.woff2") format("woff2"), url("../../../fonts/roboto/Roboto-Regular.woff") format("woff");
font-weight: 400;
font-style: normal; }
@font-face {
font-family: "Roboto-Regular";
src: local("Roboto Regular"), local("Roboto-Regular"), url("../../../fonts/roboto/Roboto-Regular.woff2") format("woff2"), url("../../../fonts/roboto/Roboto-Regular.woff") format("woff"); }
@font-face {
font-family: "Roboto";
@davezen1
davezen1 / baseline.js
Last active May 3, 2018 17:49
Visual Diff with PhantomJS and Pixelmatch
//creates a baseline picture of a website
var page = require('webpage').create();
page.open('https://<YOUR SITE>', function () {
page.render('baseline.png');
phantom.exit();
});
### Keybase proof
I hereby claim:
* I am davezen1 on github.
* I am davezen1 (https://keybase.io/davezen1) on keybase.
* I have a public key ASCzbKzmFYLJ6XOZEcJLUb0wlPfP6SnCYzvmgKqSX2UXyQo
To claim this, I am signing this object:
@davezen1
davezen1 / GitHub-Forking.md
Created March 24, 2017 18:34 — forked from jamescarlos/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, when I started going through the process of forking and issuing pull requests, I had some trouble figuring out the proper method for doing so and made quite a few mistakes along the way. I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your

@davezen1
davezen1 / sonarqube-mysql-docker-compose.yml
Created February 17, 2017 01:47 — forked from batmat/sonarqube-mysql-docker-compose.yml
Working SonarQube + Mysql Dead Simple Docker Compose file
sonarqube:
image: sonarqube:5.1.1
ports:
- "9000:9000"
- "3306:3306"
environment:
- SONARQUBE_JDBC_USERNAME=sonar
- SONARQUBE_JDBC_PASSWORD=sonar
- SONARQUBE_JDBC_URL=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true
@davezen1
davezen1 / softmax.py
Last active January 24, 2016 04:53
Softmax Example from Udacity Deep Learning Class
scores = [3.0, 1.0, 0.2]
import numpy as np
def softmax(x):
"""Compute Softmax"""
return np.exp(x) / np.sum(np.exp(x), axis=0)
print(softmax(scores))
@davezen1
davezen1 / logback.xml
Created August 28, 2014 20:27
Sample LogBack.xml
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<appender name="RootFileAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>../logs/APP_NAME.log</file>
<append>true</append>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>debug</level>
</filter>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
@davezen1
davezen1 / serviceExampleWithDelete.js
Last active January 3, 2016 14:09
example of safely using delete method wth $http
angular.module('myApp')
.factory('ProjectDetails', function ($http, $q) {
return {
createproject: function(project) {
var deferred = $q.defer();
$http.post("/a/project", project).success(function(data){
deferred.resolve(data);
}).error(function(data){
deferred.reject(data);
});