A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
| #!/bin/bash | |
| set -x | |
| curl "https://www.esteri.it/mae/it/ministero/laretediplomatica/rete-diplomatica-mappa.html?tipo=0" | | |
| pup 'div[id="map"] + script text{}' | sed -r 's/..$//g;s/initMap\(//g' | jq . | in2csv -I -f json | | |
| tee 01_ambasciate.csv | csvgrep -i -c "lat" -r "^$" | csvjson -I --lat lat --lon lng | | |
| jq . >02_ambasciate.geojson | |
| curl "https://www.esteri.it/mae/it/ministero/laretediplomatica/rete-diplomatica-mappa.html?tipo=1" | |
| (function ($){ | |
| $.ElucidateEndpoint = function (options) { | |
| jQuery.extend(this, { | |
| token: null, | |
| container: options.container, | |
| url: options.url, | |
| dfd: null, | |
| // OA list for Mirador use | |
| annotationsList: [], |
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
This repository has a dataset of 184.879 crimes committed in Buenos Aires: https://github.com/ramadis/delitos-caba
Download the raw data like this:
wget 'https://github.com/ramadis/delitos-caba/releases/download/3.0/delitos.json'
Now use Pandas to load that into a dataframe:
| [Service] | |
| # read /var/lib/dehydrated/ | |
| CapabilityBoundingSet=CAP_DAC_OVERRIDE | |
| # bind port 80 + 443 | |
| CapabilityBoundingSet=CAP_NET_BIND_SERVICE | |
| # drop privileges to www-data | |
| CapabilityBoundingSet=CAP_SETUID CAP_SETGID | |
| # call ulimit | |
| CapabilityBoundingSet=CAP_SYS_RESOURCE | |
| # partially mitigate CAP_DAC_OVERRIDE |
| [Service] | |
| # change user for worker processes | |
| CapabilityBoundingSet=CAP_SETUID CAP_SETGID | |
| # bind to ports 143 and 993 | |
| CapabilityBoundingSet=CAP_NET_BIND_SERVICE | |
| # fchown() /var/run/dovecot/login | |
| CapabilityBoundingSet=CAP_CHOWN | |
| # bind to /var/spool/postfix/private/dovecot{-auth} | |
| CapabilityBoundingSet=CAP_DAC_OVERRIDE | |
| # chroot to /var/run/dovecot/empty |
jq examples translated from https://github.com/jsonlines/guidejq can be downloaded from https://stedolan.github.io/jq/download/.
curl https://raw.githubusercontent.com/jsonlines/guide/master/datagov100.json > data.json$ < data.json jq '.name' | head -n 6| Using Fuzzy Hashing to Create New Relationships Between Digital Archives | |
| Fuzzy hases enable us to spot digital content that shares a high percentage of similar byte sequences. | |
| There may be similarities between two word documents for example, but the items may not be the same, i.e. | |
| a single byte-change will render comparision using cryptographic-hash useless. | |
| A fuzzy hash offers the ability to spot similar items, n.b. not identical, thus enabling us to infer | |
| relationshops between material - a capability we have very few options for at present. | |
| Committing a fuzzy hash of an object to a digital repository can enable comparison at any point in time |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "strings" | |
| "github.com/PuerkitoBio/goquery" | |
| "github.com/zmb3/spotify" | |
| ) |
| #!/usr/bin/env bash | |
| declare -A maps | |
| maps=( | |
| ["osm-emr"]="http://geodati.fmach.it/gfoss_geodata/osm/output_img/emilia-romagna.tar.gz" | |
| ["osm-vdo"]="http://geodati.fmach.it/gfoss_geodata/osm/output_img/valle-aosta.tar.gz" | |
| ["osm-piemonte"]="http://geodati.fmach.it/gfoss_geodata/osm/output_img/piemonte.tar.gz" | |
| ["osm-trentino"]="http://geodati.fmach.it/gfoss_geodata/osm/output_img/trentino-alto-adige.tar.gz" | |
| ["osm-basilicata"]="http://geodati.fmach.it/gfoss_geodata/osm/output_img/basilicata.tar.gz" |