Skip to content

Instantly share code, notes, and snippets.

View gkhays's full-sized avatar

Garve Hays gkhays

View GitHub Profile
@gkhays
gkhays / Pubnub.py
Created March 21, 2016 15:01 — forked from stephenlb/Pubnub.py
Python Echo Server - Example of Publish / Subscribe Python Echo Server without IP address binding.
## www.pubnub.com - PubNub Real-time push service in the cloud.
# coding=utf8
## PubNub Real-time Push APIs and Notifications Framework
## Copyright (c) 2014-15 Stephen Blum
## http://www.pubnub.com/
## -----------------------------------
## PubNub 3.5.3 Real-time Push Cloud API
## -----------------------------------
@gkhays
gkhays / body.html
Created March 18, 2016 00:50 — forked from mattborn/body.html
Relative gist files
<h1>Hello world!</h1>
@gkhays
gkhays / Docker-Java.txt
Last active March 18, 2016 21:19 — forked from HennIdan/Docker-Java.txt
Installing Java from Oracle
# Download and unarchive Java
RUN mkdir /opt && curl -jksSLH "Cookie: oraclelicense=accept-securebackup-cookie"\
http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz \
| tar -xzf - -C /opt &&\
ln -s /opt/jdk1.7.0_79 /opt/jdk &&\
rm -rf /opt/jdk/*src.zip \
/opt/jdk/lib/missioncontrol \
/opt/jdk/lib/visualvm \
/opt/jdk/lib/*javafx* \
/opt/jdk/jre/lib/plugin.jar \
@gkhays
gkhays / setenv.sh
Created October 28, 2015 14:31 — forked from terrancesnyder/setenv.sh
./setenv.sh - example setenv.sh with defaults set for minimal time spent in garbage collection
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft
@gkhays
gkhays / osx-10.11-setup.md
Created October 27, 2015 20:03 — forked from kevinelliott/osx-10.11-setup.md
Mac OS X 10.11 El Capitan Setup

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

@gkhays
gkhays / CollectionUtils.java
Last active April 3, 2016 16:29 — forked from milingo/CollectionUtils.java
Java Collections
// Init
new String[]{"a", "b"}
List<String> list = new ArrayList<String>(
Arrays.asList("String A", "String B", "String C")
);
Map<String, Owner> owners = new HashMap<String, Owner>() {{
put("no-money", createOwnerWithoutMoney());
@gkhays
gkhays / TestTimeStampUtils.java
Last active June 2, 2021 12:06 — forked from kristopherjohnson/TimestampUtils.java
Methods for generating ISO 8601 timestamps in Java/Android
package net.kristopherjohnson.util.test;
import static org.junit.Assert.*;
import java.util.Date;
import net.kristopherjohnson.util.TimestampUtils;
import org.junit.Before;
import org.junit.Test;