This is the commandline I usually use to split a podcast into 6 minute

mp3splt podcast.mp3 -g %[@N=0,@o] -o “@n @f” -t 6.0

-t 6.0: split every 6 minutes
-g %[@N=0,@o]: for every section use the original tags, but update the track number starting from 0.
-o "@n @f": The output file name should be the original filename with the track number tacked on in front.


Helvetica in Firefox

Replace ugly rendered helvetica font in /etc/fonts/local.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
        <!-- Font directory list -->

    <!-- Replace Helvetica with Arial -->
    <match target="pattern">
        <test qual="any" name="family">
            <edit name="family" mode="assign" binding="strong">

    <!-- Replace Times with Times New Roman -->
    <match target="pattern">
        <test qual="any" name="family">
            <edit name="family" mode="assign" binding="strong">
                <string>Times New Roman</string>

    <!-- Replace Palatino with Georgia -->
    <match target="pattern">
        <test qual="any" name="family">
            <edit name="family" mode="assign" binding="strong">



Content disposition

If this is set to on, experimental (not fully-functional) support for “Content-Disposition” headers is enabled. This can currently result in extra round-trips to the server for a “HEAD” request, and is known to suffer from a few bugs, which is why it is not currently enabled by default.

wget --content-disposition


curl -J -O

via superuser

Automatically close merged branches in mercurial

@echo off

:: :: ::
:: This script can be run by hand or added as a hook to mercurial (.hg/hgrc):
::      [hooks]
::      changegroup.closemerged = c:\scriptdirectory\closemerged.bat PROD c:\repo\projectdirectory
:: :: ::
:: Usage:
:: :: ::

set MAIN=%1

cd %2

echo Searching for not closed branches that were merged to %MAIN%...
hg log -r "head()-closed()-branch(%MAIN%)-branch(TEST)" --template "{branch}," > tmpFile
set /p BRANCHES=<tmpFile
del tmpFile

echo Processing branches: %BRANCHES%
call :parse "%BRANCHES%"
goto :end

set list=%1
set list=%list:"=%
FOR /f "tokens=1* delims=," %%a IN ("%list%") DO (
  if not "%%a" == "" call :sub %%a
  if not "%%b" == "" call :parse "%%b"
exit /b

echo Querying %1
:: get last revision of branch
hg log -r "%1" --template {node} > tmpFileB1
:: get revision of ancestor of main branch and queried branch
hg log -r "ancestor('%MAIN%','%1')" --template {node} > tmpFileB2
set /p b1=<tmpFileB1
set /p b2=<tmpFileB2
del tmpFileB1
del tmpFileB2
:: if revision nodes are the same it means that branches are merged
if "%b1%"=="%b2%" call :close %1
exit /b

echo Closing %1
hg update --clean %1
hg ci --close-branch -m "Closing merged branch."
exit /b

echo Updating to %MAIN% branch
hg update --clean %MAIN%

Mercurial log with one-liners

hg log --template '{node|short} | {date|isodatesec} | {author|user}@{branch}: {desc|strip|firstline}\n'

Once you have a nice template for one-line summaries of changesets, you can add a command alias in your ~/.hgrc file like this:

shortlog = log --template '{node|short} | {date|isodatesec} | {author|user}@{branch}: {desc|strip|firstline}\n'

With the alias installed you can now type hg shortlog.

via Mercurial log with one-liners

Mercurial hooks

Useful Mercurial Hooks

Add/document commit-hook

To close the branch retroactively, just update to it and close it. You can also do so in bulk if you need to:

for b in `hg heads --template '{branches}\n'`; do \
    tip=`hg log -r $b --template '{node}'`; \
    anc=`hg debuganc $b default | cut -d: -f2`; \
    if [ $tip = $anc ]; then \
      echo $b merged; \
      hg up $b; \
      hg ci --close-branch -m 'Closing merged branch.'; \
    else \
      echo $b unmerged; \
    fi; \

via Using a named branch

hg log -r 'head()-parents(merge())-closed()' --template '{branch}\n'

via hg hook to detect unmerged changesets