Skip to content

Instantly share code, notes, and snippets.

@percursoaleatorio
percursoaleatorio / Mermaid.RequirementsLifeCycleStateDiagram.mmd
Last active March 27, 2026 12:25
Mermaid diagrams - Requirements life-cycle using a state diagram
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@percursoaleatorio
percursoaleatorio / Mermaid.RequirementsLifeCycleFlowchart.mmd
Last active March 27, 2026 12:24
Mermaid diagrams - Requirements life-cycle using a flowchart
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@percursoaleatorio
percursoaleatorio / Mermaid.DesignBuildCollectDataflow.mmd
Last active March 27, 2026 13:11
Mermaid diagrams - Design, Build and Collect Phases of a Dataflow using a Flowchart Diagram
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@percursoaleatorio
percursoaleatorio / Mermaid.GSBPM.mmd
Last active March 27, 2026 12:20
Mermaid Diagram - Generic Statistical Business Process Model - using a Flowchart diagram
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Last updated: 2015-08-11

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

(: Suppose that validate-record is a function that checks a single record.
It receives the sequence of records to be validated and the position of the specific record to validate.
It returns a sequence.
If the recork is OK, then the returned sequence is empty.
If the recork is not OK, then the returned sequence contains a single element with the validation result.
Something like... :)
declare function validate-record($records as element()+, $position as xs:integer) as element()?
{ (: Whatever you need to do the check the record in that position.
Return an empty sequence if the record is ok.
#####################################
# Reportnet: Data flows #
# http://cr.eionet.europa.eu/sparql #
#####################################
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rod: <http://rod.eionet.europa.eu/schema.rdf#>
PREFIX obl: <http://rod.eionet.europa.eu/obligations/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
@percursoaleatorio
percursoaleatorio / docx2rst.bat
Created July 28, 2014 12:56
Convert from docx to restructured text
@echo off
rem nery[_at_]tecnico.ulisboa.pt v2014.01.16 [CC BY-NC-SA]
rem OBJETIVO: Converter de DOCX para RST utilizando o CALIBRE e o PANDOC.
rem Criar ficheiro de texto com o mesmo nome e extensão *.rst
rem PRE-REQUISITOS:
rem C:\Users\nery\AppData\Local\Pandoc\
rem C:\Programs\Calibre\Calibre Portable\Calibre
rem REFERENCES
@echo off
rem nery[_at_]tecnico.ulisboa.pt v2014.01.16 [CC BY-NC-SA]
rem OBJETIVO: Converter de RST para DOCX utilizando o PANDOC.
rem Criar ficheiro de texto com o mesmo nome e extensão DOCX
rem PRE-REQUISITOS:
rem C:\Users\nery\AppData\Local\Pandoc\
rem --reference-docx=FILE
rem Use the specified file as a style reference in producing a docx file.
rem The following styles are used by pandoc: [paragraph] Normal, Compact, Title, Authors, Date, Heading 1, Heading 2, Heading 3, rem Heading 4, Heading 5, Block Quote, Definition Term, Definition, Body Text, Table Caption, Image Caption; [character] Default rem Paragraph Font, Body Text Char, Verbatim Char, Footnote Ref, Link.