Skip to content

Instantly share code, notes, and snippets.

@EHJ-52n
EHJ-52n / ogc-code-sprint_2021-07_agenda.adoc
Created July 16, 2021 07:35
OGC Code Sprint 2021.07: Tentative Schedule

Tentative Schedule / Agenda

✴ means that the session will be in the main Gotomeeting virtual room.

Time What Lead

EDT

CEST

21st July 2021 - See World Clock

07:00-07:10

13:00-13:10

Welcome & objectives ✴

Gobe Hobona (OGC), Joana Simoes (OGC)

@EHJ-52n
EHJ-52n / dim-example.py
Last active April 30, 2021 10:30
open data cube: understanding coordinate handling
import datacube
import os
import rioxarray
import subprocess
import sys
import time
import xarray
# database configuration
# please adjust to your local set-up
@EHJ-52n
EHJ-52n / docker_health
Created February 13, 2020 09:03
munin docker status pluins
#!/bin/bash
#
# Author : c.autermann@52north.org
# License: To Be Defined
#
states=(starting healthy unhealthy)
function output_config() {
echo "graph_title Docker container health"
echo "graph_category virtualization"
@EHJ-52n
EHJ-52n / testing_impl-gda.R
Created May 16, 2019 10:23
sos4R::Tests for GDA implementation
#
# Load dev version of sos4R ----
#
devtools::load_all()
webmockr::disable()
#
# VARIABLES----
#
.verbose <- TRUE
.saveOriginal <- FALSE
#!/bin/bash
set -e
JAVA_HOME=${1-text}
[ $# -eq 0 ] && { echo "Usage: sudo $0 \$(/usr/libexec/java_home -v '1.8*')" ; exit 1; }
KEYSTORE=$JAVA_HOME/jre/lib/security/cacerts
wget https://letsencrypt.org/certs/letsencryptauthorityx1.der
wget https://letsencrypt.org/certs/letsencryptauthorityx2.der
@EHJ-52n
EHJ-52n / ssh_server_keys.sh
Last active September 24, 2020 11:27
Script to generate a list of all ssh keys with all ciphers available. Source: https://superuser.com/a/1030779
#!/bin/bash
# Script print all key ids in md5 and sha256 that are available
# Execute the following to print the keys for your server:
# wget https://gist.github.com/EHJ-52n/15778f3eaab87a4e9cc32f4c99299c5d/raw/ -O ssh_server_keys.sh --quiet && chmod +x ssh_server_keys.sh && ./ssh_server_keys.sh && rm ssh_server_keys.sh
# standard sshd config path
SSHD_CONFIG=/etc/ssh/sshd_config
# helper functions
function tablize {
awk '{printf("| %-7s | %-7s | %-50s |\n", $1, $2, $3)}'
@EHJ-52n
EHJ-52n / install_lets-encrypt_jenkins-jdks.sh
Last active January 22, 2023 18:29
Install Let's Encrypt Cross Signed Root Certificates in all Jenkins JDKs
#!/bin/bash
#
# Description
# This scripts downloads the latest certificates available and installs them
# to all keystores available
#
# Get all installed JDKs
#
PWD=$(pwd)
JDKS_HOME=/var/lib/jenkins/tools/hudson.model.JDK/
@EHJ-52n
EHJ-52n / fix-52n-sos.sh
Last active August 29, 2016 13:43
Fix 52N SOS DescribeSensor
wget https://52north.org/files/sensorweb/osgeo-live/52n-sos-osgeo-live-10.0_fix-sensor.sql && sudo su postgres -c "psql -d 52nSOS -f 52n-sos-osgeo-live-10.0_fix-sensor.sql" && rm -fv 52n-sos-osgeo-live-10.0_fix-sensor.sql
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up
# (if you're backing up a user's repos instead, this should be your GitHub username)
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API)
GHBU_PASSWD=${GHBU_PASSWD-"<CHANGE-ME>"} # the password for that account
GHBU_GITHOST=${GHBU_GITHOST-"github.com"} # the GitHub hostname (see comments)
GHBU_PRUNE_OLD=${GHBU_PRUNE_OLD-true} # when `true`, old backups will be deleted