Skip to content

Instantly share code, notes, and snippets.

@vasyl-shumskyi
vasyl-shumskyi / LokiSaveReload.js
Created April 11, 2017 19:19 — forked from techfort/LokiSaveReload.js
LokiJS - save to disk and reload
var loki = require('lokijs'),
db = new loki('test.json'),
db2 = new loki('test.json');
var users = db.addCollection('users');
users.insert({
name: 'joe'
});
users.insert({
name: 'john'
@vasyl-shumskyi
vasyl-shumskyi / .block
Created December 12, 2017 15:49 — forked from mbostock/.block
Zoomable Icicle
license: gpl-3.0
@vasyl-shumskyi
vasyl-shumskyi / padVideosTo16:9
Created March 28, 2018 11:07 — forked from lg3bass/padVideosTo16:9
ffmpeg to pad videos to 16:9
//source: https://lists.ffmpeg.org/pipermail/ffmpeg-user/2011-July/001746.html
//source: http://ffmpeg.org/ffmpeg-filters.html#pad
//works
ffmpeg -i PAN_17-1_Final.m4v -filter:v 'pad=max(iw\,ih*(16/9)):ow/(16/9):(ow-iw)/2:(oh-ih)/2' -aspect 16:9 PAN_17-1_Final_auto1.m4v
//works but calculates manually (pad=<width output>:<height output>:<x upper-left-corner>:<y upper-left-corner>
ffmpeg -i PAN_17-1_Final.m4v -filter:v 'pad=939:528:22:0' PAN_17-1_Final_PADTEST2.m4v