Skip to content

Instantly share code, notes, and snippets.

Edin Mujagic edin-m

Block or report user

Report or block edin-m

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@edin-m
edin-m / build.gradle
Created Nov 29, 2019 — forked from aalmiray/build.gradle
Aggregated Jacoco reports in a multi-project Gradle build
View build.gradle
allprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
repositories {
jcenter()
}
jacoco {
toolVersion = '0.7.1.201405082137'
@edin-m
edin-m / docker-shared-nw.md
Created Jul 20, 2019 — forked from kjtanaka/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.
View docker-shared-nw.md

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.

View index.html
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
button {
background-color: #4CAF50; /* Green */
border: none;
color: white;
padding: 15px 32px;
View index.html
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<canvas id="canvas" width="600" height="600" style="border: 1px solid black"></canvas>
<script src="index.js"></script>
@edin-m
edin-m / .gitignore
Last active Sep 12, 2016
MoEE zavrsni rad
View .gitignore
node_modules
@edin-m
edin-m / gulpfile.js
Created Jun 24, 2016 — forked from danharper/gulpfile.js
New ES6 project with Babel, Browserify & Gulp
View gulpfile.js
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));
View ring_buffer.sql
-- 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;
@edin-m
edin-m / README.md
Last active Aug 29, 2015
node readable stream memory issue
View README.md

Run server with

$ node server.js

Run client with

$ node client.js 30000
@edin-m
edin-m / angular-ui-router-redirect.js
Created Mar 13, 2015
Redirection with angular ui router states.
View angular-ui-router-redirect.js
// this is needed when there are multiple hierarchy states
// articles
// articles.view
// articles.add
// articles.config
// articles.config.type1
// articles.config.type2
angular.module('articles')
.run([
'$rootScope',
View conver-ppk.sh
# puttygen Deployment.ppk -L Deployment.ppk
# puttygen Deployment.ppk -O private-openssh -o Deployment.key.pvk
# http://stackoverflow.com/a/17427700/1293500
# bulk convert:
# cd ~/.putty
# for X in *.ppk; do puttygen $X -L > ~/.ssh/$(echo $X | sed 's,./,,' | sed 's/.ppk//g').pub; puttygen $X -O private-openssh -o ~/.ssh/$(echo $X | sed 's,./,,' | sed 's/.ppk//g').pvk; done;
You can’t perform that action at this time.