This script will convert the audio in the best available quality (aq paramter) into MP3. The quality can be changed from 0 to 9. 0 is the best and 9 is the worst quality.
ffmpeg -i video.mp4 -vn -acodec libmp3lame -aq 0 audio.mp3
This script will convert the audio in the best available quality (aq paramter) into MP3. The quality can be changed from 0 to 9. 0 is the best and 9 is the worst quality.
ffmpeg -i video.mp4 -vn -acodec libmp3lame -aq 0 audio.mp3
Google PageSpeed Insights may complain about images being not compressed enough. There are techniques which ensure lossless compression. When using JPG images you may compress them using jpegoptim, which may be run from the command line.
jpegoptim -s /var/www/html/images/*.jpg
The command will go through all jpg images in that folder and will perform lossless compression. The -s parameter will also ensure that all markers (eg. comments and EXIF data) will be removed.
If you need to create symbolic link in Windows XP download Junction. It can do the same and it is available for free 🙂
Is Facebook returning 403 Forbidden for URLs on your server? Check out whether there is not an invalid IPv6 record in your DNS server. Looks like Facebook is using IPv6 by default when available.
This solution is good for situations where you don’t have enough space on your hard disc, so you move it to your SD Card and have it plugged to the PC permanently.
You may have noticed that you are unable to select folders inside the SD Card. What you have to do is make the music folder on the SD Card shared (at least with yourself) and then add it to the Windows Media Player from the network share.
This script will call Doveadm-Expunge based on users in home directory.
#!/bin/bash
FOLDERS=/home/*
for f in $FOLDERS
do
doveadm expunge -u "$(basename $f)" mailbox Spam savedbefore 14d;
doveadm expunge -u "$(basename $f)" mailbox Trash savedbefore 7d;
done
Redmine allows to reference commits to issues by using keyword refs followed by # and number of the issue. If you want to block user commit to SVN without specifying Redmine issue you can use similar pre-commit hook on SVN. The hook is for Windows version.
@ECHO OFF
REM *************************************************************
REM * this sets the arguments supplied by Subversion *
REM *************************************************************
SET REPOS=%1
SET TXN=%2
REM *************************************************************
REM * define directory paths *
REM * you *must* add any paths for command line tools you plan *
REM * since SVN does not include the Windows %PATH% environment *
REM * variable for security reasons. *
REM * *
REM * DIR - the current hooks directory *
REM * PATH - a user set path of where executables are located *
REM * *
REM *************************************************************
SET DIR=%REPOS%hooks
REM *************************************************************
REM * make sure to add the path to the SendEmail executable *
REM *************************************************************
SET PATH=%PATH%;%DIR%
REM *************************************************************
REM * get comment search for "refs #" *
REM *************************************************************
svnlook log -t "%TXN%" "%REPOS%" | findstr /c:"refs #" > NUL
IF %errorlevel% NEQ 0 GOTO Error
GOTO Success
:Error
ECHO. 1>&2
ECHO Your commit has been blocked because you didn't 1>&2
ECHO specify Redmine issue with refs keyword. 1>&2
ECHO Please write a log message (eg. refs #123) and 1>&2
ECHO then try committing again. -- Thank you Roman 1>&2
EXIT 1
:Success
It is easily possible to hide images from the navigation port-let using control panel, but I did not find similar option for the Tabular View when a folder contents is displayed.
So here is the solution I have applied.
There might be a lot of reasons for this, but in my case I had a fresh Windows XP SP3 installation and Windows Update has been using almost whole CPU. After a lot of googling I fixed that problem by installing security fix from Microsoft web.
If you need to remove X days old folders from a command line here is a short PowerShell command which will take care of it.
PowerShell -Command "& Get-ChildItem "%1" | Where-Object {$_.PSIsContainer -and $_.LastWriteTime -le [System.DateTime]::Now.AddDays(-%2)} | Remove-Item -Recurse -Force"
Just replace %1 with a base folder and %2 with number of days.