Skip to content

Instantly share code, notes, and snippets.

@stanim
stanim / keybindings.pl
Created May 17, 2020 22:30 — forked from elgalu/keybindings.pl
Export Ubuntu shortcuts: keybindings.pl -e keys.csv ;; Import (DANGER) Ubuntu shortcuts: keybindings.pl -i keys.csv
#!/usr/bin/perl
use strict;
my $action = '';
my $filename = '-';
for my $arg (@ARGV){
if ($arg eq "-e" or $arg eq "--export"){
$action = 'export';

This issue affects generating and displaying thumbnails from any photo with a non default exif orientation (e.g. rotation/flip). Thanks @wimfeijen for bringing this under attention, as this is quite common with digital cameras nowadays. It consists of two aspects:

  1. <IMG> tag ignores exif orientation in browser.
  2. Thumbnail function of mezzanine ignores the exif orientation.

I'll explain these issues separately in more detail. I added the necessary code to fix these two issues in the thumbnail function

$ go test -bench=.
testing: warning: no tests to run
PASS
BenchmarkIntersectWithZR 50000000 29.5 ns/op
BenchmarkIntersectWithoutZR 50000000 35.5 ns/op
ok stani.be/temp/polyclip/zr 3.318s
35.5/29.5 = 1,20
@stanim
stanim / results
Created July 4, 2015 13:31
Benchmarking ZR
$ go test -bench=.
testing: warning: no tests to run
PASS
BenchmarkIntersect1 50000000 29.5 ns/op
BenchmarkIntersect2 50000000 35.5 ns/op
35.5/29.5 = 1,20