This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* openFrameworks + ofxVideoRecorder setup to record video with h264 | |
* You will need ffmpeg and libx264 in your system. On mac, you can use homebrew. | |
* reason for yuv420p: | |
* 'QuickTime only supports YUV planar color space with 4:2:0 chroma subsampling (use -vf format=yuv420p or -pix_fmt yuv420p) for H.264 video.' | |
* as mentioned here: https://trac.ffmpeg.org/wiki/Encode/H.264 | |
*/ | |
recorder.setVideoCodec("libx264"); | |
string fileName = ofToDataPath("v" + ofGetTimestampString() + ".mp4"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set number | |
set expandtab | |
set tabstop=2 | |
set softtabstop=2 | |
set shiftwidth=2 | |
set nofoldenable | |
let g:mapleader = ',' | |
let g:ale_fixers = { | |
\ 'javascript': ['eslint'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this productivity app blurs parts of aby webpage that are currently not important for you to read | |
// to use it, open devtools with f12, copy the following line to the console and hit enter. | |
Array.prototype.forEach.call(document.getElementsByTagName('*'), e => e.style.filter = `blur(${Math.random() < 0.95 ? 0 : 4}px)`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Output down | |
const arr = [ | |
{ value: 1 }, | |
{ value: 2 }, | |
{ value: 3 }, | |
undefined, | |
{ value: 5 }, | |
{ value: 6 } | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const obj = {a : 2} | |
const fn = propName => ({ [propName]: prop }) => prop == 2 | |
console.log(fn('a')(obj)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; WIP material | |
;; RECAP | |
; clojure expressions are lists | |
; syntactically, lists are values in parentheses delimited by white space | |
(1 2 3) | |
; clojure expects each expression is built in such a way, | |
; that the first element is a function name followed by its arguments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const finishedLevelsCount = levels | |
.filter(({ finished }) => finished) | |
.reduce(acc => acc + 1, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const propertyExtractor = propName => ({ [propName]: prop }) => prop | |
const idExtractor = propertyExtractor('id') | |
const nameExtractor = propertyExtractor('name') | |
const convict = { id: 7556, name: 'ash' } | |
console.log(idExtractor(convict), nameExtractor(convict)) // 7556 "ash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"creationDate": "2018-10-24 12:24:51 +0100", | |
"value": "81" | |
}, | |
{ | |
"creationDate": "2018-10-24 12:24:55 +0100", | |
"value": "78" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set number | |
set expandtab | |
set tabstop=2 | |
set softtabstop=2 | |
set shiftwidth=2 | |
set nofoldenable | |
let g:mapleader = ',' | |
filetype plugin on |