Blogs

Easy GnoCHM installation on fedora core 4 with yum

GnoCHM is a CHM (Microsoft Compressed HTML Help) file viewer. It is designed to integrate nicely with Gnome. It uses PyCHM, a Python package that exports the CHMLIB API.

  1. You will need to add the following lines to your yum config, "/etc/yum.repos.d/dries.repo":
    [dries]
    name=Extra Fedora rpms dries - $releasever - $basearch
    baseurl=http://ftp.belnet.be/packages/dries.ulyssis.org/fedora/linux/$releasever/$basearch/dries/RPMS
    gpgcheck=1
    enabled=0
    
  2. Import dries GPG key:
    # rpm --import http://dries.studentenweb.org/rpm/RPM-GPG-KEY.dries.txt
    
  3. Run yum enabling dries repos and install "gnochm":
    # yum --enablerepo=dries install gnochm
    

    This will also install all the required packages: chmlib, python-chm and gnome-python2-gconf.

Generate a dynamic playlist of mp3 files in a folder with PHP

Below is a simple php script to generate a playlist of the mp3 files placed in a folder. I have tested it to work with XMMS media player on FC4 and should work with others too. Substitute the path and the url of the music folder.

<?php
// music_playlist.php

$folder_path = './music_folder';
$folder_url = 'http://domain.tld/music_folder/';

if ($handle = opendir($folder_path)) {
   while (false !== ($file = readdir($handle))) {
       if ($file != "." && $file != "..") {
           $song_list .= $folder_url.$file."\n";
       }
   }
   closedir($handle);
}
else {
  echo "Music folder does not exist!";
  exit;
}

// send header of audio/x-mpegurl content type
header('Content-type: audio/x-mpegurl');
if (preg_match("/MSIE 5.5/", $HTTP_USER_AGENT)) {
       header("Content-Disposition: filename=\"my_playlist.m3u\"");
}
else {
       header("Content-Disposition: inline; filename=\"my_playlist.m3u\"");  
}

echo "$song_list";

?>

Related Reading: Listen to mp3 songs using XMMS in Redhat/Fedora

Nepali version of Linux ‘NepaLinux’ launched

Nepali version of Linux ‘NepaLinux’ launched - Madan Puraskar Pustakalaya undertook the Nepal component of the 30-month long PAN Localization Project, a multi-nation localization project being conducted in Afghanistan, Bangladesh, Bhutan, Cambodia, Laos, Nepal, and Sri Lanka, with the support of International Development and Research Center (IDRC), Canada. This project includes a Nepali GNU/Linux distribution 'NepaLinux' comprising of localized GNOME, OpenOffice.org, Mozilla suite, and other utilities that include Nepali Spellchecker, Thesaurus, Nepali Unicode support, etc. This distribution can be used in Nepali as well in English environment.

Now to get my hands-on and do some testing...

No volume control elements and/or devices found

Recently had a problem with my volume control applet after an up2date on FC4 which would come up with the error, "No volume control elements and/or devices found".

Doing a simple `gst-register-0.8` as root. Logging out and logging back in resolved this issue.

It registers all the GStreamer plug-ins and creates a listing of their properties so that the plugin is loaded on startup of GStreamer based applications.

Printing with HP and Linux

If you are looking to purchase printers compatible with Linux... I would suggest going with HP products as I have had no problems with configuring and priting to HP printers.

HP has an opensource Linux Inkjet Driver Project located at: http://hpinkjet.sourceforge.net/ with excellent installation documentation at: http://hpinkjet.sourceforge.net/install.php

The HP Linux Printing project provides printing support for over 300 printers including DeskJets, OfficeJets, Photosmarts, Business Inkjets and LaserJets. Check the products supported via: http://hpinkjet.sourceforge.net/productssupported.php

Php Object Generator

Php Object Generator, (POG) is an open source PHP code generator which automatically generates clean & tested Object Oriented code for PHP4/PHP5 application to access the underlying database. By generating PHP objects with integrated CRUD methods, POG gives you a head start in any project and saves you from writing and testing SQL queries. The time you save can be spent on more interesting areas of your project. Give it a try!

MyDBO Code Generator

MyDBO is a powerful object-oriented code generator for PHP/MySQL Web application developers. It is designed to remove the hassle of implementing familiar database operations (select, update, insert, etc) over and over again when creating Web applications. It creates code for accessing your database tables without you having to worry about connections or SQL queries. It also allows you to approach your database in an object-oriented fashion, thus giving you real flexibility. It uses templates to generate code, so it is also possible to create your own templates.

PLZZ LET ME KNOW HOW TO COMMENT MULTIPLE LINES IN A VI EDITOR???

PLZZ LET ME KNOW HOW TO COMMENT MULTIPLE LINES IN A VI EDITOR???

मेरो बल

आज टोफल प

Cut and paste javascript RSS feeds...

Use the dev center Feed2JS to quickly display RSS feeds on your website using only a simple javascript code that can be cut and pasted to your html files.

Syndicate content
Comment