Today I worked a little on the new NUKI versions. Finally, I brought order to her, and I want to fix it just before I release the last stable one, probably the final version. So I had the idea to check how many days is uptime on the receiver, that most of me have problems after being around for a long time, so I decided to do through 10 days a prophylactic restart. I quickly drew a conveyor to clear my days of other variables because the result of the uptime command is quite unpleasant to work with.

# uptime
12:13:57 up 30 days, 20:07,  1 user,  load average: 0.00, 0.00, 0.00

So the order in question is filtered only by the super conveyor 😛

uptime | awk -F'up' '{ print $2 }' | awk -F'days' '{ print $1 }'

As if working hours are days the result is an integer with days, and if it is hours the result is similar to

[email protected]:~$ uptime | awk -F'up' '{ print $2 }' | awk -F'days' '{ print $1 }'
1:34,  5 users,  load average: 0.46, 0.39, 0.41
[email protected]:~$

Because of which goes through a check for the type of value

if echo $days | grep "^[0-9]*$" > /tmp/null
then
   echo "Uptime in days is $days"
else
  echo "Uptime isnt in days"
fi

Simply easily and clearly in the if the construction checks whether the value contains only digits with a regular expression grep “^[0-9]*$”.

About a week ago I had to write a php project. In general, I can't share details, but it was a relatively simple thing. After I finished it, I was horrified by the result – terribly napsian code, carpentry, no finesse, the only positive thing was, that it is reliable. But I don't like it that way, I love writing in a nice way, and not with the ax chopped and hammered. Okay, that it is not publicly available, that otherwise I would have died of shame. I attribute such a lost story to the writing of bashs in the last half year and the total lack of more objective techniques in programming.. As of yesterday, I have started a fundamental refresh of my knowledge, that soon I will have new teasing tasks and I will not lie like a muffin maker with an ugly code. After a few hours of reading, I remembered the object model in php, I had learned that no matter how stupid php (which opinion I do not share) has an extremely decent object model.

I had lunch. I got in the car, I turn the key – ignite immediately. The engine rattled, fuck the sound of the 6 cylinders is unique. I opened the ceiling hatch, although it was not warm the weather I love as my car is naturally light. The sound of the muffler became even clearer and more pleasant. Indeed, even the sound itself creates the pleasure of sitting in it. Slowly I released the clutch as soon as the traction of the 130 horses was felt. I slowly got out on the main road to my work. The road is almost perfectly smooth to move at a speed several times above the allowed. However, I cut it in just 10 seconds, the pleasure of the 2nd c 7000 rpm is unique – the noise is from a real powerful ferocious machine that creates the feeling, that you fly. Besides, I almost fly at 100 km / h. I'm getting smaller! I will soon reach the bus station and then a crossing awaits me. Passing through the bus station, a boy and a girl move holding hands. The girl turns and follows me with her eyes. I have reduced almost to 0 to cross the crossing. I abruptly apply gas at the exit 2 girls almost magnetically turn after me. Nastinagm shiny new car next to a school. There I leave a place that turns left and a footpath awaits me. Waiting at the crossroads, I am greeted by acquaintances who rejoice at my jewelry. I set off now well warmed up and the horses under the hood even more alive, he hurriedly glued me to the seat, several times. I reach the office and imperceptibly zigzag between the parking lots of the cars. The stability of the road is astounding! I slowly get her on the sidewalk and wait a few seconds, his damn sound is so beautiful dense and scary, it's as if you hear an uncle scolding you and he's ready to scold you at any moment. I turn off the engine and get out. I turn and smile, fuck and I'm lucky this is my vehicle!

http://www.youtube.com/watch?v=7vhamVyv6Og

I think the time has finally come when I will say goodbye xmms . For many years, this was my favorite player for a lot of reasons

  • cure
  • fast
  • killed and simple interface
  • without unnecessary functionality

what does a person need more 😉 Unfortunately, he grows old separately, that is e i GTK1, abe is already more than obsolete. Отделно почна да има склонност към бъгове с новия GNOME 2.28. Винаги съм обичал winamp like плеърите. For a hell of a long time, Linux lacked such the only alternative, which was not enough audacious kotio was a hell of a buggy and super unpleasant to work with, especially in his new 2nd version, he was banging for good and bad. But a few days ago I came across QMMP from the very first start I was impressed by the interface – just the way I like it. I worked and saw that it was bug-free, there is also a plugin for LAST.FM built into it which is even more pleasant. It's also very important made in russia 😉 and there are no problems with the maintenance of CP-1251. After the second day of working with the stable version, I want to test the beta and at least see some bugs 😆 . The player turns out to be far better than I expected. I have already become a master of all machines, I gutted everything else that is unnecessary and freed up space 😀