Skip to content

Instantly share code, notes, and snippets.

View SatoruFF's full-sized avatar

Mikheev Aleksandr SatoruFF

View GitHub Profile
@SatoruFF
SatoruFF / gist:0dc491ea300f4c5219789fc3be2eb310
Last active September 29, 2025 08:21
move photos from google takeout to one folder
import os
import zipfile
import shutil
import hashlib
INPUT_DIR = "GOOGLE_DATA"
OUTPUT_DIR = "all_photos"
MEDIA_EXTENSIONS = {".jpg", ".jpeg", ".png", ".gif", ".heic", ".mp4", ".mov", ".avi", ".mkv"}
@SatoruFF
SatoruFF / immutable-to-plain.js
Created July 29, 2025 13:56
Migrate project from immutable to plain js ( codemod/jscodeshift script )
module.exports = function transformer(fileInfo, api) {
const j = api.jscodeshift.withParser('tsx');
const root = j(fileInfo.source);
// Remove import Immutable from 'immutable'
root.find(j.ImportDeclaration, { source: { value: 'immutable' } }).remove();
// Remove desctrucure imports { Map, List, ... } from 'immutable'
root
.find(j.ImportDeclaration)