Elan Ruusamäe
Contents
Inner Wiki links
Some ideas to do in PLD Linux
- generate /etc/profile.env from /etc/env.d and make it possible to merge env from two different files.
- modularize rc-scripts, so the portions could be reused for example by initng.
links
Kmail & Crypto
- install packages
poldek -u gpgme gnupg-agent keychain pinentry-qt
- setup gpg-agent to use pinentry-qt
$ cat ~/.gnupg/gpg-agent.conf pinentry-program /usr/bin/pinentry-qt
- make ~/.bash_profile to use keychain:
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.
make screen default window encoding iso8859-15. ~/.screenrc:
defencoding iso8859-15
- irssi configuration
/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
- configure your terminal (putty, konsole, xterm) to be in utf-8
- start screen with -U option
to change encoding of some screen window: type to screen command prompt, which can be activated with '^A:' (screen default) or '^O:' (my screen escape)
: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)
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'