Skip to content

Instantly share code, notes, and snippets.

View aleks-sidorenko's full-sized avatar
🏠
Working from home

Alexander Sidorenko aleks-sidorenko

🏠
Working from home
View GitHub Profile
def mult(l: List[Int]): List[Int] = {
val (nonZero, zero) = l.partition( _ != 0)
val mult = nonZero.reduce(_ * _)
l.collect {
case x if x != 0 && zero.isEmpty => mult / x
case x if x == 0 && zero.length == 1 => mult
case _ => 0
}
package com.io7m.aeron_guide.scratchpad;
import io.aeron.Aeron;
import io.aeron.ChannelUriStringBuilder;
import io.aeron.ConcurrentPublication;
import io.aeron.Publication;
import io.aeron.Subscription;
import io.aeron.driver.MediaDriver;
import io.aeron.logbuffer.Header;
import org.agrona.BufferUtil;
@aleks-sidorenko
aleks-sidorenko / tmux-cheatsheet.md
Last active June 22, 2016 16:15 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@aleks-sidorenko
aleks-sidorenko / NERDTree.md
Last active June 22, 2016 16:17 — forked from m3nd3s/NERDTree.mkd
Vim shortcuts & cheatsheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

Last updated: 2015-08-11

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs