Skip to content

Instantly share code, notes, and snippets.

View seblavoie's full-sized avatar

Sébastien Lavoie seblavoie

View GitHub Profile
@seblavoie
seblavoie / install_ffmpeg_ubuntu.sh
Last active December 2, 2016 01:52 — forked from xdamman/install_ffmpeg_ubuntu.sh
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
*/1 * * * * /Users/sebastienlavoie/All/Seb/Websites/dovi-renderer/storage/app/cron/exec.sh
@seblavoie
seblavoie / harvest-translate.js
Last active February 20, 2024 18:24
Harvest translations
// To open console, in chrome, do cmd+option+j or ctrl+shift+j
// Copy paste code below in console to switch to english
var translationsEn = [
"INVOICE",
"From",
"For",
"Invoice ID",
"PO Number",
"Issue Date",

L = thisComp.layer("the layer");
max = 5; // number of words to display
n = 0
if (L.marker.numKeys > 0){
n = L.marker.nearestKey(time).index;
if (L.marker.key(n).time > time){
n--;
}
}
s = " ";
@seblavoie
seblavoie / makeWebm.sh
Created February 6, 2014 18:57
Bash aliases to create webm
makeWebm() {
FILE=$1
BITRATE=${2:-'3450'}
SIZE=${3:-'1280x720'}
FILENAME=${FILE%%.*}
ffmpeg -i ${FILE} -acodec libvorbis -ac 2 -ab 96k -ar 44100 -b ${BITRATE}k -s ${SIZE} ${FILENAME}.webm
}
makeWebms() {
BITRATE=${1:-'3450'}
@seblavoie
seblavoie / gulpfile.js
Last active January 4, 2016 12:39
Basic gulpfile.
var gulp = require("gulp");
var gutil = require("gulp-util");
var compass = require("gulp-compass");
var coffee = require("gulp-coffee");
var imagemin = require("gulp-imagemin");
var concat = require("gulp-concat");
var minifyCSS = require('gulp-minify-css');
var path = require('path');
gulp.task("compass", function(){
@seblavoie
seblavoie / symetry.hyle
Created December 6, 2013 22:28
Will create a mirror effect using Hyle.
effects:
- type: cc repetile
properties:
expand right: 5000
expand left: 5000
expand down: 5000
expand up: 5000
tiling: 4
- type: transform
- type: mirror
tMin = .25; //minimum segment duration
tMax = .5; //maximum segment duration
minVal = [-50,-50];
maxVal = [50,50];
start=0;
end = 0;
j = 0;
while (time >= end){
j ++;
seedRandom(j,true);
@seblavoie
seblavoie / copy-folder-structure.sh
Last active December 17, 2015 07:58
Bash line to copy folder structure only (not files) contained in current folder. Inspired by: http://www.linuxquestions.org/questions/linux-newbie-8/copy-directory-structure-only-208796/.
# Run from source folder’s root.
find . -type d -exec mkdir ../destination-folder-name/{} \;