Monday, September 17, 2007
Wednesday, August 29, 2007
Shell date and time tricks
One of the things I hate the most when programming is dealing with time and date functions and all the special cases which exists. Even more, I have the feeling I'm walking a path many times walked before, so it becomes one of the most unpleasant tasks for me.
Fortunately, it's true, so many others walked before that path so here are some quick tricks for shell programming using the wonderful date UN*X program:
Update: This features and more are indeed described in the coreutils info manual. Thanks mp for pointing it out.
Fortunately, it's true, so many others walked before that path so here are some quick tricks for shell programming using the wonderful date UN*X program:
- Converting epoch:
- From epoch to anything else: date -d @$epoch_value +FORMAT (where FORMAT is of course as described on date(1), and '@' makes the actual undocummented trick).
- From anything else to epoch: date +%s
- Calculating times
- One day forward: date -d "1 day"
- One day backwards: date -d "1 day ago"
- Just imagine "1 month", "3 months ago" and the like. Not only google is so friendly with human language ;-)
- More format conversion: '-d' option accepts several other formats as input, even with calculations:
- date -d "1977-08-19 30 years", yeah! my 30th birthday was on sunday. Thanks date, and it was (as epoch): date -d "1977-08-19 30 years" +%s... 1187474400 :-D
- Funny ls:
You can, of course, change the way date is shown. That's because 'YYYY-MM-DD hh:mm' is also a valid input format for date as it is 'YYYY/MM/DD'.
ls -l | while read perms links user group size d t name
do
echo $perms $links $user $group $size $( date -d "$d $t 1 day" ) $name
done
Update: This features and more are indeed described in the coreutils info manual. Thanks mp for pointing it out.
Thursday, August 9, 2007
Be water (and light) my friend (part II)
Last night we were at Parquesur shopping center at Leganés, the place we are going to live in a year and a half. We had the chance to see the lights, water and music show is held there almost every summer night, so I was prepared, I had the camera and tripod at hand in prevision we would have the opportunity to take some pictures. Here are the best shots.














Monday, July 30, 2007
Night walk

This weekend, taking advantage of the full moon, we were walking without any other light (despite we carried it with us) on Navacerrada. The plan was reaching at Maliciosa to see the sunrise, but we arrived much before it and, as there was people sleeping there, we decided to go back but not before taking some pictures (Spanish comments).
Thursday, July 26, 2007
Canon EF 24-105mm
This week my friend and photo master brought me a new lens from the States among other things like a grip. The winner lens was a Canon EF 24-105mm f/4 USM L IS which substitutes the old entry level Canon EF 24-85 I used for learning until I found it was not enough sharp (is anybody interesting on it?). Anyway, it was good enough for its price and for the very begginer I was. Indeed those days I though it was a big one (at least compared to the other ones) but now it seems so little...But size well worth the difference if you take a look at the so different picture results where you can appreciate the influence of the image stabilizer.
![]() | 70mm 1/50 f5.0 | ![]() |
Thursday, July 19, 2007
Damn GFS
Just a few hours before the public release of the portal we work on one of the cluster machines get overloaded by issues no relevant for the point. The fact is once the machine started to not answer properly so it was fenced by some other node, but the problem was once this automatic action was held, the whole 6 machines GFS cluster went down letting all the machines unusable.
This, in addition to all of the previous issues we suffered on GFS, made us really thinking about purging GFS in favor of NFS. It was no an easy decision as it was fully against all our previous decisions but we weren't confident about GFS in the production systems. So we migrated it in a time record configuring everything by night so at six o'clock service would be held properly. And we managed to fulfill this purpose. We made it!
We are now tired after about 27 continuous working hours but the overall result was quite acceptable. I'm still proud about or design (not so much about my own decissions) which allowed us to make this king of changes so quickly.
But you can be sure I don't think we will never again think about installing GFS on any system as it seems not being production suitable (as RedHat even says so). And it is not only because the buggy GFS2 (at least, at present date) but for the sensation of instability all over the time we had it installed.
So in a few hours our architecture has been changed, but it was setup for the very moment we were accepting requests.
This, in addition to all of the previous issues we suffered on GFS, made us really thinking about purging GFS in favor of NFS. It was no an easy decision as it was fully against all our previous decisions but we weren't confident about GFS in the production systems. So we migrated it in a time record configuring everything by night so at six o'clock service would be held properly. And we managed to fulfill this purpose. We made it!
We are now tired after about 27 continuous working hours but the overall result was quite acceptable. I'm still proud about or design (not so much about my own decissions) which allowed us to make this king of changes so quickly.
But you can be sure I don't think we will never again think about installing GFS on any system as it seems not being production suitable (as RedHat even says so). And it is not only because the buggy GFS2 (at least, at present date) but for the sensation of instability all over the time we had it installed.
So in a few hours our architecture has been changed, but it was setup for the very moment we were accepting requests.
Monday, July 16, 2007
And ADN is out
In beta, yes: http://beta.adn.es
You will need a user (maybe 'adn' will be a good choice) ... and the password?. Ok, 'adnbeta'. And that is, you can finally see our effort results and become one of our beta testers. That will allow you to register your preferred nick in advance and reserve it for your own use.
Enjoy it!
You will need a user (maybe 'adn' will be a good choice) ... and the password?. Ok, 'adnbeta'. And that is, you can finally see our effort results and become one of our beta testers. That will allow you to register your preferred nick in advance and reserve it for your own use.
Enjoy it!
Sunday, July 15, 2007
Sunday working day
We are almost out. Quite soon you will experience a lot of changes at www.adn.es from its current aspect to a new and improved one. At least that's our hope and what we have been working for. Not all expected functionality will be included in this first release and not all the errors fixed mainly for a lack of time. But we are now in that stage when you must choose between releasing soon enough and begin competition and waiting until you can show a good enough product.
Or what usually happens: that it is finally a marketing decision not related to any technical issue.
Anyway, we were working hard today. Something that is getting on their nerves to our families and beloved girlfriends. Mine, for instance, decided to take her holidays at her village near Gredos. A very quiet and calm place I would like to be at... right now!.
At least, the project is being quite interesting, we have done (what we think is) a very good work designing everything so we expect result will be rather good. Let's see.
Or what usually happens: that it is finally a marketing decision not related to any technical issue.
Anyway, we were working hard today. Something that is getting on their nerves to our families and beloved girlfriends. Mine, for instance, decided to take her holidays at her village near Gredos. A very quiet and calm place I would like to be at... right now!.
At least, the project is being quite interesting, we have done (what we think is) a very good work designing everything so we expect result will be rather good. Let's see.
Sunday, July 8, 2007
Forgetting stress
Here goes a selection of pictures I took while trying to relax before the final release week.
Oohhhhhmmmmmmm...
Oohhhhhmmmmmmm...
Thursday, June 28, 2007
July, 13rd: new (final) scheduled release date
Do you need more information? :-)
Perfect!. That's our business.
Perfect!. That's our business.
Subscribe to:
Posts (Atom)








