Dariusz on Software Quality

24/03/2011

Switching xorg keyboard layout on the fly

Filed under: en — Tags: — dariusz.cieslak @

In order to switch X11 keyboard layout you needn’t restart your X server. Just issue:

setxkbmap <language_code>

and that’s all.

22/03/2011

Boosting qmake-based builds speed using ccache

Filed under: en — Tags: , , — dariusz.cieslak @

C++ compiler is pretty big and slow tool and if one needs to make full rebuilds very often waiting for build finish is very frustrating. For those guys “ccache” tool was created.

How is it working? Compiler output (*.o files) are cached under key that is computed from preprocessed source code, compiler versions, build switches. This way builds might be much faster.

Qmake is a Makefile generator that comes with QT and allows for easy build of QT-based (and other) projects. In order to join ccache and qmake one have to update so called “mkspecs” files. How to do that?

It’s easy using sed (I’m including only sh4 and mipsel crosscompiler toolchains):

# sed -i '/QMAKE_CXX .*= *[^c][^c]/s/= /= ccache /' \
`find /usr/local -name qmake.conf | grep 'linux-\(sh4\|mipsel\)'`

And how to revert:

# sed -i '/ccache/s/ccache / /' \
`find /usr/local -name qmake.conf | grep 'linux-\(sh4\|mipsel\)'`

Of course you can manually launch an editor and update those files, but a bit of sed scripting is many times faster ;-)

17/03/2011

VIM internal spellchecker

Filed under: en — Tags: , — dariusz.cieslak @

In order to use VIM internal spellchecker just declare language used:

setlocal spell spelllang=en_us

And voila! All mispelled words will be highlighted by red background!

In order to add some words to dictionary, place cursor over such word and use “zg” command. Word will be marked as “correct” one. Looking at suggestions: “z=”.

Pretty easy!

08/03/2011

“coworking” w Warszawie

Filed under: pl — Tags: , — dariusz.cieslak @

Jakiś czas temu rozglądałem się po możliwościach najmu powierzchni biurowej w Warszawie i nieco odstraszyły mnie koszty związane z biurem w Warszawie. Wiedząc ile jeden z moich klientów płaci za wynajem biura zacząłem się zastanawiać, czy stać mnie na taki “luksus”.

Z pomocą, podobnie jak w innych dziedzinach (wirtualizacja, outsorcing) przychodzi efekt skali. Jeśli możesz pogodzić się ze współdzieleniem zasobu z innymi użytkownikami jego cena potrafi spaść o rząd wielkości do wartości już akceptowalnej dla niedużej firmy.

Najtańszą opcją dostępu do powierzchni biurowej (poza pracą w swoim domu) jest tzw. “coworking“. Nie wiem czy istnieje dobre polskie określenie na ten termin, ale wydaje mi się, że “współdzielona przestrzeń biurowa” mogła by dobrze oddawać sens tego typu usług (jak zwykle język angielski pokazuje swoją przewagę jeśli chodzi o zwięzłość).

Poniżej zamieszczam przegląd wybranych opcji w Warszawie (Centrum i okolice) pod kątem trzech typowych profili użytkowych:

  • współdzielone biuro dostępne tylko kilka dni w miesiącu
  • współdzielone biuro dostępne bez ograniczeń
  • mały kilkuosobowy startup potrzebujący wydzielonej przestrzeni

(more…)

07/03/2011

Mutt: jump to next marked e-mail

Filed under: en — Tags: — dariusz.cieslak @

I’m big mutt fan. Mutt is console-based e-mail client that is very customisable. You can redefine almost everything!

Here’s very useful macro that allows you to search for next e-mail in TODO state (marked with “F”, “N”ew or “O”ld state). It’s working in pager and index mode:

~/.muttrc
----------------
macro index . <search>~F|~N|~O<Enter><Enter>
macro pager . i<search>~F|~N|~O<Enter><Enter>
macro index , <search-reverse>~F|~N|~O<Enter><Enter>
macro pager , i<search-reverse>~F|~N|~O<Enter><Enter>

I assigned this macro to “.” and “,” keys that is normally not used in default mutt configuration. It allows me to reach not-yet-processed e-mails easily (“.”: next, “,” for previous e-mail).

Powered by WordPress