Skip to content

Instantly share code, notes, and snippets.

View m4n1ok's full-sized avatar
🙈
(╯°□°)╯︵ ┻━┻

antonin caudron m4n1ok

🙈
(╯°□°)╯︵ ┻━┻
View GitHub Profile
@m4n1ok
m4n1ok / encoding-video.md
Created June 29, 2018 15:18 — forked from glen-cheney/encoding-video.md
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@m4n1ok
m4n1ok / rgbaToVec.js
Created April 25, 2018 11:57
Convert a rgba/rgb color to vec4. Convert vec4 color to rgba
const normalize = (min, max, value) => {
if (value < min) return min
else if (value > max) return max
else return value
}
const splitChannels = (color, split) => {
color = color.replace(split, '').replace(')', '').trim()
let channels = color.split(',')
@m4n1ok
m4n1ok / config.js
Created April 25, 2018 09:27
Simple node server with socket.io configuration and tweet stream api
module.exports = {
twitter: {
consumer_key: '',
consumer_secret: '',
token: '',
token_secret: ''
},
tracking: {
dev: ['gobelinou', 'taratta'],
prod: ['gobelinou']