Skip to content

Instantly share code, notes, and snippets.

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.
@percursoaleatorio
percursoaleatorio / Bitnami-Stack-for-Limesurvey.rst
Last active December 24, 2015 23:29
LimeSurvey - my notes on Bitnami-Stack for LimeSurvey.

Bitnami Limesurvey

  1. Update Virtual Box if necessary. Install the most recent Virtual Box Extension Pack.
  2. Download the VM from http://bitnami.com/stack/limesurvey. Unzip...
  3. Create a new VirtualBox VM
@percursoaleatorio
percursoaleatorio / wubi.rst
Last active December 15, 2015 20:41
WUBI
Author

nery

Copyright

CC BY-NC-SA 2.0 <http://creativecommons.org/licenses/by-nc-sa/2.0/>

Date

$Date: 2013-04 $

Revision

$Revision: 2014.01.08 $

Description

Ubuntu 12.04LTS Precise Pangolin | Ubuntu 13.10 Saucy Salamander - Notas sobre a Instalação em Windows (WUBI), instalação de programas de escritório eletrónico, sistemas de informação geográfica e outras aplicações úteis ao dia-a-dia...

Introdução

Versões de Ubuntu

#!/usr/bin/env python
#******************************************************************************
# $Id: gdal2tiles.py 19288 2010-04-02 18:36:17Z rouault $
#
# Project: Google Summer of Code 2007, 2008 (http://code.google.com/soc/)
# Support: BRGM (http://www.brgm.fr)
# Purpose: Convert a raster into TMS (Tile Map Service) tiles in a directory.
# - generate Google Earth metadata (KML SuperOverlay)
# - generate simple HTML viewer based on Google Maps and OpenLayers
# - support of global tiles (Spherical Mercator) for compatibility
#
# script to register Python 2.0 or later for use with win32all
# and other extensions that require Python registry settings
# written by Joakim Loew for Secret Labs AB / PythonWare
#
# source:
# http://www.pythonware.com/products/works/articles/regpy20.htm
#
# modified by Valentine Gogichashvili as described in http://www.mail-archive.com/distutils-sig@python.org/msg10512.html