Skip to content

Instantly share code, notes, and snippets.

Avatar
🇺🇦

Slava medvedev

🇺🇦
View GitHub Profile
@medvedev
medvedev / script.gs
Created January 18, 2023 22:09
Googla App Script: Automatically invite to Calendar event based on Google Form data
View script.gs
// Code below looks a bit complicated for suc a simple action
// It's purpose is to add a guest to an event AND send email notification to a new guest.
// If email notification is optional, you can use simple apporach with CalendarApp
// Trigger type for the script should be "On Form submit"
// If it's your primary google calendar, use your email as ID
const calendarId = 'john.smith@gmail.com'
// How to get event ID:
// 1. Open event editor in Calendar Web UI
@medvedev
medvedev / heic-to-jpg.sh
Created October 13, 2022 09:51
Shell script for batch convertation of HEIC images to JPEGs
View heic-to-jpg.sh
#!/bin/bash
# Batch convert provided heic photos to jpeg
hash heif-convert 2>/dev/null || { printf >&2 "heif-convert is required.\nTry installing it with: \nsudo apt install libheif-examples\n"; exit 1; }
if [ $# -eq 0 ] ; then
echo >&2 "usage: heic-tojpg.sh <filename1.heic> <filename2.heic> ..."
exit 1;
fi
@medvedev
medvedev / build.gradle
Last active February 22, 2023 12:14
Gradle task that prints total dependencies size and (dependency+(size in kb)) list sorted by size desc
View build.gradle
...
/* Tested with Gradle 6.3 */
tasks.register("depsize") {
description = 'Prints dependencies for "default" configuration'
doLast() {
listConfigurationDependencies(configurations.default)
}
}