Skip to content

Instantly share code, notes, and snippets.

Avatar

Ali Irani airani

View GitHub Profile
@airani
airani / ffmpeg.sh
Created Feb 6, 2017
ffmpeg command tips
View ffmpeg.sh
# change metadata of audio file
ffmpeg -i input.mp3 -acodec copy -vn -metadata artist=Ali output.mp3
@airani
airani / setlocale.php
Last active Feb 6, 2017
Fixed some problems in php with encoding utf8
View setlocale.php
<?php
setlocale(LC_CTYPE, "en_US.UTF-8");
@airani
airani / ArrayHelper.php
Last active Dec 9, 2016
Move an array item from an index to another index position
View ArrayHelper.php
<?php
/**
* ArrayHelper
*
* @author Ali Irani <ali@irani.im>
*/
class ArrayHelper
{
/**
* Move an array item from an index to another index position