Skip to content

Instantly share code, notes, and snippets.


Guillaume Husta ghusta

View GitHub Profile
ghusta / create_machine_docker-dev.cmd
Created Jan 17, 2018
Create a Docker Machine with Windows, VirtualBox and Boot2Docker with a customized shared folder
View create_machine_docker-dev.cmd
rem set MACHINE_STORAGE_PATH=D:\Dev\Docker\.docker\machine
docker-machine version
docker-machine ls
echo creation VM VirtualBox : Docker Machine (Help : docker-machine create --help)
rem var env (ex : proxy) : --engine-env
set VM_NAME=docker-dev
mkdir d:\Dev\Docker\.docker\machine\SharedFolders\%VM_NAME%
docker-machine create -d "virtualbox" --virtualbox-cpu-count "2" --virtualbox-disk-size "50000" --virtualbox-memory "2048" --virtualbox-share-folder "\\?\d:\Dev\Docker\.docker\machine\SharedFolders\%VM_NAME%:host-shared" %VM_NAME%
View Jenkinsfile
pipeline {
// run on jenkins nodes tha has java 8 label
agent { label 'java8' }
// global env variables
environment {
stages {
stage('Build with unit testing') {
SalmonKing72 /
Last active Jul 7, 2021
docker-machine: adding insecure registry configuration to an existing machine/VM

The issue

  • deployed a local docker registry container to a docker-machine VM
  • cannot push to local docker registry
  • get an error including a message similar to, "http: server gave HTTP response to HTTPS client"

The solution

  • in order to push to this local registry you need to make some modifications to your docker VM
  • open c:\users\<user-name>\.docker\machine\machines\default\config.json or ~/.docker/machine/machines/default/config.json in an editor
  • find the InsecureRegistry property and append "localhost:5000" to it
  • go to your docker terminal
ghusta / Dockerfile
Last active Feb 6, 2019
Tomcat 8 + Docker : add custom directory in classpath (Method #2 : define CLASSPATH in bin/
View Dockerfile
FROM tomcat:8.5-jre8
# $CATALINA_HOME is defined in tomcat image
ADD target/my-webapp*.war $CATALINA_HOME/webapps/my-webapp.war
# Application config
RUN mkdir $CATALINA_HOME/app_conf/
ADD src/main/config/ $CATALINA_HOME/app_conf/
# Create "$CATALINA_HOME/bin/"
ghusta / Dockerfile
Last active Dec 4, 2020
Tomcat 8 + Docker : add custom directory in classpath (Method #1 : modify conf/
View Dockerfile
FROM tomcat:8.5-jre8
# $CATALINA_HOME is defined in tomcat image
ADD target/my-webapp*.war $CATALINA_HOME/webapps/my-webapp.war
# Application config
RUN mkdir $CATALINA_HOME/app_conf/
ADD src/main/config/ $CATALINA_HOME/app_conf/
# Modify property 'shared.loader' in
YuMS /
Created Jun 29, 2016
Update git to latest version on Ubuntu
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git -y
View Custom Tabs - Close Button
CustomTabsIntent.Builder intentBuilder = new CustomTabsIntent.Builder();
getResources(), R.drawable.ic_arrow_back));
this,, Uri.parse(url), new WebviewFallback());
staltz /
Last active Nov 27, 2021
The introduction to Reactive Programming you've been missing
rob-murray / add_intellij_launcer
Last active Nov 15, 2021
Add Intellij launcher shortcut and icon for ubuntu
View add_intellij_launcer
// create file:
sudo vim /usr/share/applications/intellij.desktop
// add the following
[Desktop Entry]
varunachar /
Last active Sep 29, 2016
A cache buster for jsp. Meant for webapp sitting behind a Apache 2 server. Cache is busted by appending a file with it's last modified time and then including it in a JSP. Example : <script type="text/javascript" src="js/trelta-all.min.123345.js" ></script> You don't need to modify the actual name of the file on the hard disk, since we've define…
package com.trelta.commons.web;
import com.trelta.commons.utils.constants.Settings;
* Cache Buster which appends the last modified time of a file to it's name