Skip to content

Instantly share code, notes, and snippets.

View akora's full-sized avatar

Andras Kora akora

View GitHub Profile
@akora
akora / remove-diacritics-google-sheet
Created February 28, 2015 11:18
Removes all diacritics from strings (e.g. names) in a Google spreadsheet
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(C2,"ö","o"),"ü","u"),"ó","o"),"ő","o"),"ú","u"),"é","e"),"á","a"),"ű","u"),"í","i"),"Ö","O"),"Ü","U"),"Ó","O"),"Ő","O"),"Ú","U"),"É","E"),"Á","A"),"Ű","U"),"Í","I")
@akora
akora / capture-windows-without-shadows-mac-os.sh
Created March 17, 2015 22:14
Capture windows on Mac OS X as JPEGs without shadows
screencapture -ow ~/Documents/<subdirectory>/<name-of-the-file>.jpg
# -o in window capture mode, do not capture the shadow of the window
# -w only allow window selection mode
@akora
akora / set-default-ical-time-zones-mac-os.sh
Created April 18, 2015 16:54
Set default time zones in iCal in Yosemite
# read the current settings
defaults read com.apple.iCal 'RecentlyUsedTimeZones'
#set new defaults
defaults write com.apple.iCal 'RecentlyUsedTimeZones' '("America/New_York", "Europe/Budapest", "Europe/London")'
@akora
akora / extract-shutterCount.sh
Created September 29, 2018 15:00
This script extracts Shutter Count information from Nikon NEF (RAW) files and saves the output into a CSV file (uses exiftool)
#!/bin/bash
# This script extracts Shutter Count information from Nikon NEF (RAW) files
# and saves the output into a CSV file (for further processing)
# Dependency: exiftool must be installed
# by Andras Kora, ak@akora.info, 2018-09-29 Sat 16:18:37 CEST @638
TIMESTAMP=$(date +%s)
FILENAME=$1
@akora
akora / rename-basedOn-ShutterCount-DateTimeOriginal.sh
Last active September 30, 2018 17:30
This script renames ( << suggests new filenames) Nikon NEF (RAW) files based on shutter count and date & time information the photos were taken
#!/bin/bash
# This script renames Nikon NEF (RAW) files based on shutter count (EXIF "Shutter Count")
# and date & time information the photos were taken (EXIF "DateTimeOriginal")
# Dependency: exiftool must be installed
# by Andras Kora, ak@akora.info, 2018-09-30 Sun 18:21:19 CEST @723
for file in *.nef ; do
echo -n "Processing $file >> "
exif_shutter_count_info=$(exiftool -ShutterCount -s -s -s "$file")
@akora
akora / .zshrc
Last active January 17, 2022 10:45
zsh-prompt-macos-catalina
# compaudit | xargs chmod g-w
autoload -Uz compinit && compinit
autoload -U promptinit && promptinit
autoload -U colors && colors # Enable colors in prompt
autoload -Uz vcs_info
precmd() { vcs_info }
setopt prompt_subst
# The below is based on the fantastic work of Josh Dick from
# https://joshdick.net/2017/06/08/my_git_prompt_for_zsh_revisited.html