Skip to content

Instantly share code, notes, and snippets.

View t-book's full-sized avatar
💭
reading

Toni t-book

💭
reading
View GitHub Profile
Occipital bone
https://dai-gn-test.csgis.de/daard/boneimage?copy_id=1&show_help=1&bones={"affected":["379"]}
Frontal bone
https://dai-gn-test.csgis.de/daard/boneimage?copy_id=1&show_help=1&bones={"affected":["152"]}
Temporal Bone right
https://dai-gn-test.csgis.de/daard/boneimage?copy_id=1&show_help=1&bones={"affected":["200","171"]}
Temporal Bone left
#!/bin/bash
# Set to 'true' for a dry run, 'false' to actually copy files
DRY_RUN=true
geoserver_data_dir='/geoserver_data/data/workspaces/geonode/'
uploaded_data_dir='/mnt/volumes/statics/uploaded'
importer_data='/geoserver_data/data/geonode/importer_data'
date_filter="2024-01-19" # Find only coverage files after
{
"2": {
"id": 2,
"name": "splanchnocranium",
"label": "Splanchnocranium",
"svgid": "bone154,bone155,bone156,bone163,bone157,bone165,bone169,bone168,bone187,bone178,bone191,bone177,bone196,bone198,bone201,bone202",
"amount": ">75%",
"section": "cranial_district"
},
"3": {
{
"1": {
"id": 1,
"name": "neurocranium",
"label": "Neurocranium",
"svgid": "bone166,bone152,bone170,bone167,bone170,bone171,bone172,bone164,bone166,bone159,bone160,bone200,bone203",
"amount": ">75%",
"section": "cranial_district"
},
"2": {
CREATE OR REPLACE FUNCTION create_database_with_users(
db_name VARCHAR,
read_user VARCHAR,
read_password VARCHAR,
write_user VARCHAR,
write_password VARCHAR
)
RETURNS VOID AS $$
BEGIN
-- Create database
#!/bin/bash
# Überprüfen, ob die richtige Anzahl an Argumenten übergeben wurde
if [ "$#" -ne 2 ]; then
echo "Verwendung: $0 <Eingabeordner> <Ausgabeordner>"
exit 1
fi
eingabeordner=$1
ausgabeordner=$2
@t-book
t-book / b.py
Created October 16, 2023 20:00
# Get the current project
project = QgsProject.instance()
# Get a list of all layers in the project
layers = project.mapLayers().values()
# Iterate over the layers
for layer in layers:
# Check if the layer is valid
if layer.isValid():
@t-book
t-book / export_data.js
Created October 5, 2023 06:01
export_data.js
function convertTableToCSV(table) {
const rows = table.querySelectorAll('tr');
let csv = [];
for (const row of rows) {
const cols = row.querySelectorAll('td, th');
let rowArray = [];
for (const col of cols) {
rowArray.push(col.innerText.trim());
}
@t-book
t-book / docker-iptable.rules
Created October 4, 2023 06:07
docker-iptable.rules
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy DROP)
target prot opt source destination
DOCKER-USER all -- anywhere anywhere
DOCKER-ISOLATION-STAGE-1 all -- anywhere anywhere
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
DOCKER all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
#!/usr/bin/env python3
import sys
import os
import datetime
"""
Script to update an environment file based on a template
Inspired by: https://github.com/Rillke/Docker-env-file-update/blob/master/update-env.sh
"""