Skip to content

Instantly share code, notes, and snippets.

View tanmally's full-sized avatar
🎯
Focusing

Thanneer tanmally

🎯
Focusing
View GitHub Profile
# Property values can:
# - reference an environment variable, for example sonar.jdbc.url= ${env:SONAR_JDBC_URL}
# - be encrypted. See https://redirect.sonarsource.com/doc/settings-encryption.html
#--------------------------------------------------------------------------------------------------
# DATABASE
#
# IMPORTANT:
# - The embedded H2 database is used by default. It is recommended for tests but not for
# production use. Supported databases are MySQL, Oracle, PostgreSQL and Microsoft SQLServer.
@tanmally
tanmally / ProcessExecutor,java
Created October 12, 2014 11:44
Usage : java -jar process-exec-1.0.jar 'directory' 'batch-file' 'interval'
package com.trumbleinc.exec;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
@tanmally
tanmally / virtualbox-docker-port-management.bat
Created April 10, 2014 12:24
Virtualbox docker port mapping for windows batch file
FOR /L %%A IN (49152,1,65535) DO (
VBoxManage modifyvm "$vm_name" --natpf1 "tcp-port-%%A,tcp,,%%A,,%%A";
)
@tanmally
tanmally / docker-enable-remote-api.sh
Last active August 29, 2015 13:57
Install Order 3. Enable rest api access via http for docker on port 4243
# To get Docker to listen on a port 4243 on localhost , if on public ip then secure it before exposing.
sudo service docker stop
sudo touch /etc/init/docker.conf.new
sudo chmod 666 /etc/init/docker.conf.new
sudo sed 's/"$DOCKER" -d $DOCKER_OPTS/"$DOCKER" $DOCKER_OPTS -dns 8.8.8.8 -H tcp:\/\/0.0.0.0:4243 -H unix:\/\/\/var\/run\/docker.sock -d/g' /etc/init/docker.conf > /etc/init/docker.conf.new
sudo mv /etc/init/docker.conf.new /etc/init/docker.conf
sudo chmod 644 /etc/init/docker.conf
sudo service docker start
@tanmally
tanmally / swap-memory-ufw-docker-update.sh
Last active August 29, 2015 13:57
Install Order 2. Memory and Swap settings for docker to work on ubuntu
# Memory and Swap Accounting
sudo cp /etc/default/grub /etc/default/grub.original
sudo touch /etc/default/grub.new
sudo chmod 666 /etc/default/grub.new
sudo sed 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"/g' /etc/default/grub > /etc/default/grub.new
sudo mv /etc/default/grub.new /etc/default/grub
sudo chmod 644 /etc/default/grub
# Docker uses a bridge to manage container networking. By default, UFW drops all
# forwarding traffic. As a result you will need to enable UFW forwarding
@tanmally
tanmally / install-docker-ubuntu-12.04.sh
Last active August 29, 2015 13:57
Install Order 1. Install docker , update ufw
sudo apt-get install linux-image-extra-`uname -r`
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -"
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\
> /etc/apt/sources.list.d/docker.list"
sudo apt-get update
# install latest Docker
sudo apt-get -y install lxc-docker