fads://

leave a comment »

Gonna try this another day…

David Rheinsberg's avatarPonyhof

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

Written by Amir Aupov

09.03.2013 at 20:02

Posted in Programming

Show subject for unseen IMAP mails

leave a comment »

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)

Written by Amir Aupov

14.08.2012 at 14:55

Posted in Programming

Tagged with , ,

Convert OpenOffice tables to LaTeX

leave a comment »

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.

Written by Amir Aupov

20.12.2011 at 21:04

Set environment variables in gdb

leave a comment »

gdb command for $SUBJ is:
set environment YOUR_ENV_VAR

for example:
set environment LD_LIBRARY_PATH=./bin
set environment TABLE_LIMIT=3

Written by Amir Aupov

12.12.2011 at 20:54

Posted in Programming

Tagged with , , , ,

strlen problem of valgrind on gentoo

with one comment

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

Written by Amir Aupov

20.11.2011 at 01:24

Posted in linux

Tagged with ,

Учет расходов. GnuCash

leave a comment »

Written by Amir Aupov

23.06.2011 at 16:39

Posted in Programming

Tagged with

Wrong layout для Pidgin

leave a comment »


“Долгожданный Ctrl+R для Pidgin” – так называется статья на хабре, посвященная замечательному плагину Wrong Layout, который написал человек с ником IIIEII. Сама суть плагина заключается в том, чтобы по нажатии на Ctrl+R набранный текст в окне переписки Pidgin’a менял раскладку с русского на латиницу и обратно.

Read More

via aloneunix’s blog

Written by Amir Aupov

17.06.2011 at 19:30

Posted in linux

Tagged with

Create a boot option for easy nvidia or nouveau display driver switching (via Gentoo itself is power)

leave a comment »

Все те кто сталкиваются с проблемой выбора между модулем nvidia или nouveau знают достоинства и недостатки каждого из них. Итак если вы хотите совместить достоинства обоих модулей – вам под кат. Сразу стоит предупредить увы одноврмеменно, на данном этапе, nvidia и nouveau неуживаются. Поэтому выход один. Предполагается что у вас уже стоит и настроен nvidia либо nouveau. Во первых в переменную VIDEO_CARDS файла /etc/make.conf добавляем [sourcecode … Read More

via Gentoo itself is power

Written by Amir Aupov

30.05.2011 at 00:46

Posted in linux

assembler docs

with one comment

Written by Amir Aupov

29.05.2011 at 18:25

Posted in linux, Programming

Tagged with ,

simple assembler program (at&t syntax)

leave a comment »

Задание по информатике для первокурсников, обработка символьных строк.
Read the rest of this entry »

Written by Amir Aupov

29.05.2011 at 17:29

Posted in Programming

Tagged with , ,

Create your own website, free on WordPress.com.Create your own website.
Start free