Posts

Showing posts from February, 2010

Scrum Agile Software Development: Chicken And Pig Story

Image
Scrum is an iterative incremental framework for managing complex work (such as new product development) commonly used with Agile Software Development methodology. Although the word is not an acronym, some companies implementing the process have been known to spell it with capital letters as SCRUM. Maybe because Ken Schwaber capitalized SCRUM in the title of his early papers about this methodology.

How to install notify-send in ubuntu

Image
notify-send is a command to send desktop notifications to a notification daemon. It is included in libnotify-bin package, which is a library that sends desktop notifications to a notification daemon, as defined in the Desktop Notifications spec. These notifications can be used to inform the user about an event or display some form of information without getting in the user's way.

Custom Gnome Notification for your apps

Image
When you run a command that would take long time to finish, you would rather do something else beside staring at the terminal to wait until it finished to do the next procedure. In my case, if I write the SD cards for my ts-7260, I would leave it and do other stuff. Since it is easy to get distracted with so many stuff on the internet, I sometimes forget to get back to check the dd terminal. This could waste my time because the process have stopped for quite long time where I should write another card instead just right after the first card finished. Therefore, I use notify-send from libnotify-bin package to notify me about my process while I'm free to check my mail, reading, surfing and so on. Here is the screenshot of my gnome notification when it is ready. It can be done with one line of command like this: notify-send -i /usr/share/icons/Human/scalable/devices/media-flash.svg \ -h int:x:$(xrandr -q|grep '*' | sed -e 's/x.*//' -e 's/\ //g') \ -h int:y...

Print Active Network Interface List in Linux using Python

Image
I'm checking the replies of my previous code on Create network interfaces list using Python . E A Faisal suggestion to use /proc/net/dev is somehow seems interesting to me. Now, let's do some python code for fun before going out to lunch. Here is my code to get the same result as my previous python code to list the network interfaces : #!/usr/bin/python # read the file /proc/net/dev f = open ( '/proc/net/dev' , 'r' ) # put the content to list ifacelist = f . read ( ) . split ( '\n' ) # close the file f . close ( ) # remove 2 lines header ifacelist . pop ( 0 ) ifacelist . pop ( 0 ) # loop to check each line for line in ifacelist : ifacedata = line . replace ( ' ' , '' ) . split ( ':' ) # check the data have 2 elements if len ( ifacedata ) = = 2 : # check the interface is up (Transmit/Receive data) if int ( ifacedata [ 1 ] ) > 0 : # print the interface print i...

Create network interfaces list using Python

Image
While checking my email this morning, I found a python question on python.my mailing list which sound like this: Date: Wed, 3 Feb 2010 23:48:10 +0800 Message-ID: <52d26d931002030748pd2c6321p1290b1eeee703...@mail.gmail.com> Subject: showing interfaces From: Umarzuki Mochlis <umarz...@gmail.com> To: pythonmy@googlegroups.com Hi all, I wonder how I can output network interfaces with python the same way I can with these commands on linux sudo ifconfig | cut -d " " -f 1 > ifconfig.txt sed '/ *#/d; /^ *$/d' < ifconfig.txt -- Regards, Umarzuki Mochlis For those who couldn't imagine the output of those two lines command in the question, here is the explanation: The first command write to 'ifconfig.txt' the name of up interfaces which comes from ifconfig output and remove other unwanted informations. the second line read the 'ifconfig.txt' file, remove empty lines and print the list on the screen. You can read the discussion thread on pyt...