Speeding up films and podcasts, improved

Improved version of speedup script.

Fancy coloring, progress in percents, command line options, default speedup rate is taken from a file "SPEEDUP", handling Ctrl-C.


Copy podcasts back after speeding up

Script for moving processed podcasts back to player:


Speeding up films and podcasts (Linux)

Here is version of my speedup script for linux:


Useful cli remote control for N900 KMplayer

Works only if you use mplayer backend.


Moving to Nginx and Gunicorn

Selectel resumed cloud server service selectel, so I decided to create new server in new server pool and also move from lighttpd to nginx.


Link shortening on hotkey

Install keyboard-shortcuts. Also install CSSU, so as to get keyboard-shortcuts work.

Tune /apps/osso/hildon-desktop/key-actions/dbus_shortcuts_use_fn to press Ctrl-Fn-<letter> instead of Ctrl-Shift-<letter> (if you prefer).


import os
import pygtk
import gtk

clipboard = gtk.clipboard_get()
text = clipboard.wait_for_text()

import urllib2
fetcher = urllib2.urlopen('http://clck.ru/--?url=' + text)
text = fetcher.read()

os.system("phone-control --notify 'Link is shortened'")


Edit /usr/bin/keyboard-shortcuts:

if key == 'c': # or another letter
    os.system("su user -c 'run-standalone.sh /home/user/.bin/clck.py'")

Out-call-vibro variant, using dbus-scripts

After installing enhanced-busybox, out-call-vibro refused to work. I had rewritten it using dbus-scripts.


/home/user/.bin/out-call-vibro.sh * * org.freedesktop.Telepathy.Channel.Interface.Group MembersChanged *


if [[ "$5" == "Call answered" ]]; then
    if [ `cat /sys/devices/platform/gpio-switch/proximity/state` = "open" ]; then
        echo 150 > /sys/class/leds/twl4030:vibrator/brightness
        gsleep 0.5
        echo 0 > /sys/class/leds/twl4030:vibrator/brightness

Sending SMS from server

Several days ago I looked into details of how my selectel server spended money and saw that it spends about 20 roubles per day (about $0.8) and has 100% CPU load for about 2 last days. I connected to it and saw that some 'sh' proccess is hang. I just killed it.

So as to react in time to such cases I decided to set up an SMS notification.


Hosting moved to selectel cloud

As my server is gone down suddenly and I don't have a chance to find out what is with it, I decided to move my blog to cloud platform.

I chose Selectel as hosting provider. Prices start from 50 roubles (about $1.85), this is only for keeping virtual machine for month, without running it. For my blog traffic (almost 0 :) ) overall price will be about 70 roubles (about $2.60) per month, it's very cheap I think.

UPD: After month usage, actual price is about 44 roubles (about $1.57).

Unlocked volume buttons while screen is locked

To unlock volume buttons while the screen is locked, edit /etc/mce/mce.ini, so as parameter DisableKPImmediately in section [TKLock] equals 2.

# Policy for keypad interrupts
# 2 - leave keypad interrupts on even after blanking
#     (used to support pass-through of +/-)
# 1 - disable interrupts immediately
# 0 to wait until display is blanked