Skip to content

Instantly share code, notes, and snippets.

@aborruso
aborruso / roads.md
Created October 7, 2024 10:36 — forked from marklit/roads.md
MS Roads Detection in Parquet
$ wget https://usaminedroads.blob.core.windows.net/road-detections/MiddleEast-Full.zip
$ unzip MiddleEast-Full.zip
$ ~/duckdb roads.duckdb
CREATE OR REPLACE TABLE roads AS
    SELECT column0 as iso2,
 ST_GEOMFROMGeoJSON(column1::JSON->'$.geometry') geom
@aborruso
aborruso / .block
Last active January 3, 2022 09:03 — forked from gbvitrano/.block
COVID-19 | 2021 - Comuni siciliani attualmente in zona rossa By @opendatasicilia
license: mit
@aborruso
aborruso / .block
Last active March 18, 2021 14:29 — forked from gbvitrano/.block
COVID-19 | Incidenza cumulativa settimanale dei contagi - By ondata.it
license: cc-by-4.0
@aborruso
aborruso / fix-wsl2-dns-resolution
Created October 24, 2019 09:16 — forked from coltenkrauter/fix-wsl2-dns-resolution
Fix DNS resolution in WSL2
1. Create a file: /etc/wsl.conf.
2. Put the following lines in the file in order to ensure the your DNS changes do not get blown away
[network]
generateResolvConf = false
3. In a cmd window, run wsl --shutdown
4. Restart WSL2
5. Create a file: /etc/resolv.conf. If it exists, replace existing one with this new file.
6. Put the following line in the file
@aborruso
aborruso / geopandas-polygon-cascaded-overlay.ipynb
Last active October 12, 2019 09:47 — forked from jorisvandenbossche/geopandas-polygon-cascaded-overlay.ipynb
Creare gli overlay di poligoni che si sovrappongono
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
@aborruso
aborruso / create-new-file.ahk
Created March 30, 2019 10:14 — forked from diastremskii/create-new-file.ahk
AutoHotKey: Create a new file with Alt+N keyboard shortcut in Windows Explorer
; This is part of my AutoHotKey [1] script. When you are in Windows Explorer it
; allows you to press Alt+N and type a filename, and that file is created
; in the current directory and opened in the appropriate editor (usually
; [gVim](http://www.vim.org/) in my case, but it will use whatever program is
; associated with the file in Windows Explorer).
; This is much easier than the alternative that I have been using until now:
; Right click > New > Text file, delete default filename and extension (which
; isn't highlighted in Windows 7), type the filename, press enter twice.
; (Particularly for creating dot files like ".htaccess".)
@aborruso
aborruso / gdal_ecw.sh
Created March 28, 2019 12:34 — forked from 1papaya/gdal_ecw.sh
Install GDAL 2.3 with ECW support on Ubuntu 18.04
#!/bin/bash
##
## Tested on: Ubuntu 18.04 & ECW 5.4 & GDAL 2.3.1
##
## Download the ERDAS ECW JP2 SDK v5.4 Linux
## https://download.hexagongeospatial.com/downloads/ecw/erdas-ecw-jp2-sdk-v5-4-linux
## Download GDAL v2.3 Source (ex. 2.3.1)
-- Thread: http://lists.gfoss.it/pipermail/gfoss/2017-October/042175.html
-- per eseguire lo SQL script devi semplicemente:
-- aprire una shell dei comandi (finestra nera)
-- posizionarti sulla cartella dove hai messo il tuo DB "campania_test.sqlite"
-- ed infine eseguire questo comando:
-- spatialite napoli.sqlite <moraca.sql
-- vedrai che alla fine ti troverai con un nuovo DB di
-- nome "napoli.sqlite" che contiene esclusivamente
@aborruso
aborruso / gist:2c8297779dae83d90bfe68ac0fa1fe1c
Created June 20, 2017 15:45 — forked from leifcr/gist:6448361
Install PhantomJS 1.9.1 x64 on ubuntu 12.04
sudo apt-get install libfontconfig1
cd /usr/local/share/
wget https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2
tar xjf phantomjs-1.9.1-linux-x86_64.tar.bz2
rm -f phantomjs-1.9.1-linux-x86_64.tar.bz2
ln -s phantomjs-1.9.1-linux-x86_64 phantomjs
sudo ln -s /usr/local/share/phantomjs/bin/phantomjs /usr/bin/phantomjs
phantomjs --version