Skip to content

Instantly share code, notes, and snippets.

@vi
vi / mvimg_mpv
Created August 11, 2019 22:37
Shell script to play Google Motion Photos with mpv from command line
#!/bin/bash
if [[ -z "$1" || "$1" == --help || "$1" == "-?" ]]; then
echo "Usage: mvimg_play MVIMG_20190806_183324.jpg [other files]"
echo "Plays Google's Motion Photo using mpv. Depends on exiftool, mktemp, bash and mpv."
exit 0
fi
FOUND=0
ARGS=()
@Sklavit
Sklavit / colorized_voronoi_with_clipping.py
Created March 26, 2017 00:36 — forked from pv/colorized_voronoi.py
Colorized Voronoi diagram with Scipy, in 2D, including infinite regions which are clipped to given box.
# coding=utf-8
import numpy as np
import matplotlib.pyplot as plt
from scipy.spatial import Voronoi
from shapely.geometry import Polygon
def voronoi_finite_polygons_2d(vor, radius=None):
"""
Reconstruct infinite voronoi regions in a 2D diagram to finite
regions.
@rubo77
rubo77 / rotate-screen.sh
Last active October 9, 2023 11:30
This script rotates the screen and touchscreen input, disables or enbles the touchpad, and dis- or enables the virtual keyboard on a Lenovo Yoga 13 or Yoga 2 Pro (source: http://askubuntu.com/q/405628/34298)
#!/bin/bash
# This script rotates the screen and touchscreen input 90 degrees each time it is called,
# also disables the touchpad, and enables the virtual keyboard accordingly
# by Ruben Barkow: https://gist.github.com/rubo77/daa262e0229f6e398766
#### configuration
# find your Touchscreen and Touchpad device with `xinput`
TouchscreenDevice='ELAN Touchscreen'
TouchpadDevice='SynPS/2 Synaptics TouchPad'
@mbostock
mbostock / .block
Last active May 25, 2017 05:19 — forked from mbostock/.block
Geodesic Grid
license: gpl-3.0