пятница, 30 апреля 2010 г.

mp3 id3 tag convert to utf8

http://wiki.linuxmce.org/index.php/Converting_MP3_Tags_To_UTF-8

mid3iconv

Utility mid3iconv is a part of Python-mutagen package. It is a tool which can do mass conversion of mp3 files. You can install python-mutagen from the universe repository:

sudo apt-get install python-mutagen

Convert MP3 Tags using mid3iconv

find . -name "*.mp3" -print0 | xargs -0 mid3iconv -e CP1251 -d

суббота, 10 апреля 2010 г.

php header

http://www.jonasjohn.de/snippets/php/headers.htm

// See related links for more status codes


// Use this header instruction to fix 404 headers
// produced by url rewriting...
header('HTTP/1.1 200 OK');

// Page was not found:
header('HTTP/1.1 404 Not Found');

// Access forbidden:
header('HTTP/1.1 403 Forbidden');

// The page moved permanently should be used for
// all redrictions, because search engines know
// what's going on and can easily update their urls.
header('HTTP/1.1 301 Moved Permanently');

// Server error
header('HTTP/1.1 500 Internal Server Error');

// Redirect to a new location:
header('Location: http://www.example.org/');

// Redriect with a delay:
header('Refresh: 10; url=http://www.example.org/');
print 'You will be redirected in 10 seconds';

// you can also use the HTML syntax:
// < meta equiv="refresh" content="" >

// override X-Powered-By value
header('X-Powered-By: PHP/4.4.0');
header('X-Powered-By: Brain/0.6b');

// content language (en = English)
header('Content-language: en');

// last modified (good for caching)
$time = time() - 60; // or filemtime($fn), etc
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $time).' GMT');

// header for telling the browser that the content
// did not get changed
header('HTTP/1.1 304 Not Modified');

// set content length (good for caching):
header('Content-Length: 1234');

// Headers for an download:
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="example.zip"');
header('Content-Transfer-Encoding: binary');
// load the file to send:
readfile('example.zip');

// Disable caching of the current document:
header('Cache-Control: no-cache, no-store, max-age=0, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
header('Pragma: no-cache');

// set content type:
header('Content-Type: text/html; charset=iso-8859-1');
header('Content-Type: text/html; charset=utf-8');
header('Content-Type: text/plain'); // plain text file
header('Content-Type: image/jpeg'); // JPG picture
header('Content-Type: application/zip'); // ZIP file
header('Content-Type: application/pdf'); // PDF file
header('Content-Type: audio/mpeg'); // Audio MPEG (MP3,...) file
header('Content-Type: application/x-shockwave-flash'); // Flash animation

// show sign in box
header('HTTP/1.1 401 Unauthorized');
header('WWW-Authenticate: Basic realm="Top Secret"');
print 'Text that will be displayed if the user hits cancel or ';
print 'enters wrong login data';

четверг, 8 апреля 2010 г.

задачи в Помидорах

помидорное планирования:
  • Каждый Помидор состоит из 25 минут работы и пяти минут отдыха
  • После каждых четырех Помидоров следует 15-30 минутный отдых
  • Помидор неделим. Не существует половины помидора.
  • Если Помидор начался — он должен прозвенеть.
  • Если вам пришлось прервать работу не предусмотренным образом, Помидор должен быть заведен с начала. Такой помидор не учитывается (крестик не ставится).
  • Если вы закончили задачу до того как Помидор прозвенел, следует анализировать как и что вы только что сделали до звонка.
  • Защищайте свои Помидоры. Переносите звонки, назначайте встречи на другое время (и выделяйте на это Помидоры). Вы не должны давать резать ваш Помидор. Он неделим.
  • Любую задачу длиннее 5-7 Помидоров следует разделить на несколько.
  • Если задача явно займет меньше времени — объедините ее с подобными же и потратьте один Помидор на все вместе.
  • Каждый следующий Помидор пойдет лучше!
http://www.pomodorotechnique.com/
http://lifehacker.ru/2009/06/09/izmerjajjte-zadachi-v-pomidorah-ehffektivnoe-planirovanie-proshhe-chem-vy-dumaete/