Skip to content

Instantly share code, notes, and snippets.

View ognjenm's full-sized avatar

Ognjen Miletić ognjenm

View GitHub Profile
@ognjenm
ognjenm / northern-horizon-mapserver-01.md
Last active August 22, 2023 11:03 — forked from emxsys/northern-horizon-mapserver-01.md
Northern Horizon MapServer Configuration

Northern Horizon Map Server

  • Host: DigitalOcean
  • Team: Emxsys
  • Project: Northern Horizon Servers
  • Server: mapserver.northernhorizon.org
  • IP Address: 157.245.134.29

The Northern Horizon map server is virtual machine hosted on DigitalOcean that provides web map services (WMS) and web map tile services (WMTS) to Northern Academy projects and the WorldWind Explorer. The map server is

@ognjenm
ognjenm / feature_server.md
Created August 22, 2023 10:55 — forked from emxsys/feature_server.md
How to setup a NASA feature server for place names

How to setup a NASA WorldWind feature server (WFS)

Ubuntu 18.04.4 LTS Initial Setup

Change root password

Changing password for root.
(current) UNIX password: 
Enter new UNIX password: 
Retype new UNIX password: 
@ognjenm
ognjenm / elevation_server.md
Created August 17, 2023 06:40 — forked from emxsys/elevation_server.md
How to setup a NASA WorldWind elevation server

How to setup a NASA WorldWind elevation server

Introduction

This guide shows how to create a WMS server on a local VM using Apache, MapServer and elevation data sets curated by NASA. This WMS server serves as a model for a production MapServer instance to be deployed on an a network.

The guide contains a brief overview of how the WorldWind clients make requests, followed by instructions for setting up the Apache web server, MapServer and the Apache caching.

@ognjenm
ognjenm / Authorization Code Flow.jmx
Created July 11, 2023 14:34 — forked from malys/Authorization Code Flow.jmx
[Authorization code flow] #keycloak #jmeter
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.2.1">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Authorization Code Flow" enabled="true">
<stringProp name="TestPlan.comments">add CookieManager.save.cookies=true to user.properties </stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">true</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments">
<elementProp name="scheme" elementType="Argument">
@ognjenm
ognjenm / multiprocess_migration.sh
Created March 4, 2022 09:23 — forked from tanema/multiprocess_migration.sh
migrate files from gridfs to aws s3
#! /bin/bash
###################### USAGE ######################################
usage() {
echo "
Usage: mongotos3 [-t n] mongo_host mongo_collection s3_bucket
-t : number of parallel processes to use
mongo_host : the host of the mongodb server
mongo_collection : the collection to collecthe gridfs data from
s3_bucket : the name of the bucket you want to cp the files to
"
"""Basic message consumer example"""
import functools
import logging
import pika
LOG_FORMAT = ('%(levelname) -10s %(asctime)s %(name) -30s %(funcName) '
'-35s %(lineno) -5d: %(message)s')
LOGGER = logging.getLogger(__name__)
logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT)
@ognjenm
ognjenm / dockerhub-v2-api-organization.sh
Created May 28, 2021 07:20 — forked from kizbitz/dockerhub-v2-api-organization.sh
Get the list of images and tags for a Docker Hub organization account
#!/bin/bash
# Example for the Docker Hub V2 API
# Returns all images and tags associated with a Docker Hub organization account.
# Requires 'jq': https://stedolan.github.io/jq/
# set username, password, and organization
UNAME=""
UPASS=""
ORG=""
@ognjenm
ognjenm / floating-ip-gateway.sh
Last active May 1, 2021 10:40 — forked from sparkcodeuk/floating-ip-gateway.sh
Digital Ocean floating IP gateway script (force droplet to use the assigned floating IP for outbound traffic as well as inbound traffic)
#!/bin/bash
# Force outbound traffic through the attached floating IP
NET_INT="eth0"
CURL_TIMEOUT=3
echo -n "Setting floating IP as the default gateway: "
# Check there's a floating IP attached to this droplet
if [ "$(curl -s --connect-timeout $CURL_TIMEOUT http://169.254.169.254/metadata/v1/floating_ip/ipv4/active)" != "true" ]; then
@ognjenm
ognjenm / revert-floating-ip-gateway.sh
Created May 1, 2021 10:37 — forked from Sugavanas/revert-floating-ip-gateway.sh
Digital Ocean floating IP gateway script (force droplet to use the assigned floating IP for outbound traffic as well as inbound traffic). This forked script will revert back to original settings. Pass the original IP address of the droplet as the first parameter.
#!/bin/bash
# Revert outbound traffic back to original ip. Call script with the original ip address of droplet
NET_INT="eth0"
CURL_TIMEOUT=3
if [ "$1" == "" ]; then
echo "Original IP of droplet not given."
exit 1
fi
@ognjenm
ognjenm / docker_1.13_manual_install_centos.sh
Last active September 7, 2020 09:50 — forked from trajakovic/docker_1.13_manual_install_centos.sh
Docker 1.13 manual installation on CentOS7 for Openshfit Origin 1.5.0.rc0 (since latest docker version is 17.03, oc cluster up is not happy with version)
yum install wget
wget https://mirrors.aliyun.com/docker-engine/yum/repo/main/centos/7/docker-engine-1.13.1-1.el7.centos.x86_64.rpm
wget https://mirrors.aliyun.com/docker-engine/yum/repo/main/centos/7/Packages/docker-engine-selinux-1.13.1-1.el7.centos.noarch.rpm
#package for docker-engine-selinux
yum install -y policycoreutils-python
rpm -i docker-engine-selinux-1.13.1-1.el7.centos.noarch.rpm
#package for docker-engine
yum install -y libtool-ltdl libseccomp