Skip to content

Instantly share code, notes, and snippets.


fab fabriziosalmi

View GitHub Profile
giansalex /
Last active Jan 22, 2021
docker-php-ext-install Reference
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ 
jniltinho /
Last active Nov 18, 2019
How to Install Nginx and Google PageSpeed on Debian/Ubuntu
## Install PageSpeed on Debian 8/9 and Ubuntu 16.04 64Bits
## Debian ISO:
## No Link abaixo tem o pacote do Nginx para o Debian 8 64Bits
## Run as root (sudo su)
View music bpm visualization sketch
int[] lines = new int[10];
int counter = 0;
float startTime, currTime;
float hitTime;
float bpm = 170;
PShape bassDrum;
bennylope /
Created Apr 22, 2016 — forked from webkader/
FFmpeg add a watermark to video

How to Add a Watermark to Video

FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.

Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:

ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4

Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.

cgmartin /
Created Jan 17, 2016
Bash SSL Certificate Expiration Check
echo "checking if $TARGET expires in less than $DAYS days";
expirationdate=$(date -d "$(: | openssl s_client -connect $TARGET:443 -servername $TARGET 2>/dev/null \
| openssl x509 -text \
| grep 'Not After' \
|awk '{print $4,$5,$7}')" '+%s');
in7days=$(($(date +%s) + (86400*$DAYS)));
holms /
Last active May 25, 2020
Install full ffmpeg in debian wheezy (with aac(m4a) and x264 support)
# Add multimedia source
echo "deb wheezy main non-free" >> /etc/apt/sources.list
echo "deb-src wheezy main non-free" >> /etc/apt/sources.list
apt-get update
apt-get install deb-multimedia-keyring # if this aborts, try again
apt-get update
# Go to local source directory
cd /usr/local/src
yendor / ParallelTask.php
Created Nov 14, 2011
Base class for doing forked, parallel execution in PHP easily
View ParallelTask.php
class ParallelTask
protected $pid = null;
public $max_workers = 8;
protected $num_workers = 0;
public function run()