24 Ocak 2014 Cuma

LPIC-1 Certificate

LPI (Linux Professional Institute) is much recognized Linux certifications exam around the world. It has three ceritification levels. You can take the exams via internet or Lpi exam center.

I passed LPI-101 exam a few months ago, my advisor suggested to me for study Lpi-certificate. I used a Lpi exam e-book and this tutorial. I used this tutorial for boot process, it includes wide information. I studied quite good for Lpi 101.

A few weeks ago, I took Lpi 102 exam. I could work less for topics :(. But this time I did some test before the exam.
[1] http://www.penguintutor.com/quiz/
[2] http://www.gocertify.com/quizzes/linux-practice-questions/linux-lpi102-lx0102-quiz.html

This test includes little bit different questions, some of them very easy but some of them very diffucult really :) Recently I got an email from LPI, I've passed 102 exam and I have LPIC-1 :)

Probably, I'll work for Lpi 201. I like to work about Linux. I think working exam process more efficient for me. If I work as individually just for wondering and learning Linux ability, I can forget more easy. Working for certificate I learn more permanently.

23 Aralık 2013 Pazartesi

Internet Conference - 2013

In 9-11 December, Internet conference was organized eighteenth time in Turkey. I could join just last day. I listened two panels. Also I made the presentation with Tülin. We mentioned about "How can we contribute to Linux Kernel?" 

I contributed to Linux Kernel this year, and Tülin interned at Gnome Opw last summer. She has studied about Linux Kernel during internship. So we told our experince about Linux Kernel hacking. We mentioned about mutt usage, git tips, patch file format, sparse, checkpatch.pl.

We prepared a report that includes what we talked about at presentation. You can read it from here and also watch a video from here.

2 Aralık 2013 Pazartesi

Getting Notification From Watchdog

Nowadays, I've use Watchdog which runs as a deamon. We can monitor something in system using Watchdog. I used Watchdog Python modul for my project. I monitor file changes.

I think, Watchdog has lack functional features. For example; I move file from watched directory to outside monitored directories, watchdog doesn't trigger any event. And when I modified any file in monitored directory, it triggers "deleted, created, modified" events. But it should trigger only "modify" events. About same lacks there are opened issues in github repo.

I used watchdog in two projects. One of them sends email notification when any file or directory changes in "/etc". You can see it here. Also, I didn't any contribute to watchdog yet but I think contribute to watchdog.

29 Kasım 2013 Cuma

Free Web Technologies Days 2013

Last weekend, organized Free Web Technologies Days at Yeditepe University. Main subject of the activity is "Scability". I joined the activity with my advisor and my friend, they are from my university.

I made presentation about how can we write plugin for Nagios. I worked on nagios-plugin-couchbase project a few months ago and I mentioned the project at presentation. I told basics of Nagios, Couchbase and NoSQL. I was very excited during my presentation. Actually, this is my second presentation. I had made a presentation before at Muğla University, that's about how can we contribute free software. I had contributed last year for Gnome tools. At Muğla University, audiences are generally students so I was excited less then at Yeditepe University.

I think, I can more comfortable/calm my next presentations. I should have consumed 20 minutes at presentation, but I've told 12 minutes :). And I liked gifts that are t-shirt and notebook.




7 Ekim 2013 Pazartesi

Ruby Gtk3 Binding Tutorial

I want to work on a project using Gtk3 & Ruby so I looked up tutorial about Ruby & Gtk3. But I couldn't find anywhere. Actually Ruby & Gtk3 binding available here. We can use it installing Gtk3 gem.

Before I studied using Gtk2 & Ruby and utilized zetcode and Ruby Gtk2 page.
Zetcode has some samples about Ruby & Gtk2. I thought, I can convert Gtk2 samples to Gtk3 at Zetcode so I can see differences between Gtk2 and Gtk3. Because really Gtk3 is necessary for my project.

 I tried to convert and got errors. Some errors outputs are very clear, I could figure out them. Some errors aren't clear but I could figure out them using PRY interactive shell. It is very usefull, It is more than better IRB shell :) I added differences between Gtk2 and Gtk3 below. I put Gtk3 examples to my  github repo and I explain differences between Gtk2 and Gtk3 on my github repo. If I can find new differences, I will add them to github repo.

Horizontal And Vertical Scales
# deprecated -> scale = Gtk::HScale.new
# use Gtk::Scale.new(:horizontal, *args)

scale = Gtk::Scale.new(:horizontal)

Button:
# deprecated -> button = Gtk::Button.new "About"
button = Gtk::Button.new(:label => "About")

Color Selection Dialog:
# deprecated -> cdia = Gtk::ColorSelectionDialog.new "Select color"
cdia = Gtk::ColorSelectionDialog.new(:title => "Select color")

colorsel = cdia.color_selection
# color = colorsel.current_color, .current_color returns Gtk::Color but it should return Gdk::RGBA
color = colorsel.current_rgba

Font Selection Dialog:
# deprecated fdia = Gtk::FontSelectionDialog.new "Select font name"
fdia = Gtk::FontChooserDialog.new(:title => "Select font name", :parent => nil)

# deprecated if response == Gtk::Dialog::RESPONSE_OK, you can use Gtk::ResponseType::OK
if response == Gtk::ResponseType::OK

# deprecated -> font_desc = Pango::FontDescription.new fdia.font_name
font_desc_ = Pango::FontDescription.new fdia.font_desc

@label = Gtk::Label.new "The only victory over love is flight."
# deprecated -> @label.modify_font font_desc
@label.override_font(font_desc_)

Dialog Response Type:
# deprecated ->  md = Gtk::MessageDialog.new(self, Gtk::Dialog::MODAL |
# Gtk::Dialog::DESTROY_WITH_PARENT, Gtk::MessageDialog::ERROR, 
# Gtk::MessageDialog::BUTTONS_CLOSE, "Error loading file")
md = Gtk::MessageDialog.new(:parent => self, :flags => :destroy_with_parent,
                            :type => :info, :buttons_type => :close, 
                            :message => "Download completed")
                            
# deprecated -> Gtk::MessageDialog::ERROR, you should use :error
# deprecated -> Gtk::MessageDialog::QUESTION, you should use :question
# deprecated -> Gtk::MessageDialog::WARNING, you should use :warning

Window:
window = Gtk::Window.new
# deprecated -> window.set_window_position Gtk::Window::POS_CENTER
# you can use :center or Gtk::Window::Position::CENTER
window.set_window_position(Gtk::Window::Position::CENTER)


# deprecated -> window.modify_bg Gtk::STATE_NORMAL, Gdk::Color.new(6400, 6400, 6440) 
window.override_background_color = :normal, Gdk::Color.new(6400, 6400, 6440)

Vertical And Horizontal Box:
# deprecated -> vbox = Gtk::VBox.new false, 5 
vbox = Gtk::Box.new(:vertical, 5)
# deprecated -> hbox = Gtk::HBox.new true, 3

# deprecated -> vbox.pack_start halign, false, false, 3
# 'Gtk::Box#pack_start(child, :expand => true, :fill => true, :padding => 0)'
vbox.pack_start(halign, :expand => false, :fill => false, :padding => 3) 

Table:
# deprecated -> table.attach Gtk::Button.new("Cls"), 0, 1, 0, 1
table.attach Gtk::Button.new(:label => "Cls"), 0, 1, 0, 1

# use Gtk::AttachOptions::FILL instead of Gtk::FILL
table.attach(halign, 0, 1, 0, 1, Gtk::AttachOptions::FILL,
             Gtk::AttachOptions::FILL, 0, 0)

# use Gtk::AttachOptions::EXPAND instead of Gtk::EXPAND
# use Gtk::AttachOptions::SHRINK instead of Gtk::SHRINK

PixBuf & Image:
bardejov = Gdk::Pixbuf.new(:file => "sample_image.jpg")
# deprecated -> image1 = Gtk::Image.new bardejov
# all options
# image1 = Gtk::Image.new(:stock => nil, :icon_name => nil, :icon_set => nil, 
# :gicon => nil, :file => nil, :pixbuf => bardejov, :animation => nil, :size => nil)
image1 = Gtk::Image.new(:pixbuf => bardejov)

# deprecated ->  newi = Gtk::ImageMenuItem.new Gtk::Stock::NEW, agr
newi = Gtk::ImageMenuItem.new(:stock_id => Gtk::Stock::NEW, :accel_group => agr)

# deprecated -> newi.add_accelerator("activate", agr, key, 
#                                    mod, Gtk::ACCEL_VISIBLE)
# you can use ":visible" instead of Gtk::AccelFlags::VISIBLE
newi.add_accelerator("activate", agr, key,
                     mod, Gtk::AccelFlags::VISIBLE)

Tool Button & Bar:
# deprecated -> newtb = Gtk::ToolButton.new Gtk::Stock::NEW
newtb = Gtk::ToolButton.new(:stock_id => Gtk::Stock::NEW)

# deprecated -> toolbar.insert 0, newtb
toolbar.insert(newtb, 0)

Draw:
darea = Gtk::DrawingArea.new  
# deprecated -> @darea.signal_connect("expose-event"){..}
darea.signal_connect('draw'){...}

Combo Box:
# deprecated -> cb = Gtk::ComboBox.new
cb = Gtk::ComboBoxText.new

29 Haziran 2013 Cumartesi

UNIX Manual Page Editor: RManEdit

RManEdit is a editor to prepare man page. I used Ruby & Gtk for RManEdit. RManEdit has many features like other editors. You can get more information from  here.




27 Haziran 2013 Perşembe

Nagios plugin to monitor Couchbase

I've created CouchBase plugin for Nagios. I used Python for plugin. I put plugin in Github. You can access here. Nagios Plugin Couchbase is available under the GPLv3. Your suggestions and feedbacks will be valued and highly appreciated.


Nagios plugin couchbase supply to monitor a lot of summary statistics:
Cache miss ratio, creates per second, disk read, high and low watermark, set per second, memory usage, operations per second..  etc.

You can monitor vbucket resources with option "--vbucket". You can see all option using "--help" parameter and you should read from Readme for more information about usage. And a screenshot: