Skip to content

Instantly share code, notes, and snippets.


Andrea Borruso aborruso

View GitHub Profile
aborruso / .block
Last active Mar 18, 2021 — forked from gbvitrano/.block
COVID-19 | Incidenza cumulativa settimanale dei contagi - By
View .block
license: cc-by-4.0
View fix-wsl2-dns-resolution
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
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
View geopandas-polygon-cascaded-overlay.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View xpath-cheatsheet.js
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// 0. XPath Examples.
// More:
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
aborruso / create-new-file.ahk
Created Mar 30, 2019 — forked from TheBeastOfCaerbannog/create-new-file.ahk
AutoHotKey: Create a new file with Alt+N keyboard shortcut in Windows Explorer
View create-new-file.ahk
; 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]( 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 /
Created Mar 28, 2019 — forked from geodavey/
Install GDAL 2.3 with ECW support on Ubuntu 18.04
## Tested on: Ubuntu 18.04 & ECW 5.4 & GDAL 2.3.1
## Download the ERDAS ECW JP2 SDK v5.4 Linux
## Download GDAL v2.3 Source (ex. 2.3.1)
View che_bello.sql
-- Thread:
-- 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 / gist:2c8297779dae83d90bfe68ac0fa1fe1c
Created Jun 20, 2017 — forked from leifcr/gist:6448361
Install PhantomJS 1.9.1 x64 on ubuntu 12.04
View gist:2c8297779dae83d90bfe68ac0fa1fe1c
sudo apt-get install libfontconfig1
cd /usr/local/share/
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
aborruso / index.html
Last active May 16, 2017 — forked from darwin/index.html
OpenDataFest, invito
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="">
<script src="" charset="utf-8"></script>
<style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style>
a, a:visited {
color:red !important;
text-decoration:none !important;
# List unique values in a DataFrame column
# Convert Series datatype to numeric, getting rid of any non-numeric values
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True)
# Grab DataFrame rows where column has certain values
valuelist = ['value1', 'value2', 'value3']
df = df[df.column.isin(valuelist)]