Skip to content

Instantly share code, notes, and snippets.

View georghildebrand's full-sized avatar

ghildebrand georghildebrand

  • EU
View GitHub Profile
@georghildebrand
georghildebrand / analyse_robot_resource_usage_graph.py
Last active December 21, 2022 10:30
Quick resource collision detection in recursive and non recursive way
graph = {
"start": {
"resources": ["robot1", "robot2"],
"children": ["process1", "process2"]
},
"process1": {
"resources": ["robot1"],
"children": ["subprocess1", "subprocess2"]
},
"process2": {
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix building: <http://example.com/ontologies/building#> .
@prefix equipment: <http://example.com/ontologies/equipment#> .
@base <http://www.w3.org/2002/07/owl#> .
[ rdf:type owl:Ontology
@georghildebrand
georghildebrand / smart_factory.ttl
Last active December 16, 2022 10:47
Short information model of a simple smart factory shop floor process in turtle ttl
@prefix sf: <http://example.com/smartfactory#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://www.w3.org/2002/07/owl#> .
[ rdf:type owl:Ontology
] .
@georghildebrand
georghildebrand / borg_backup_batch_restore.sh
Last active October 30, 2022 14:59
A simple script to do a bulk restore of certain paths from all selected backups in a borg archive
#!/bin/sh
set -euo pipefail
# Very simple script to extract all files from a list of archives
# The inlcude files is used to recursively only extract from paths specified in this file
# The include.txt has the following format
# R /path/to/include
@georghildebrand
georghildebrand / BrickSuperclass.ipynb
Last active February 5, 2021 15:44
Quick check of this issue when importing brickschema into azure DTLD for azure digital twins https://github.com/Azure-Samples/RdfToDtdlConverter/issues/2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@georghildebrand
georghildebrand / gist:8b32083f2e51dbbeb23b80a2fd003009
Created July 20, 2020 07:39
Azure Function App Using Build.SourceDirectory as working Dir to avoid losing python path
trigger:
- master
variables:
# Azure Resource Manager connection created during pipeline creation
azureSubscription: 'conn'
# Function app name
functionAppName: 'functestnewtry'
@georghildebrand
georghildebrand / gist:6efcd5232d169aff136ea306bc2132ac
Last active November 14, 2019 19:16
copy files younger than x days to new location and delete files older than x there
#!/bin/bash
source='/srv/dev-disk-by-label-'
target='/srv/dev-disk-by-label-'
days=30
# delete
find ${target} -mtime +$days -type f -exec rm "{}" \;
# copy and link
find ${source} -mtime -$days -type f -exec cp -la "{}" ${target} \;
@georghildebrand
georghildebrand / gist:01e93cc36b1dc36d1014b9e0bd490df2
Created November 14, 2019 16:09
copy files younger than x days to new location and delete files older than x there
#!/bin/bash
source='/srv/dev-disk-by-label-'
target='/srv/dev-disk-by-label-'
days=30
# delete
find ${target} -mtime +$days -type f -exec rm "{}" \;
find ${source} -mtime -$days -type f -exec cp -a "{}" ${target} \;
@georghildebrand
georghildebrand / - Syncthing + start on boot.md
Last active October 9, 2019 04:27 — forked from hdml/- Syncthing + start on boot.md
How to install Syncthing on Raspberry Pi + start on boot [semi-automatic]
@georghildebrand
georghildebrand / InstallGrafanaPrometheus.md
Last active October 8, 2019 17:47
Install Grafana on rockpi 4 with prometheus