Śpieszmy sie kochać

Wrzesień 9th, 2009

“Åšpieszmy siÄ™ kochać ludzi tak szybko odchodzÄ…
zostanÄ… po nich buty i telefon gÅ‚uchy (…)”
(ks. Jan Twardowski)

“No niestety, przykro mi.”  – 24 godziny temu powiedziaÅ‚ lekarz “Erki” wchodzÄ…c do kuchni. 24 godziny temu odeszÅ‚a od nas moja mama.

W grudniu 2003 roku na moim kloszu pojawiły się pęknięcia. Wczoraj rozpadł się całkowicie.

I hate you

Sierpień 18th, 2009

Jeden z Klientów zażyczył sobie, aby maile spełniające określone warunki (nadesłane z określonego adresu i na konkretne konta) były odrzucane po stronie serwera i nie docierały do skrzynek adresatów.

Na szybko ( i zapewne na wieki – niech żyjÄ… prowizorki!) udaÅ‚o siÄ™ to rozwiÄ…zać za pomocÄ… pary prostego routera:

hateyou_router:
driver = accept
no_expn
condition = “${if or {\
{eq {$local_part@$domain} {user1@example.com}} \
{eq {$local_part@$domain} {user2@example.com}} \
} {yes} {no}}”
senders = ” ^hateyou@domain.com:\
^hateyou2@otherdomain.com”
transport = hateyou_transport
no_verify

I jeszcze prostszego transportu:

hateyou_transport:
driver = autoreply
from = $local_part@$domain
to = $sender_address
subject = Re: $h_subject
text = Wiadomosc zostala usunieta bez czytania.

Oczywiście możnaby to usprawnić, trzymać pary adresów w bazie danych, umożliwiając użytkownikom ich modyfikację, itd. Jednak w tym konkretnym przypadku (mini-serwer, raptem kilka kont) przedstawione rozwiązanie sprawdziło się.

Open-source code never really dies

Kwiecień 4th, 2009

Open-source code never really dies; it just doesn’t get checked out of the repository much anymore.

za: http://blogs.computerworld.com/good_bye_solaris_the_fate_of_suns_top_5_technologies

Lenovo X300

Marzec 22nd, 2009

W marcu 2006 roku kupiÅ‚em laptopa – IBM ThinkPad T42. Przez te trzy lata pracowaÅ‚o mi sie na nim tak dobrze, że w odstawkÄ™ poszedÅ‚ domowy desktop. WspaniaÅ‚a jakość wykonania, miaÅ‚ tylko jednÄ… usterkÄ™, okoÅ‚o pół roku temu pojawiÅ‚y siÄ™ problemy z matrycÄ…, ale to chyba po prostu “zużyÅ‚y” siÄ™ części — zdarzaÅ‚o siÄ™, że przez kilka dni z rzÄ™du nie wyłączaÅ‚em laptopa a gdybym policzyÅ‚ to Å›redni czas pracy miaÅ‚bym pewnie w okolicach 8-10h dziennie (wliczajÄ…c w to weekendy). 

Do prac biurowych komputer sprawdza się wyśmienicie, a po rozszerzeniu RAMu do 2 GB sporo zyskał, jak się okazało 1 GB to za mało na zestaw KDE + KMail z kilkoma kontami IMAP + Akregator z kilkudziesięcioma źródłami RSS + Iceweasel. W zasadzie mógłbym na nim jeszcze pracować , a nawet pograć w  takie gry jak Enemy Territory, czy (ostatnio) mniej wymagające jak Einstein Puzzle, Xmoto czy OpenTTD. Jednak od paru miesięcy jest chętny na tego laptopa, pora więc było coś poszukać.

U jednego z klientów zobaczyłem X300, którym się zachwyciłem. Bardzo lekki (1.44 kg), przyjemny w obsłudze i przede wszystkim ciągle mający to coś z ThinkPadów. W końcu decyzja zapadła, wspólnik wyraził zgodę i w drugiej połowie marca dokonałem zakupu. Dysk SSD 64 GB może nie poraża pojemnością, ale z drugiej strony w T42  mam 60 GB i nie odczuwałem braku miejsca. Co jeszcze ciekawego - karta graficzna na chipsecie intel 965, a więc przyjdzie czas na zabawę z kernel mode-setting.

Ale to później.

Póki co pozwoliłem sobie na pewien eksperyment. Przez dwa tygodnie będę korzystał w możliwie największym stopniu z preinstalowanego systemu, czyli Visty. Tak więc, nie Thunderbird, a Windows Mail (następca Outlook Express), nie Firefox a Internet Explorer (tak, prawdopodobnie jestem głupi). Jedyne na co sobie pozwolę to Putty. Jeśli więc w ciągu najbliższych tygodni nie pojawi się z mojej strony żaden commit w PLD, oznacząć to będzie tylko jedno: Umarł Vi, niech żyje Visual Studio ;)  

PS: Seems like I’ll switch to Polish on this site.

Pingwinaria 2009

Marzec 14th, 2009

Bunkry, Wii (siatkówka, samochodziki) miodzik, wifi, stołówka, rozmowy do trzeciej nad ranem …

Jednym słowem zajebiście ;)

Ajax books

Luty 28th, 2009

I just finished “Ajax bible” by Stephen Holzner. If you used ajax/php/css at least once in your projects, there’s not much you can learn from that book and you’ll probably skim through 600+ pages in less than an hour. “Ajax” covers basics of html/css/javascript/ajax/php but does not go deep into details. If it wasn’t the fact that I didn’t pay for the book — won  (ok, domelu did, but we did a trade) it on 2008 edition of Jesien Linuksowa conference organized by PLUG, I’d regret 87 PLNs you need to pay for it.

Now i’m going through Michael Mahemoff’s “Ajax Designing Patterns” – I bought this one if I recall correctly. This book is tottally different than “Ajax bible” — worth to read if you’re into AJAX. It takes more theoretical approach and assumes you already know a bit about web technologies.

Just the other day I read this quote on one of the polish bash-alike sites:

<tompaw69> djangonowy python generujacy jsony sluzace do ajaxowej generacji dom’a skinowanego przez css
<tompaw69> kurwa. a kiedys sie pisalo index.html.

which more or less translates to:

<tompaw69> django generating jsons used to ajax-ized dom generation skinned with css
<tompaw69> damn, and you just wrote index.html once.

One might think the process gets too complicated, but on the other hand,  Do you pine for the nice days of minix-1.1, when men were men and wrote their own device drivers? and people stopped expanding EMACS at somewhere around Eighty. Ram is cheap, so are disks and RAD tools are nowhere near dying. You’re expected to deploy the damn project fast, not necessary uber-optimized.

And know off to get some sleep.

Ethernet bridging with OpenVPN on vserver-enabled host

Luty 3rd, 2009

Intro

Openvpn’s ethernet bridging howto comes with simple setup scripts that you can use to bridge internal interface (e.g. eth0) with virtual one (e.g. tap0). Since standard system tools in PLD do not let you create tap interfaces, you have to care about creating one on your own. Hopefully you can use openvpn’s –mktun command line switch or handy little tool called tunctl to create one.

This has one drawback — you can’t easily use it with standard PLD interface config files (/etc/sysconfig/interfaces/ifcfg-foo). Of course you could set up the interface from rc.local, but things are getting more complicated if you are using vserver on the same machine that is supposed to act as a openvpn server.

The problem is – after you start your vserver guest systems, they have their virtual networking set up and bound to ethX (or whatever device you set them up to). If you’d try to set bridge at this time, you’d run into trouble. Not only this could cause problems with services on host system, but what’s worse – your vserver guest systems would loose network connectivity.

You could try to write your own init script and run it somewhere between networking and vserver. Slightly better, but still not perfect. Luckily, there’s a better approach.

Obiously the scenario I described above only matters if one of your vservers uses ethernet card that you plan to be a part of bridge interface. In case of ethernet bridging, this means at least one of your vserver (as it was in my case) vservers provides service to LAN.

Ethernet bridging with OpenVPN on vserver-enabled host – PLD way

In my configuration, I needed to connect two networks over Internet. I need to bridge them becase of various proprietary stuff that cannot be reconfigured. For the sake of this howto, we will name the gw machines in both locations hq and branch, each of them having two NICs, eth0 (external – internet), and eth1 (internal — lan).

hq eth0: <irrelevant>
hq eth1: 10.0.0.1/8

branch office eth0: <irrelevant>
branch office eth1: 10.0.10.1/8

There are also a few other ip addresses assigned on both hq’s interfaces — these are used by vserver guest systems.

Before we begin, make sure you have all necessary tools:
# poldek -Qiv  bridge-utils openvpn easy-rsa umlinux-tools

What we need is to prepare /etc/sysconfig/interfaces/ifcfg-br0 with slightly modified content:

# ifcfg-br0
TAP=$(tunctl -b -t tap0)
DEVICE=br0
IPADDR1=10.0.0.1/8
ONBOOT=yes
BRIDGE_DEVS="eth1 $TAP"
SPANNING_TREE=no
# eof

Alternatively you could use openvpn binary to set up tap device: “openvpn –mktun –dev tap0″ – it’s up to you. Note that if you choose to use openvpn binary, you will need to

What’s next

Once it is done, you can follow the official ethernet bridging howto – just skip the bridge-start / bridge-stop scripts. Here’s a sample configuration for hq machine (openvpn server):

# hq's openvpn config
local 1.2.3.4 # hq public ip address
port 1194
proto tcp
dev tap0
ca /etc/easy-rsa/keys/ca.crt
cert /etc/easy-rsa/keys/hq.crt
key /etc/easy-rsa/keys/hq.key  # This file should be kept secret
dh /etc/easy-rsa/keys/dh1024.pem
server-bridge 10.0.0.1 255.0.0.0 10.0.10.3 10.0.10.100
push "route 10.0.0.0 255.0.0.0"
ifconfig-pool-persist /etc/openvpn/ipp-hq.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
status /var/log/openvpn-hq-status.log
log /var/log/openvpn-hq-log
verb 5
# eof

You will also need to reconfigure vserver to bind to bridge interface (e.g. br0) — just edit /etc/vservers/$vserver/interface/$num/dev file.

1% podatku

Styczeń 27th, 2009

Jeśli jeszcze nie rozliczyłeś z fiskusem, skorzystaj z możliwości przekazania 1% podatku na rzecz Organizacji Pożytku Publicznego. Od zeszłego roku jest to bardzo proste, wystarczy wypełnić stosowne pola na formularzu PIT.

A jeÅ›li nie wiesz komu przekazać 1% podatku — rozważ proszÄ™ możliwość pomocy Dominice, której 5 lat w jednej chwili życie przewróciÅ‚o siÄ™ do góry nogami: http://www.pomocdladominiki.com.pl/ ; bezpoÅ›redni adres do strony dotyczÄ…cej 1% – http://www.pomocdladominiki.com.pl/1_procent.html

Dziękuję.

What kills small business

Grudzień 28th, 2008

An interesting post by an anonymous owner of a small company describing problems with current economics:

http://www.fivemilliondots.com/archive/2008/12/27/for-all-of-you-small-business-owners-you-can-relate.aspx

Improving my productivity

Sierpień 12th, 2008

Some of you did notice I resigned from lurking on IRC. It wasn’t easy thing to do – after all, I managed to reach up to one year uptime within my irssi session … I am still reachable though – through emails (my response time is satisfactionary), and – almost – everyday, through IM (jabber and GG). So I am not dead yet.

Now I am looking for other ways to improve my productivity. I see that I am wasting a lot of time reading RSS feeds. I think I’ll move from Akregator to some web based feed reader. Not only this will force me to switch to browser and push F5 (enough for me to not do this often), but I’ll also be able to read RSS from other places than my own laptop.

I think I should limit mailing lists I am subscribed to as well (pld* are safe). And I definitely need to stop reading spam ;)

Anyone had experience with improving their productivity?

So many interesting technologies to learn, so less time!

Next »