Skip to content

Instantly share code, notes, and snippets.

@philipgloyne
philipgloyne / LearnGoIn5mins.md
Created October 19, 2022 12:02 — forked from prologic/LearnGoIn5mins.md
Learn Go in ~5mins
@philipgloyne
philipgloyne / 1_kubernetes_on_macOS.md
Created November 24, 2017 03:16 — forked from kevin-smets/1_kubernetes_on_macOS.md
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philipgloyne
philipgloyne / git-diff-chain.sh
Created July 22, 2014 15:45
Prints a sequence of diffs (individual git commits) . Useful for reviewing changes of merged branch.
#!/bin/bash
for commit in "$@"
do
echo "# git log --oneline $commit^!"
log=`git log --oneline $commit^!`
echo "# $log"
echo "# git diff $commit^!"
git diff $commit^!
done
@philipgloyne
philipgloyne / 1. Switch java version with a single command in Ubuntu
Last active December 19, 2015 07:29
Switch java, javac and javaws symbolic links with one (interactive) command Set up java-home as a 'update-alternatives' symbolic link.
sudo update-alternatives --install /usr/bin/java-home java-home /usr/lib/jvm/java-7-oracle 0
... rinse and repeat with all jdks on machine
@philipgloyne
philipgloyne / redis.sh
Created May 22, 2013 13:50
Start or Stop Redis A convenience script for working with Redis. ~/dev/tools/redis/home -> Your Redis Install
!/bin/bash
start=start
stop=stop
cli=cli
echo Execute [$1]
if [ $1 == $start ]; then
@philipgloyne
philipgloyne / tomcat7-maven-plugin
Created February 15, 2013 16:11
tomcat7-maven-plugin configuration. Start tomcat before integration test phase, shutdown tomcat after it.
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
<executions>
<execution>
<id>tomcat-run</id>
<goals>
<goal>run</goal>
</goals>
curl http://repo.varnish-cache.org/debian/GPG-key.txt | sudo apt-key add -
echo "deb http://repo.varnish-cache.org/ubuntu/ lucid varnish-3.0" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install varnish
import org.apache.xml.serialize.Method
import org.apache.xml.serialize.OutputFormat
import org.apache.xml.serialize.XMLSerializer
import spock.lang.Specification
import javax.xml.parsers.DocumentBuilder
import javax.xml.parsers.DocumentBuilderFactory
import org.dom4j.io.SAXReader