xprop -id $WINDOWID -notype WM_LOCALE_NAME
old=$(stty -g) stty raw -echo min 0 time 5 echo -ne '\005' read xapp stty $old echo "xapp: $xapp"
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
i've configured my screen and irssi that they use utf-8 internally but are able to display other encodings properly.
~/.screenrc
: 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
'^A:
' (screen default) or '^O:
' (my screen escape) :encoding utf-8
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
# 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)
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
also worth to check: cankiri and istanbul
perl -pe 'undef $/;s#/\*!\d{5} ([^*]+)\s?\*/#$1#gs'
Ever having headphones on and listening your favourite music, and hitting <END> button on url location and wondered wtf beeped so loud that you can't hear for next five minutes anything!? It is chrome bell reaching to speaker, which on recent hardware is connected to soundcard with MAX volume, ARGH!
TURN THE BEEP MIXER ON MUTE on some mixer to save your ears!
$ amixer set 'Beep' 0% mute $ sudo alsactl store
Such pity happened to me, that I filled bunch of form fields and found that Chrome does not download the result. I fired up Wireshark and captured the POST data (Export Selected Packet Bytes) and resubmited it with curl.
$ curl -H 'Expect: ' http://example.org/posthandler.php -d @postdata.raw > result.zip
lspci to get kernel module and pci description:
$ lspci | awk '/Ethernet/{print $1}' | xargs -l1 lspci -k -s 03:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet (rev 12) Subsystem: IBM Device 0342 Kernel driver in use: bnx2 Kernel modules: bnx2 06:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet (rev 12) Subsystem: IBM Device 0342 Kernel driver in use: bnx2 Kernel modules: bnx2
or with ethtool:
# ethtool -i eth0 driver: e1000 version: 6.3.9-k4-NAPI firmware-version: N/A bus-info: 0000:03:07.0
I needed to grow WinXP disk, as 2GiB was too short for it. It's all pretty basic, but with few quirks. VBoxManage can extend disks, but only it's VDI format (here and here). WinXP can grow NTFS partions, but only non-boot ones (here).
So first is to clone image and extend it
$ VBoxManage clonehd winxp_1-disk1.vmdk --format VDI winxp_1-disk1.vdi $ VBoxManage modifyhd winxp_1-disk1.vdi --resize 4096
now boot with both disks attached and run diskpart
.
DISKPART> list volume DISKPART> select volume 2 DISKPART> extend
now remove the old disk and voila!
See vm-info for more details
poldek --sn carme --up -u $(rpm -qa --qf '%{N} %{V}-%{R}\n' | awk -vv=$(rpm -q php-common --qf '%{V}-%{R}') '$2 == v {sub(/php/, "php54", $1); print $1}')
Any file saved to ~/Pictures/Screenshots
gets renamed based on timestamp and moved to ~/Dropbox/Public
folder.
When the move is done, URL for the image is copied to clipboard and image viewer is opened so you can see your image before you paste the url to IM, e-mail, etc…
Ac has old openssl that can't do SNI properly, therefore accessing svn over https gives errors:
svn: OPTIONS of 'https://....': Certificate verification error: certificate signature failure (https://svn.pld-linux.org)
A Workaround possible:
[groups] pld = svn.pld-linux.org [pld] ssl-trust-default-ca = no