Skip to content

Instantly share code, notes, and snippets.

@valgur
valgur / update-alternatives-clang.sh
Last active July 6, 2019 12:25 — forked from gburca/update-alternatives-clang.sh
Automatically find and 'update-alternatives --install' installed clang versions
#!/bin/bash
BIN=/usr/bin
MAN=/usr/share/man/man1
function register_clang_version {
BINV=$1
PRIORITY=`echo $BINV | awk '{print int($1 * 10)}'`
update-alternatives --install $BIN/clang clang $BIN/clang-$BINV $PRIORITY \
--slave $BIN/clang++ clang++ $BIN/clang++-$BINV
@valgur
valgur / get_exif_gps_info.py
Last active June 3, 2019 00:44 — forked from erans/get_lat_lon_exif_pil.py
Get GPS coordinates, direction, speed and timestamp from EXIF using PIL
import datetime as dt
from collections import OrderedDict
from glob import glob
from sys import argv
from PIL import Image
from PIL.ExifTags import TAGS, GPSTAGS
def get_exif_data(image):