Miscellaneous Stuff


 

Custom Signals in ruby-gtk2

 It cost me a bit of time to find this out so here is a summary ..

 In order to use a custom signal within gtk2 class there are three things which have to be done.

  • register the type
  • define the new signal
  • define a signal handler
 eg:
 
class SpecialButton < Gtk::Button
 
 type_register
  
  signal_new("changed",      # name
  GLib::Signal::RUN_FIRST, # flags
  nil,                     # accumulator (XXX: not supported yet)
  nil,                     # return type (void == nil)
  Integer                  # parameter types
  )
 
 def signal_do_changed(val)
    #puts "enter do_changed"
 end
 
  def initialize 
    # your special stuff here
  end
end 

 now you can use signal_emit("changed",value) within this class and signal_connect("changed"){ #method } on objects of this class


Apache 2.2.2 for Ruby Rails on Ubuntu 6.0.6 Server

In order to run the load balancing module in Apache in conjunction with a mongrel cluster a newer version of Apache is required then is available in the standard repositories.

I have created some deb packages which work for me which might be of use to others.

IMPORTANT!!! I am NOT using PHP or PERL so I have NOT created matching packages for these modules - you are on your own there.

In order to satisfy dependencies for the apt  mechanism I have created a dummy PHP deb package which keeps apt happy.

you can find these deb packages in the download section

 


ASUS P5V-B Motherboard Serial Port Connector Pinout

The ASUS motherboard has an internal 10 pin IDC ( 9 pins actually used ) connector. 

To connect to a DB-9 connector all you need is a flat cable and connect

 IDC pin 1 --> DB9 pin 1
 IDC pin 2 --> DB9 pin 2
     ..../....
 IDC pin 9 --> DB9 pin 9

 


 

 



11/06/2009 #515