Skip to content

Instantly share code, notes, and snippets.

@md1023
md1023 / hgwebdir.wsgi
Created May 5, 2016 06:25
Mercurial example configuration
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
os.environ['HGENCODING'] = 'utf-8'
from mercurial import extensions, ui as uimod
ui = uimod.ui()
ui.readconfig("/etc/mercurial/hgrc")
extensions.loadall(ui)
@md1023
md1023 / mp3tags
Last active August 29, 2015 14:21
Print song filename, title and artist with Python and EyeD3
import os
import eyed3
mp3s = []
for path, subdirs, files in os.walk("."):
mp3s.extend(
[os.path.join(path, name) for name in files if name[-4:] == ".mp3"])
for name in mp3s: