Skip to content

Instantly share code, notes, and snippets.

@surajRathi
surajRathi / fix_timestamps.sh
Last active October 8, 2024 06:31
Fix timestamps for photos saved via whatsapp, to have them show up correctly in Google Photos. Enable backup of both of the Cleansapp folders in Google Photos.
#! /usr/bin/sh
# For Whatsapp saved photos.
adb pull -a -z zstd /storage/emulated/0/Pictures/Whatsapp ./
cd Whatsapp
exiftool '-FileCreateDate<${Filename; s/IMG-([0-9]{4})([0-9]{2})([0-9]{2})-.*\.jpg/$1:$2:$3 12:00:00+5:30/}' '-Exif:DateTimeOriginal<${Filename; s/IMG-([0-9]{4})([0-9]{2})([0-9]{2})-.*\.jpg/$1:$2:$3 12:00:00+5:30/}' *.jpg
cd ..
mv Whatsapp Cleansapp
adb push -z zstd ./Cleansapp /storage/emulated/0/Pictures/
rm -r Cleansapp
@progandy
progandy / README.md
Last active September 26, 2023 08:27
Sway output mirror and screencast

Sway output mirror and screencast

Mirror

wf-recorder

With wf-recorder it is possible to record one output. When ffmpeg is compiled with sdl support, then it is possible to use "sdl" as the muxer and replay the recorded video instead of writing it to a file.

anonymous
anonymous / pca_animation.m
Created January 26, 2017 21:47
Matlab code to produce PCA animations
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Matlab code to produce PCA animations shown here:
% http://stats.stackexchange.com/questions/2691
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Static image
clear all
rng(42)