Skip to content

Instantly share code, notes, and snippets.

View AlexeyPogorelov's full-sized avatar
🏠
Working from home

Alex AlexeyPogorelov

🏠
Working from home
View GitHub Profile
@residentsummer
residentsummer / gostab.sh
Created February 25, 2017 16:15
Script to stabilize shaky GoPro footage with ffmpeg and libvidstab
#!/bin/bash
# Run without args to see usage
##### Configuration #####
# Maximum shakiness and accuracy
DETECT_OPTS="shakiness=10:accuracy=15"
# Fish-eye correction for GoPro H3+B 16:9 Wide
# http://stackoverflow.com/questions/30832248/is-there-a-way-to-remove-gopro-fisheye-using-ffmpeg/40659507#40659507
// getCookie(), setCookie(), deleteCookie()
// возвращает cookie если есть или undefined
function getCookie(name) {
var matches = document.cookie.match(new RegExp(
"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
))
return matches ? decodeURIComponent(matches[1]) : undefined
@banksean
banksean / perlin-noise-classical.js
Created February 15, 2010 10:00
two Perlin noise generators in javascript. The simplex version is about 10% faster (in Chrome at least, haven't tried other browsers)
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough banksean@gmail.com
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/