Skip to content

Instantly share code, notes, and snippets.

View luzeduardo's full-sized avatar

Eduardo Luz luzeduardo

  • Porto
  • 04:41 (UTC +01:00)
View GitHub Profile
@luzeduardo
luzeduardo / convert_mov2mp4.sh
Created November 24, 2021 10:13
Convert all mov movies inside the folder to MP$
for i in *.mov; do ffmpeg -i "$i" -vcodec h264 -acodec mp2 "${i%.*}.mp4"; done
{
"[javascript]": {
"editor.tabSize": 2,
},
"[json]": {
"editor.tabSize": 2
},
"[css]": {
"editor.tabSize": 4
},
body {
background-color: black !important;
color: white !important;
}
span, tt, tt.calibre_4 > span, .calibre_12, .calibre_15 {
background-color: black !important;
color: red !important;
/*font-size: 1.2em !important;*/
-Eyevinn On-boarding (highly recommended, with many of the links presented here)
https://www.eyevinntechnology.se/#/onboarding
- Intro video concepts and ffmpeg (until Bonus Round: Adaptive Streaming)
https://github.com/leandromoreira/ffmpeg-libav-tutorial
- Digital Video Introduction
https://github.com/leandromoreira/digital_video_introduction
- Falsehoods Programmers believe about video
const spawn = require('child_process').spawn
const path = require('path')
const spawnPromise = (command, args, options) => new Promise(
(resolve, reject) => {
const task = spawn(command, args, options)
const { stdout } = task
stdout.on('data', (data) => {
resolve(data)
@luzeduardo
luzeduardo / k2pdfopt
Created August 20, 2019 11:14
pdf to kindle converter k2pdfopt
k2pdfopt -nl2e- -nr3o- [source] [dest]
// Overwrite key bindings by placing them into your key bindings file.
[
{
"key": "escape escape",
"command": "workbench.action.exitZenMode",
"when": "inZenMode"
},
{
"key": "shift+escape",
"command": "closeReferenceSearchEditor",
import React from 'react'
import Counter from '../Counter'
import {shallow} from 'enzyme'
import { wrap } from 'module';
describe('<Counter />', () => {
it('should start with zero', () => {
const wrapper = shallow(<Counter />)
expect(wrapper.state().counter).toBe(0)
"scripts": {
"lint": "eslint src/**",
"test": "jest src",
"coverage": "jest --collectCoverageFrom=src/**.js --collectCoverageFrom=!src/index.js --coverage src"
},
const slowFib = (n) => {
if (n < 2) {
return n
}
return slowFib(n — 1) + slowFib(n — 2)
}
export default slowFib