Skip to content

Instantly share code, notes, and snippets.

View drola's full-sized avatar

Matjaž Drolc drola

View GitHub Profile
@drola
drola / Matrix libs benchmark.md
Created June 11, 2020 07:05
Matrix libs benchmark

Params:

  • library
  • how matrix is created
  • matrix size
  • JS engine
  • hardware

Pipeline:

  • set params
@drola
drola / awesome_climate.md
Created January 17, 2021 20:05
Awesome Climate: links collected from Sledilnik community on #climate-change

Awesome Climate

Links collected from Sledilnik community on #climate-change

Personal and household decisions

>Calculator: Ogljične emisije električnega osebnega avtomobila

@drola
drola / .tmux.conf
Created April 5, 2021 08:18
.tmux.conf
unbind C-b
set -g prefix C-a
set -g mouse on
set -g status-keys vi
set-window-option -g mode-keys vi
set -g history-limit 100000
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"
# set -g set-clipboard on
@drola
drola / generate_password.py
Last active June 18, 2021 07:06
generate_password.py
#!/usr/bin/env python3
import random
characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%&*1234567890"
print(''.join([random.choice(characters) for i in range(0, 32)]))
/**
* Create a new array without the n-th element from the original array
*
* @param arr
* @param n
* @returns New array without the n-th element from the original array
*/
export function arrayWithoutNth(arr: Array<any>, n: number) {
return arr.filter((_, i) => i !== n);
}
@drola
drola / backup_photos.sh
Created July 29, 2021 08:42
backup_photos.sh
#!/bin/bash
# See https://rclone.org/filtering/
FILTER_LIST="
# Exclude timelapse temporary files
- /LRTimelapse/**
- /LRTimelapse_frames/**
# Include everything else
@drola
drola / transcode_for_twitter.sh
Created August 4, 2021 11:48
transcode_for_twitter
ffmpeg -i timelapse1.mov -c:v libx264 -preset slow -crf 18 -vf "scale=1280:-1,format=yuv420p" /home/drola/Videos/timelapse1_720.mp4