Linux, programming, etc.
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.
Script for moving processed podcasts back to player:
Here is version of my speedup script for linux:
Works only if you use mplayer backend.
Selectel resumed cloud server service selectel, so I decided to create new server in new server pool and also move from lighttpd to nginx.
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).
#!/usr/bin/python import os import pygtk pygtk.require('2.0') 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'") clipboard.set_text(text) clipboard.store()
if key == 'c': # or another letter os.system("su user -c 'run-standalone.sh /home/user/.bin/clck.py'")
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 *
#!/bin/sh 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 fi fi
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.
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).
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 DisableKPImmediately=2
This work is licensed under a Creative Commons Attribution 3.0 Unported License.
© Anton Novosyolov | Design by: Matthew James Taylor | Powered by: blohg 0.10.1_multilang+/2fc5a1d551a5+