Skip to content

Instantly share code, notes, and snippets.

View markoradinovic's full-sized avatar

Marko Radinovic markoradinovic

View GitHub Profile
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 8.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :20141129
#usage :/bin/bash wildfly-install.sh
WILDFLY_VERSION=8.2.0.Final
WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION
@markoradinovic
markoradinovic / autobuild-openconnect-7-ubuntu.sh
Last active April 4, 2016 12:55 — forked from darrenpmeyer/autobuild-openconnect-7-ubuntu.sh
Autobuild script for OpenConnect 7 (Ubuntu 14/15 trusty/vivid)
#!/usr/bin/env bash
oc_ver="7.06"
echo "Autobuild OpenConnect $oc_ver"
echo " "
echo "This script uses apt-get and make install via sudo rights"
echo "To simplify this, we're going to use sudo -v to pre-authenticate you"
sudo -k
sudo -v
@markoradinovic
markoradinovic / JettyConfig.java
Created January 16, 2016 20:22 — forked from fastnsilver/JettyConfig.java
A possible way to bring together AWS CloudWatch and ServoMetrics observers in a Jetty Container
@Configuration
public class JettyConfig {
@Autowired
private MetricRegistry metricRegistry;
public Server jettyServer(int maxThreads, int minThreads, int idleTimeout) {
QueuedThreadPool threadPool = new InstrumentedQueuedThreadPool(metricRegistry);
threadPool.setMaxThreads(maxThreads);
threadPool.setMinThreads(minThreads);
@markoradinovic
markoradinovic / ubuntu-maven-3
Created January 19, 2016 19:40 — forked from stephanetimmermans/ubuntu-maven-3
Install Maven3 on Unbuntu 14.04
#sudo apt-get remove maven2
sudo add-apt-repository "deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main"
sudo apt-get update
sudo apt-get install maven3
#If you encounter this:
#The program 'mvn' can be found in the following packages:
# * maven
# * maven2
@markoradinovic
markoradinovic / native-kernel-compilation-odroid-c2.md
Created July 13, 2016 16:03 — forked from Brainiarc7/native-kernel-compilation-odroid-c2.md
This document summarizes the steps needed to perform a native kernel compilation on the ARM-based Odroid C2 development board.

Native kernel compilation on the Odroid-C2:

The Odroid-C2's processor is fast enough to compile the Linux kernel on it natively, and as such, taking this path should eliminate the complexity involved in cross-compilation.

Installing tools

Depending on the distro you are running, and the packages you have installed, you might need to add the compiler and other build-related tools. For example, a minimal base Debian image would not have gcc, since an embedded Linux appliance generally has no requirement to be used as a development tool. This item shows how to install what you need: Adding Native Compiler and Tools

@markoradinovic
markoradinovic / API.md
Created February 8, 2017 22:45 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@markoradinovic
markoradinovic / git-maven-howto.md
Created April 29, 2017 12:16 — forked from fernandezpablo85/git-maven-howto.md
how to create your own maven repository on github

How to create a maven repository for your github project step by step

Clone your project in a separate folder

(note: replace ORGANIZATION and PROJECT)

git clone git clone git@github.com:ORGANIZATION/PROJECT.git my-repository

Cd into it

@markoradinovic
markoradinovic / iptableflip.sh
Created June 24, 2017 00:01 — forked from lewisd32/iptableflip.sh
Snippet of Unbounce script for restarting HAProxy with zero downtime
echo "Flipping tables! (╯°□°)╯︵ ┻━┻"
num_rules=3
real=3 # exposed to the ELB as port 443
test=4 # used to install test certs for domain verification
health=5 # used by the ELB healthcheck
blue_prefix=855
green_prefix=866
@markoradinovic
markoradinovic / retry.sh
Created July 3, 2017 22:20 — forked from dublx/retry.sh
Bash - retry command N times
#!/bin/bash
set -euo pipefail
function myFunction() {
myCommand
return $?
}
retry=0
maxRetries=5
@markoradinovic
markoradinovic / howto_deb_repackage.txt
Created August 14, 2017 13:31 — forked from shamil/howto_deb_repackage.txt
Howto repackage deb packages
Use folowing steps to repackage dep package:
1: Extract deb package
# dpkg-deb -x <package.deb> <dir>
2: Extract control-information from a package
# dpkg-deb -e <package.deb> <dir/DEBIAN>
3. After completed to make changes to the package, repack the deb
# dpkg-deb -b <dir> <new-package.deb>