Archive

Posts Tagged ‘programming’

new QT and Flying with Maemo N900

January 21st, 2010 No comments

It’s amazing. My love for flying and computers is starting to have it’s children.

I’m kinda inventive and lazy guy. When I can automate something, I don’t bother to do it. This is very annoying when I’m flying. Especially annoying when I have to recall some details. Some of these details are … Takeoff and Landing time records.

As an ex. in mastering C++ with QT on Maemo ( and I believe all other QT platforms like Symbian ) I have started developing a small help tool for myself.

At the moment it is dirt simple ( took me 3h to write and test ) , with a touch of a button it records take off time and with another touch of a button, landing time.
It’s usable now, if you wanna try ( just drop a comment ).

I will be adding also recording of this data to a text file, with basic calculations :

  • conversion to decimal
  • time for pilot logbook
  • tech log

So it’s just a beginning for me. And what a fruitful one. I never expected that I still remember that much C++ to scribble something that quickly with unknown API.

Ruby Net:Ftp file upload stalled

April 27th, 2009 Comments off

I have recently discovered that my Ruby hooks for SVN which I use as a post-commit to upload new revision to FTP server are hanging.

It looked very strange , first file was nicely uploaded but the second was stalled. During debugging process I’ve discovered that any command after STOR is ignored and hanging.

I didn’t find a reason, so had to make a short-cut and now my script does one file per connection, so it opens connection, uploads 1 file, closes it. I will have to put it in a parallel loop for performance gain.

Do you have any Ideas about it ?

Tags: ,

Some more

January 18th, 2009 1 comment

All that festive time is gone. Finally. Craze at work is also stabilizing.

Some more of Randolph Lalonde

I’ve bought the FirstLight – Omnibus and as Spinwardfringe, it kept me glued to the screen. I really like your work, keep them coming! You can get Freeground on Amazon now.

Some more of coding

I am currently writing brand new munin plugin for Bind using stats output. I had some experience with plotting bind but none of the old ones works with my system so I am writing my own.

Some more cursing

Backup Exec and Windows server – why this shit doesn’t want to backup local resources ?!

Munin Cherokee plugin

December 7th, 2008 4 comments

Looked around to find out if there is one already and I couldn’t find any.

I’ve created a multifunctional plugin for Munin for monitoring Cherokee server.

DOWNLOAD HERE

It’s written in Ruby. So far I can confirm that it’s compatible with Munin 1.3.4 and Cherokee 0.11.3 on Gentoo.

It gets data from the server_info module available under /about , which has to be set to at least normal.

Plugin graphs will appear under cherokee category and I believe it allows you to monitor multiple servers from single munin-node as it uses the host field.

Plugin can monitor :

  • Number of connections, Active, Open and Reusable
  • Number of modules Loaded
  • Data Transferred by the Server
  • Data Transfer rate, but this is just a concept as it doesn’t yield usable data after a while.

How to use it

Place it in directory like

/usr/local/lib/munin/plugins

add executable bit

 chmod +x /usr/local/lib/munin/plugins/cherokee__type_.rb

link from /etc/munin/plugins

cd /etc/munin/plugins
ln -s /usr/local/lib/munin/plugins/cherokee__type_.rb cherokee_hostname_type_conn
ln -s /usr/local/lib/munin/plugins/cherokee__type_.rb cherokee_hostname_type_mod
ln -s /usr/local/lib/munin/plugins/cherokee__type_.rb cherokee_hostname_type_data
ln -s /usr/local/lib/munin/plugins/cherokee__type_.rb cherokee_hostname_type_rate

restart munin-node

/etc/init.d/munin-node restart

Ruby on Rails on Maemo 2008 N810

November 16th, 2008 Comments off

I’ve been looking to be able to code a bit of RoR while on the go. From a few devices which I have, N810 has the longest battery run time.

So… Google gave me a nice How To from Jon Forrent, it talks about N800 but it’s the same.

I was trying to do all the steps but I just managed to install ruby and sqlite3 packages. After that Gems package installed well but it wasn’t too useful, any attempt at

gem install

or

gem update

nothing worked, left it over the night, nothing happen.

So…

Uninstalled the gem package, downloaded Real Ruby Gems in a zip file ( you will need the unzip package ).

Unzipped the file, went inside the directory. then:

ruby setup.rb --no-ri --no-rdoc

wow it installed something, now doing :

gem update

told me nothing requires update, great, now lets go with rails:

gem install rails

Amazing, installed really quick ( I would recommend not installing the ri and rdoc as well here )

Just created some test rails app and it works!
Now it’s time to find a decent text editor for it and client for Mercurial.

Xeons, Rails and some DVDs

June 26th, 2006 Comments off

So new Xeons are almost out. Can not wait until more price drops, as I need a server.

I have obtained Agile Web Development with Rails β version as a PDF and now spending most of my time swallowing it… almost last weekend I have spent on CSI: Miami and a History of violence, both great.

Ruby on Rails

May 24th, 2006 Comments off

Heard about it for a while, I have even used some of its components, with some of my small projects, which never went out of half-working stage. Recently decided, that I will give it a try. What I have done after reading a tutorial, which had more info how to install ruby and IDE, than actually coding.

And after installation ( much strait forward, than what was in tutorial ) I have created simple database with one table. To create RoR project I have used one command, which has created nice skeleton of folders with some files inside. Then I have configured database access for my project. The last step was to ‘scaffold’ a projects. And that was it. After scaffolding I was able to do CRUD on my db. I can bet, that even MS VS.net freaks spend more time to achieve what I have done in few seconds ( ok , it was more, because I couldn’t believe that it was SO! Rapid application development, and I was investigating what has been done for me ).

I am really impressed by that. I will spend more time on RoR now, and already I have big plans for it… more to be seen in time.

Tags: ,

Cairo and Evolution

April 5th, 2006 Comments off

Evolution, my Email Client, PIM of choice, got Cairo as 2D graphics engine, what might make it beautiful.

Saturday

March 26th, 2006 Comments off

So, this Saturday was kind of OK. In the morning I’ve went to the Mall and bought some food, and DVDs ( The Score – medium , Fight Club – really interesting , KungFu Hustle – really entertaining ) and watched afternoon all of ‘em.
After movies session got something to eat ( some Italian pasta ) and started to play with FontForge, which is really impressive piece of software to design Fonts.
Night was spent on trying to get to know Cairo and Mono ;) at least now I assume that I know how to draw a circle ;) . And I can start to work on my concept analog face for Internet Time watch. I always wanted to check it that concept will render useful.

SSH

March 11th, 2006 Comments off

For a long while I have a lot of ssh connections trying to login with common user names. They all fail as I have secured my ssh quite well, but there is one annoying thing about that failed connections … logs , they grow like crazy! filled with ssh messages …

Today I’ve tried some grep on my logs , to count these connections, for present week it makes around 11600 dump entries from 17 hosts… so why not block that hosts.

I’ve wrote some few liner which is run from cron, it checks for new entries in my logs , and if it finds any new hosts, this guys are added to iptables with a -j DROP

I don’t have a problem about blocking any legitimate hosts, I can always wait or just turn around to remove my self from iptables -j DROP :)

So if you are one of that idiots, remember , you have just one bullet for each of your colts ;)