Elan Ruusamäe

http://cia.vc/stats/author/glen

Inner Wiki links

Some ideas to do in PLD Linux

links

Kmail & Crypto

 poldek -u gpgme gnupg-agent keychain pinentry-qt

$ cat ~/.gnupg/gpg-agent.conf
pinentry-program /usr/bin/pinentry-qt

keychain -q --agents gpg
if [ -f ~/.keychain/$HOSTNAME-sh-gpg ]; then
  . ~/.keychain/$HOSTNAME-sh-gpg
fi
* start new shell and start kmail/kpg/whatever
$ bash -l

irssi & screen

i've configured my screen and irssi that they use utf-8 internally but are able to display other encodings properly.

defencoding iso8859-15

/set term_charset utf-8
/set recode_autodetect_utf8 ON
/set recode_fallback iso8859-15
/set recode ON
/set recode_out_default_charset iso8859-15
/set recode_transliterate OFF
/recode add #linux.ee utf-8
/recode add #metal iso8859-15
/recode add #pld iso8859-2

:encoding utf-8

controlling screen window encoding from scripts

first you need to enable interpreting of commands, add to ~/.screenrc:

# disable all screen commands but encoding
addacl :window: -rwx #?
# allow 'encoding' command
addacl :window: +x encoding

and to set encoding from script:

$ echo -ne '\033]83;encoding utf8\007'

for example my ~/.bash_profile on carme contains:

# force screen utf8 encoding
if [[ "$TERM" = screen* ]]; then
  echo -ne '\033]83;encoding utf8\007'
  echo -ne "\033k$HOSTNAME\033\\"
fi

PHP via FastCGI in Apache

# the server name is bogus actually, to satisfy mod_fastcgi
FastCgiExternalServer /bin/true -socket /var/run/php/fcgi.sock
ScriptAlias /php-fcgi /bin/true
<Location "/php-fcgi">
    SetHandler fastcgi-script
    Allow from all
</Location>

AddType application/x-httpd-fastphp .php
Action application/x-httpd-fastphp /php-fcgi

unfortunately /php-fcgi will be available for download (/bin/true binary in this case)


CategoryHomepage

Capture desktop as video.ogg

Using gstreamer:

$ poldek -u gstreamer-ximagesrc gstreamer-theora gstreamer-vorbis
$ gst-launch -v ximagesrc ! video/x-raw-rgb,framerate=10/1 ! ffmpegcolorspace ! theoraenc ! oggmux ! filesink location=desktop.ogg

thx Patrys for this :)

mysql comments out

perl -pe 'undef $/;s#/\*!\d{5} ([^*]+)\s?\*/#$1#gs'

glen (last edited 2008-02-12 11:54:12 by glen)