Gonna try this another day…
KMSCON is a KMS/DRM-based system console with an integrated terminal emulator. It was designed to replace the linux-kernel-console and virtual terminals (VTs). When run in default-mode, KMSCON allocates a virtual terminal and provides a terminal-emulator on it. It can thus be used as drop-in replacement for the linux-console and agetty. Compared to the linux-console, KMSCON provides a rich set of enhanced features including full-internationalized keyboard handling, full UTF8 input/font support, hardware-accelerated rendering, multi-seat support and more.
If run in listen-mode, KMSCON can also replace virtual terminals. This allows to run multiple graphics-servers (like kmscon, X-Server, Wayland Compositors) simultaneously on all seats not only on the default seat seat0.
Parts of this article expect the reader to be familiar with the term multi-seat. KMSCON runs on single-seat and multi-seat setups, but to understand the terms used here, you should read up on Wikipedia. On linux…
View original post 1,586 more words
Show subject for unseen IMAP mails
This python script handles MIME encodings and outputs everything in utf-8.
I use it with conky in spectrwm bar.
import imaplib
from email.header import decode_header
mail = imaplib.IMAP4_SSL('imap.gmail.com') # your imap server goes here
mail.login('example@gmail.com', 'password')
mail.select('INBOX', readonly=True)
typ, new = mail.search(None, "UNSEEN")
new = new[0].split()
if (len(new) > 0):
res = list()
for msg in new:
typ, data = mail.fetch(msg, '(BODY[HEADER.FIELDS (SUBJECT)])') # FROM, DATE, etc
data = data[0][1].strip()
decoded = decode_header(data[9:])[0] # "Subject: " is 9 characters long
text = decoded[0].replace("\r\n", "")
if (decoded[1] != None):
text = unicode(text, decoded[1])
text = text[:20].strip() # Cut off first 20 characters from subject
res.append(text.encode('utf-8'))
print ', '.join(res)
Convert OpenOffice tables to LaTeX
http://calc2latex.sourceforge.net/
Download and extract the plugin.
Launch OpenOffice Calc, Tools – Macros – Organise Dialogs (LibreOffice 3.4.3). Select Libraries tab, Location – Import, then pick “script.xlb”.
Finally, select the area of the table to be converted and run Main macro (Tools – Macros – Run macro, – Calc2LaTeX). The dialog with options is being displayed.
Set environment variables in gdb
gdb command for $SUBJ is:
set environment YOUR_ENV_VAR
for example:
set environment LD_LIBRARY_PATH=./bin
set environment TABLE_LIMIT=3
strlen problem of valgrind on gentoo
Valgrind asks for non-stripped ld.so, but portage strips binaries by default (proof). Place
FEATURES="splitdebug"
in
/etc/portage/env/sys-libs/glibc
to prevent portage from stripping ld.so and thus get valgrind back to work. (In portage 2.1 series and later)
Thanks to aeronaut23 for comment on Richizo’s post
simple assembler program (at&t syntax)
Задание по информатике для первокурсников, обработка символьных строк.
Read the rest of this entry »