Skip to content

Instantly share code, notes, and snippets.

View neogeogre's full-sized avatar
:electron:
Still alive

Geoffrey Vincent neogeogre

:electron:
Still alive
View GitHub Profile
@neogeogre
neogeogre / docker-compose-confluence.yml
Last active November 24, 2021 07:52
Confluence and redmine local instance
version: '3'
services:
confluence:
image: idalko/atlassian-confluence
environment:
- DISABLE_NOTIFICATIONS=TRUE
- CONF_ARGS=-Datlassian.plugins.enable.wait=300
volumes:
@neogeogre
neogeogre / gdal_allign_on_gcp.sh
Last active September 13, 2022 19:40
run gdal and qgis only with docker
gdal_edit.py \
-gcp 10590 5452 -47.6504744 -20.7733625 \ # assign a gcp order is : pix_x pix_y lon lat
-gcp 8120 2911 -47.6513638 -20.7725031 \
-gcp 13985 5237 -47.6492496 -20.7732887 \
-gcp 13352 9067 -47.6494754 -20.7745861 \
-gcp 6626 7356 -47.6518992 -20.7740086 \
orthomosaic.tif # Set GCP pixels and according geographic coordinates
gdalwarp -tps -r bilinear orthomosaic.tif orthomosaic2.tif # do the transfo using the preassigned GCPs
@neogeogre
neogeogre / coroutine.kt
Created November 2, 2021 20:10
wait the end of multiple coroutine
import kotlinx.coroutines.Dispatchers.Default
import kotlinx.coroutines.joinAll
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import mu.KotlinLogging
import java.lang.Thread.sleep
private val logger = KotlinLogging.logger {}
fun main() {
@neogeogre
neogeogre / basicKtor.kt
Last active November 24, 2021 22:55
ktor http rest client usage sample in kotlin
import io.ktor.client.*
import io.ktor.client.engine.cio.*
import io.ktor.client.features.*
import io.ktor.client.features.auth.*
import io.ktor.client.features.auth.providers.*
import io.ktor.client.features.json.*
import io.ktor.client.features.logging.*
import io.ktor.client.request.*
import io.ktor.http.*
import io.ktor.http.ContentType.Application.Json
@neogeogre
neogeogre / createFeatureCollection.kt
Last active November 24, 2021 17:11
Sample to create read a geotools FeatureCollection with properties in java / kotlin
package demo
import org.geotools.feature.DefaultFeatureCollection
import org.geotools.feature.simple.SimpleFeatureBuilder
import org.geotools.feature.simple.SimpleFeatureTypeBuilder
import org.geotools.referencing.crs.DefaultGeographicCRS.WGS84
import org.locationtech.jts.geom.Coordinate
import org.locationtech.jts.geom.GeometryFactory
import org.locationtech.jts.geom.Point
@neogeogre
neogeogre / docker.sh
Last active July 20, 2023 11:40
Docker samples, install without sudo and remove root to generated files
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo docker run hello-world
docker pull osgeo/gdal:ubuntu-full-3.1.2
Install globally a lib with cmake to make it avaiable for C++ project
Easiest way to add a lib to c++ project.
Download source code under `Downloads`:
```sh
cd /home/geoffrey/Downloads/mylib
cmake -DBUILD_SHARED_LIBS=ON .
make install
```
@neogeogre
neogeogre / matrix_interp.py
Created May 26, 2020 08:51
two dimentional interpolation in matrix values
from scipy.interpolate import interp2d
def matrix_interp():
mat = numpy.array([[70.45, 0, 21.78, 0],
[0, 0, 0, 0],
[105.12, 0, 1000.45, 0],
[0, 0, 0, 0]])
ix = numpy.where(mat != 0)