Skip to content

Instantly share code, notes, and snippets.

Alexander Refsum Jensenius alexarje

Block or report user

Report or block alexarje

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@alexarje
alexarje / Rotate multiple JPEG files
Created May 19, 2019
Automagically rotate multiple images based on EXIF descriptors
View Rotate multiple JPEG files
find . *.jpg -exec jhead -autorot {} \;
@alexarje
alexarje / sortimages.sh
Created Nov 25, 2018
Sort images based on direction (portrait/landscape)
View sortimages.sh
# Based on: https://unix.stackexchange.com/questions/294341/shell-script-to-separate-and-move-landscape-and-portrait-images
# make directories
mkdir portraits
mkdir landscapes
# Check that all images have correct rotation
jhead -autorot *.jpg
jhead -autorot *.JPG
@alexarje
alexarje / trimvideofile.sh
Last active Jun 7, 2019
Trim video using ffmpeg
View trimvideofile.sh
ffmpeg -i input.mp4 -ss 01:10:27 -to 02:18:51 -c:v copy -c:a copy output.mp4
@alexarje
alexarje / multieps2pdf.sh
Last active Mar 8, 2018
Convert multiple EPS files to PDF
View multieps2pdf.sh
find . -name "*.eps" -exec epstopdf {} ";"
@alexarje
alexarje / pdf-split.sh
Last active Dec 31, 2018
Small shell script (for Ubuntu) that splits up one multi-page PDF to individual PDF files
View pdf-split.sh
#!/bin/sh
cd $NAUTILUS_SCRIPT_CURRENT_URI
pdftk $@ burst output $@-%d.pdf
@alexarje
alexarje / QoM-MoCap.m
Created Jul 5, 2014
Plot Quantity of Motion (QoM) of all mocap markers using the MoCapToolbox
View QoM-MoCap.m
% Read in C3D file
a=mcread;
% Fill gaps, in case there are holes in trajectories
b=mcfillgaps(a);
% Calculate velocities for all markers
d2v=mctimeder(b);
% Calculate vector length (norm/amplitude) of velocities
@alexarje
alexarje / NIME-proceedings-analysis-script
Created Jul 2, 2014
OSX shell script for carrying out a spotlight search on words in all PDFs from the proceedings of the International Conference on New Interfaces for Musical Expression.
View NIME-proceedings-analysis-script
#!/bin/sh
clear
echo "Outputting some NIME data"
max=2013
for ((i=2001; i<=$max; ++i )) ;
do
echo "NIME $i"
mdfind -count -onlyin $i music
mdfind -count -onlyin $i gesture
mdfind -count -onlyin $i action
You can’t perform that action at this time.