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
@abelardojarab
abelardojarab / virbr0_ifconfig_explanation.md
Created February 21, 2018 04:18
What is the virbr0 interface

The virbr0, or "Virtual Bridge 0" interface is used for NAT (Network Address Translation). It is provided by the libvirt library, and virtual environments sometimes use it to connect to the outside network.

Type the following command:

$ ifconfig

Sample outputs:

virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00 
@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 [email protected]
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/