Skip to content

Instantly share code, notes, and snippets.

@edin-m
edin-m / build.gradle
Created November 29, 2019 22:00
Aggregated Jacoco reports in a multi-project Gradle build
allprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
repositories {
jcenter()
}
jacoco {
toolVersion = '0.7.1.201405082137'
@edin-m
edin-m / docker-shared-nw.md
Created July 20, 2019 16:12 — forked from kojiwell/docker-shared-nw.md
This is how to create a bridge between Docker containers and outside and create containers with the IP addresses you want to assign.

Docker - Create a Bridge and Shared Network

Sometimes I want to use Docker containers like regular VMs, creating a bridge on a Docker host, having containers on the same subnet with IP addresses I want to assign, and then logging into them via port 22. (No port forwarding, please.) So here's how to do it.

On this example, I use Vagrant and VirtualBox on my MacBook and create containers with IP addresses shown on the table below. Once you go through these steps, you should be able to extend the idea into your on-premises network.

@edin-m
edin-m / gulpfile.js
Created June 24, 2016 11:03 — forked from danharper/gulpfile.js
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
-- Example table
CREATE TABLE ring_buffer (id INTEGER PRIMARY KEY AUTOINCREMENT, data TEXT);
-- Number 10 on where statement defines the ring buffer's size
CREATE TRIGGER delete_tail AFTER INSERT ON ring_buffer
BEGIN
DELETE FROM ring_buffer WHERE id%10=NEW.id%10 AND id!=NEW.id;
END;