Skip to content

Instantly share code, notes, and snippets.


Eugene jack-fdrv

View GitHub Profile
juliovedovatto / remove_duplicates_array_multi.js
Created Dec 3, 2016
Javascript: Remove duplicates of multidimensional array
View remove_duplicates_array_multi.js
// for browser using, this code requires javascript 1.7+
var arr = [
{ foo: 'bar', lorem: 'ipsum' },
{ foo: 'bar', lorem: 'ipsum' },
{ foo: 'bar', lorem: 'ipsum dolor sit amet' }
arr = // convert to JSON string the array content, then reverse it (to check from end to begining)
.filter(function(item, index, arr){ return arr.indexOf(item, index + 1) === -1; }) // check if there is any occurence of the item in whole array
m4tthumphrey / ConcatAudioFilter.php
Last active Sep 5, 2020
php-ffmpeg concat audio filter - an incredibly simple filter to concat multiple audio files together. Should be easily tweaked to allow for videos too.
View ConcatAudioFilter.php
use FFMpeg\Media\Audio;
use FFMpeg\Format\AudioInterface;
use FFMpeg\Filters\Audio\AudioFilterInterface;
class ConcatAudioFilter implements AudioFilterInterface
private $files;
private $priority;