Śr, 23 Czerw 2010 11:39:09 +0200 / blog / plone
Because of last time I am during Plone intensive course, I decided to set up my new tech blog, which could be find here: a http://dev.bluszcz.net/tech-blog with rss feed here: http://dev.bluszcz.net/tech-blog/RSS. It is a standard Plone 4 site, where I am discovering how to work with it.
Work with Plone is a big challenge, if you come after rapid development style – it is not rapid anymore, debugging is different, it’s more enterprise and so on.
This blog (bluszcz.net) will be accessible for registered users soon (also old entries), so If you are interested in access to it – just let me know and I will create you credentials.
Śr, 5 Maj 2010 15:10:11 +0200 / jabberpl.org
Since years support for raid is broken in Ubuntu. If you need details – just google for “Ubuntu reliable raid” or “Ubuntu raid boot problem” and similar.
Every time when I have hardware problems with one of my servers – I stuck at raid problems.
Today I coudn’t start properly jabberpl.org server – boot process had been interrupting and every time finished with busybox.
So, I started to digg into problem.
First, I checked if arrays had been correctly recognised. cat /proc/mdstat showed me “no arrarys”.
I tried to reassembly them:
mdadm --examine --scan >/tmp/md
mdadm --assemble --scan --config=/tmp/md
after this right was ready to work. I exited busybox and my machine was fully operation again. But without possibility to bot again ;)
Next thing which I checked was mdadm hook for initramfs, which usually is here:
/usr/share/initramfs-tools/hooks/mdadm
This file is edited and compressed version of debian one – but original one, from debian works good. This one not. So I decided to put reassembly lines at the and of the hook:
root@idoru:~# cat /usr/share/initramfs-tools/hooks/mdadm |tail -n 4
mdadm --examine --scan >/tmp/md
mdadm --assemble --scan --config=/tmp/md
exit 0
root@idoru:~#
and then I recreated initramfs:
update-initramfs -k all -c
and finally rebooted machine. Since that operation my server is able to reboot flawlessly.
Pon, 3 Maj 2010 23:26:29 +0200 / blog
After many complains on default font for entries on this blog, I have just updated CSS with some changes – more readable font and colors for forms.
I know, it’s probably still ugly, but for now your eyes shoudn’t suffer so much ;)
Pon, 3 Maj 2010 21:56:32 +0200 / python / webpy / googleappengine
Last days I am experimenting with Google App Engine, let’s call it Python Edition.
Because writing plain WSGI application is boring in long time, and I have already some Django experience, I decided to try something new. After quick research I chose web.py – a web framework for python that is as simple as it is powerful.
It has already everything what I need – simply url dispatcher + template system, called templetor. The idea of templetor is to compile template files (html + some python functions) into python sources. Because of this feature is blocked – you have to compile tempates by yourself before every deploy (even locally one). This is described here: templates_on_gae
After edition of several templates I was really tired – in 50% cases I simply forgot to recompile them… So I decided to write “a helper”. Helper is very simple, even primitive, it uses pyinotify library to detect changes in templates directory. When changed file ends with “.html” – compilation is run:
mask = pyinotify.IN_DELETE | pyinotify.IN_CREATE | pyinotify.IN_CLOSE_WRITE
class HandleEvents(pyinotify.ProcessEvent):
def process_default(self, event):
if event.name.strip().endswith('.html'):
print "compile_templates, changes detected in", event.name
compile_templates('templates')
Full script (if someone would like to reuse it) is here: nottmp
Wt, 20 Kwie 2010 21:48:42 +0200 / życie / praca / Copenhagen
Copenhagen
Copenhagen is the capital and largest city of Denmark, with an urban population of 1,181,239 (2010) and a metropolitan population of 1,894,521 (2010). Copenhagen is situated on the islands of Zealand and Amager.
With around 2.7 million inhabitants within a 50 km radius, Copenhagen is one of the most densely populated areas in Northern Europe. Copenhagen is the most visited city of the Nordic countries with 1.3 million international tourists in 2007.
Copenhagen is a major regional centre of culture, business, media, and science, as indicated by several international surveys and rankings (see International rankings below). Life science, information technology and shipping are important sectors and research & development plays a major role in the city’s economy. Its strategic location and excellent infrastructure with the largest airport in Scandinavia located 14 minutes by train from the city centre, has made it a regional hub and a popular location for regional headquarters as well as conventions.
Copenhagen has repeatedly been recognized as one of the cities with the best quality of life. It is also considered one of the world’s most environmentally friendly cities. The water in the inner harbour is so clean that it can be swum in, and 36% of all citizens commute to work by bicycle, every day cycling a total of 1.1 million km. Since the turn of the millennium, Copenhagen has seen a strong urban and cultural development and has been described as a boom town. This is partly due to massive investments in cultural facilities as well as infrastructure and a new wave of successful designers, chefs and architects. Source: wikipedia
Headnet
Headnet is a provider of portal- intranet and internet solutions based on the internationally well reputated content management system Plone. We target the public institutions as well as the private sector.
Headnet has been in business since 2000. The company was originally founded by key persons form the network “Workshop” – a creative network, founded in Copenhagen in the late 90s. We have always used Zope and later Plone as a starting point for our solutions. Today we are the company in Scandinavia that has delivered the largest amount of Zope/plone solutions.
Source: http://headnet.dk/om-headnet/headnet-in-english
Wt, 13 Kwie 2010 16:49:09 +0200 / życie / barcelona
Yes, that’s true.
I have just informed our Human Resource department, that I am going to leave the company.
Awesome :)
Pi, 26 Marz 2010 23:21:36 +0100 / c
After long time (I was trying to make Makefile crossplatform, but I failed with Solaris in short time) I decided to release sources of libplurc.
What is libplurc?
libplurc is a minimalistic library written in C, which provides API to http://Plurk.com – popular microblogging service.
You can find it here: http://github.com/bluszcz/libplurc
Enjoy!
Czw, 11 Marz 2010 10:45:25 +0100 / życie / barcelona
Patience is the virtue of asses. Abused patience turns to fury. Patience is a bitter plant but it has sweet fruit. It is easy finding reasons why other folks should be patient. Sed levius fit patientia quidquid corrigere est nefas. Patience is the ballast of the soul, that will keep it from rolling and tumbling in the greatest storms: and he, that will venture out without this to make him sail even and steady will certainly make shipwreck, and drown himself; first, in the cares and sorrows of this world; and, then, in perdition. Patience is sorrow’s salve.
And the last one.
Beware the fury of a patient man
Czw, 11 Luty 2010 12:14:36 +0100 / życie / praca / barcelona
Od ostatniego razu kiedy rewolucja zawładnęła moją głową minęło około 10 lat.
Luty, 2010. Chyba jednak polubię pracę w korporacji.
Do poniedziałku zostały raptem cztery dni…
Acha. Codziennie poznaję ludzi pragnących zaskoczyć mnie swoim spojrzeniem na świat. Zaprzyjaźniona korporacja zatrudniła nowego web developera. Koleś wydaje się troszeczkę wystraszony. Ja byłem również, kiedy zobaczyłem, jak dumnie odpalą swoją Django aplikację na uidzie 0 (yes, yes, let’s go for popcorn) oraz jak zapytał o co chodzi w SVN. Fuck me, I am pretty.
Czw, 28 Sty 2010 16:39:53 +0100 / życie / c / security
statement: If you have reached this page looking for some good coding patterns, try maybe letter ;) For know this is only information about quite good book about secure programming.
Unfortunately I don’t have commercial experience working with C language. It simply means, that every time when I am coding something I need to search for some good practices in secure coding, but not only.
Yesterday, during my short train trip to home (everyday I have to travell about 30km by train in both sides, from and to Terrassa) I was playing with string concatenation in my new project. Fortunatelly, valgrind shows no memory leaks, but friend pointed me two places where malformed input could leads into vulnerability…
So, I decided to find good source of knowledge, preferable in one [e]book.
After one hour of research I found two worh mentioning positions:
*
The CERT C Secure Coding Standard:
*
Secure Coding in C and C++, Adobe Reader
After fast investigation I decided to buy first one – almost two times bigger and focused only on C.
Today I spent my morning journey reading, reading and reading. I will try to write more about it later – but for now I can recommend it without any doubts. Many important and very usefeul information/advices/practises gathered into one place. Have a good reading.