from an audiodisk to a mp3 player

August 17th, 2013

My sequence to grab audiobooks from a cd to hear later on a mp3 player. Grab as mp3:

abcde -o mp3

Read the rest of this entry »

pyinstaller, wxpython, _core_ not found

July 31st, 2013

Sometimes an error and the error message are different things. One of the examples is that my wxpython-program did not want to start after converting to exe using pyinstaller:

ImportError: No module named _core_

Read the rest of this entry »

learn foreign language with Audacity

June 6th, 2013

Pauken, a plugin for Audacity, adds silence and multiplies a selected audio fragment. It helps when you learn foreign languages by listening and repeating phrases after a speaker. Download Pauken here or from the audacity forum.

latex cals tables version 2.2

June 6th, 2013

I’ve updated “cals” package — multipage tables with wide range of features — to version 2.2. In the new version, alignment of tables should work. Also, I’ve added hooks for the package “bidi” (right-to-left writing support). CTAN is updated, and the coming TeX Live 2013 should include the new version.

wxPython GIFAnimationCtrl: embed animation gif in the source code

March 27th, 2013

In some cases it is useful to store media files inside the python code itself. For images, PyEmbeddedImage and the script work well. But for GIFAnimationCtrl no obvious solution is available, therefore I had to investigate the source code of wx.animate to find one.

Read the rest of this entry »

vmware 8.0.5 (and maybe 8.0.4) on kernel 3.7.5-std-pae-alt1

February 4th, 2013

Each kernel upgrade causes a pain with vmware. This time (3.7.5 with PAE option) is not an exception. However, only two manual interventions were required to compile vmware kernel modules.

Read the rest of this entry »

Subversion is not available, temporary switch to RCS

January 30th, 2013

The server with the subversion repository has crashed. Repair takes a few days. How to work during repair? Git isn’t a solution, because man had to switch before the disaster, not after.

My answer is: temporary switch to RCS.

Read the rest of this entry »

solved: createInstanceWithContext: Binary URP bridge disposed during call

January 9th, 2013

I decided to experiment with OpenOffice automation from Python, found the official PyUNO wiki, followed the “a must read” link PyUNO bridge and tried the proposed hello-world program ““. As it was feared, nothing worked immediately. The error was:

Traceback (most recent call last):
  File "", line 19, in 
    desktop = smgr.createInstanceWithContext( "",ctx)
__main__.RuntimeException: Binary URP bridge disposed during call

Read the rest of this entry »

illegal XML characters

November 1st, 2012

Sometimes I dump binary data into XML. Being aware of illegal bytes (0-8,B-C,F-1F), I encode everything in base64. But there is a nice alernative way, just revealed by Roger Costello in the xml-dev maillist:

Move any illegal characters into the Private Use Area: for each illegal character add hex E000.

xml.etree.ElementTree and processing instructions

June 19th, 2012

Python standard library xml.etree.ElementTree is convenient to work with a simple subset of XML. Unfortunately for me, this subset does not include processing instructions, therefore an workaround is required.
Read the rest of this entry »

easy LyX styles

June 8th, 2012

The official way to introduce custom styles to LyX is:

* the layout-file should be located in a special directory,
* after the layout file is changed, the user should:
. – execute re-configure and
. – restart LyX.

This way is too cumbersome for experimenting and developing styles. Fortunately, there is a solution.

Read the rest of this entry »

custom tex in rpm/apt distributions

January 6th, 2012

I prefer to use TeX from TeXlive distribution, not the default TeX bundled with an operating system. The problem is that rpm and apt tools check dependencies and insist on installing the wrong TeX. To trick the system, a fake package should be made and installed.

Read the rest of this entry »

german-russian, german-arabic vim keymaps

December 16th, 2011

vim includes many keyboard layouts, defined as mappings for symbols of the english layout. Unfortunately, these maps are not useful when the base layout is german. QWERTZ vs QWERTY is not the only difference. Now, deutsch-russisch und deutsch-arabisch vim keymaps sind da.

Read the rest of this entry »

german pc keyboard on mac os x

December 5th, 2011

The keys “< " and "^" seem swapped, but otherwise the normal PC german keyboard layout for Mac OS X is here:

control alt shift vmware

July 28th, 2011

Sometimes vmware makes something very wrong, and X server do not understand the keys CTRL, ALT, SHIFT and similar anymore. Solution: “setxkbmap” without any arguments.
Read the rest of this entry »

chess fen plugin for anki

June 27th, 2011

After I discovered anki, a tool to assist in remembering facts, I started to actively use it. Among other uses, I want to keep in memory some important chess positions. To display these positions in anki, I have written a plugin.

Read the rest of this entry »

delta debugging for latex

April 27th, 2011

From the delta debugging homepage: “With Delta Debugging, we can find failure-inducing circumstances automatically—circumstances such as the program input, changes to the program code, or program executions.” I tried to apply this technique to LaTeX, and surprisingly it worked. The code and samples of the experiment are uploaded on github.

The tools are:

* Finding which diff chunk causes an error.
* Finding a minimal failing example
* sty-bug hunting

using a local copy of a file instead of downloading it in macports

April 20th, 2011

In some cases, macports can’t or should not download a file from internet. Instead, it should use an already downloaded local copy. Unfortunately, this use case is not supported, and a workaround is required.

Read the rest of this entry »

solved: vmware does not work anymore

April 4th, 2011

After some system update, vmware stopped working. It wrote some information which modules are loaded, and then silently exited. In a log file “ui-NNNN.log”, I found: “vmui| Caught signal 11”. The stacktrace said only that the crash was likely due to some signal.

Read the rest of this entry »

messed Helvetica etc on a PostScript printer

March 22nd, 2011

I’ve got PostScript files, which does look ok on the screen, but badly printed on Lexamark E232. The letters collide each with other, seems like instead of Helvetica some monospace font is substituted.

Read the rest of this entry »