Skip to content

Instantly share code, notes, and snippets.

View dkirrane's full-sized avatar

Desmond Kirrane dkirrane

  • Avaya
  • Galway, Ireland
View GitHub Profile
@guillaumerose
guillaumerose / README.md
Last active July 9, 2018 09:53
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
@mxlje
mxlje / ssl.md
Last active January 10, 2022 02:03
SSL Certificate Commands

These commands are needed every time you want to generate a new certificate signing request to give to an authority in order for them to generate and sign a certificate for you.

https://letsencrypt.org/ solves a lot of the pain involved with SSL certs, but sometimes you still need to go the "old school" route. I constantly forget how this stuff works, so I collected the most important commands (and what they do) here for easy copy & paste.

Generate new private key

@wdullaer
wdullaer / install.sh
Last active April 2, 2024 20:33
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# 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"
@codemoran
codemoran / graphdat-install-conntrack-tools.sh
Created January 8, 2014 00:06
Install conntrack-tools on CentOS
#!/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
@broady
broady / 1MarkerAnimation.java
Last active March 13, 2024 12:44
Animating Markers
/* Copyright 2013 Google Inc.
Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0.html */
package com.example.latlnginterpolation;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.os.Build;
@Dyrcona
Dyrcona / quickpick
Last active October 23, 2023 09:06
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 <tsbere@mvlc.org>
# Author: Jason Stephenson <jason@sigio.com>
#
# 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
@4ndrej
4ndrej / SSLPoke.java
Last active January 3, 2024 09:50
Test of java SSL / keystore / cert setup. Check the comment #1 for howto.
import javax.net.ssl.SSLParameters;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {
@samuelspiza
samuelspiza / merge-conflict.sh
Created March 2, 2010 21:29
Creating a git repo with a merge conflict for testing purposes.
#!/bin/sh
# Creating a git repo with a merge conflict for testing purposes.
mkdir merge
cd merge
git init
echo "BASE" > conflict.txt
git add conflict.txt
git commit -m "Initial commit"