Skip to content

Instantly share code, notes, and snippets.

View krishnaglodha's full-sized avatar
🖥️
Making sense outta location

Krishna Lodha krishnaglodha

🖥️
Making sense outta location
View GitHub Profile
@krishnaglodha
krishnaglodha / GS.sh
Last active September 27, 2023 04:09
Install Geoserver and make service with single File
#!/bin/bash
# Update system packages
sudo apt-get update
# Install Java Runtime Environment (JRE)
sudo apt-get install -y openjdk-11-jre
# Install Unzip
sudo apt install -y unzip
@krishnaglodha
krishnaglodha / insertion.py
Created July 10, 2023 04:32
Insertion Sort Algorithm in python
# input value
array = [5,2,4,6,1,3,7]
# start loop from 1st index ( considering the 0th index value is already sorted
for index in range(1,len(array)):
j = index
# loop to compare current value with it's left neighbor value
while array[j-1] > array[j] and j > 0 :
# if left value is bigger, swap both values
array[j-1],array[j] = array[j], array[j-1]
# reduce j by 1 to now deal with lefter value
@krishnaglodha
krishnaglodha / gs-cluster.yml
Created March 30, 2023 07:46
Gist of cluster configuration of geoserver
geobroker:
image: rmohr/activemq:5.15.9
restart: on-failure
healthcheck:
test: curl --fail -s http://localhost:8161 || exit 1
interval: 20s
timeout: 10s
retries: 10
networks:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>GeoServer</display-name>
<context-param>
<param-name>serviceStrategy</param-name>
<!-- Meaning of the different values :
PARTIAL-BUFFER2
@krishnaglodha
krishnaglodha / wms_store.yaml
Created September 12, 2021 08:40
Basic store with URL and Layers
sources:
geoserver_wms:
type: wms
req:
#Provide geoserver wms endpoint without workspace as URL
url: http://localhost:8080/geoserver/wms?
#Provide layername without workspace as layers
layers: ne_10m_populated_places
@krishnaglodha
krishnaglodha / seed.yaml
Created September 12, 2021 07:15
default seeding file
# ---------------------------------------
# MapProxy example seeding configuration.
# ---------------------------------------
#
# This is a minimal MapProxy seeding configuration.
# See full_seed_example.yaml and the documentation for more options.
#
seeds:
myseed1:
@krishnaglodha
krishnaglodha / mapproxy.yaml
Created September 12, 2021 03:52
Default mapproxy.yaml file when we install mapproxy py package
# -------------------------------
# MapProxy example configuration.
# -------------------------------
#
# This is a minimal MapProxy configuration.
# See full_example.yaml and the documentation for more options.
#
# Starts the following services:
# Demo:
<!DOCTYPE html>
<html>
<head>
<title>Secured layer access - Krishna Lodha</title>
<link rel="stylesheet" href="https://openlayers.org/en/v4.6.5/css/ol.css" type="text/css">
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
<script src="https://openlayers.org/en/v4.6.5/build/ol.js"></script>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<title>Secured layer access - Krishna Lodha</title>
<link rel="stylesheet" href="https://openlayers.org/en/v4.6.5/css/ol.css" type="text/css">
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
<script src="https://openlayers.org/en/v4.6.5/build/ol.js"></script>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<title>Secured layer access - Krishna Lodha</title>
<link rel="stylesheet" href="https://openlayers.org/en/v4.6.5/css/ol.css" type="text/css">
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
<script src="https://openlayers.org/en/v4.6.5/build/ol.js"></script>
</head>
<body>