Skip to content

Instantly share code, notes, and snippets.

View dkirrane's full-sized avatar

Desmond Kirrane dkirrane

  • Avaya
  • Galway, Ireland
View GitHub Profile
@dkirrane
dkirrane / install-docker.sh
Last active June 30, 2017 11:56 — forked from wdullaer/install.sh
Docker install
# Add Docker PPA and install latest version
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker -y
# Install fig
sudo su
curl -L https://github.com/docker/fig/releases/download/1.0.0/fig-`uname -s`-`uname -m` > /usr/local/bin/fig
chmod +x /usr/local/bin/fig
@dkirrane
dkirrane / 0_reuse_code.js
Created October 20, 2015 09:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dkirrane
dkirrane / quickpick
Created May 21, 2017 19:38 — forked from Dyrcona/quickpick
A bash script to batch git cherry-pick of many commits from a single source branch. It can become a new git command if you save it in your path with a name like git-quickpick. Then, you can run it like so `git quickpick foo/bar'. Very handy, that.
#!/bin/bash
# Author: Thomas Berezansky <[email protected]>
# Author: Jason Stephenson <[email protected]>
#
# Feel free to use and to share this script in anyway you like.
# This script is intended as a shortcut for the git cherry-pick
# command when you have several commits that you want to cherry-pick
# into your local branch from another branch. It often results in a
@dkirrane
dkirrane / readme.md
Created May 30, 2017 10:57 — forked from cedricwalter/readme.md
Sonatype NEXUS 2 has a rest API :-) but NEXUS 3 has none/not ready, the following simulate curl/wget call

Fetching artifact programmatically through REST/API

Nexus 2.x

Nexus 2.x had a REST API to download artifacts like below based on some Maven GAV co-ordinates but this no longer works for Nexus 3.x

wget "http://local:8081/service/local/artifact/maven/redirect?g=com.mycompany&a=my-app&v=LATEST" --content-disposition

or

curl --insecure "https://local:8081/service/local/artifact/maven/content?r=public&g=log4j&a=log4j&v=1.2.17&p=jar&c=" > log4j.jar

#!/bin/bash
# Make sure we have the dev tools
yum groupinstall "Development Tools"
# Just in case you started installing dependencies from yum
# yum -y remove libnfnetlink
# lets put the source code here
mkdir -p ~/.src
@dkirrane
dkirrane / README.md
Created July 9, 2018 09:53 — forked from guillaumerose/README.md
Speedup your Maven builds

With the latest version of Docker for Mac and Windows (18.06), you can prefix all your mvn commands by RUN --mount=target=/root/.m2,type=cache:

Example:

# syntax = tonistiigi/dockerfile:runmount20180618
FROM maven:3.5-jdk-8-alpine AS build
COPY . .
RUN --mount=target=/root/.m2,type=cache mvn --batch-mode clean compile assembly:single

FROM openjdk:8-jre-alpine3.7
@dkirrane
dkirrane / kubectl.md
Created May 28, 2019 15:40 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no