Category Archives: Miscellaneous

Tomboy: a post-it notes apps

tomboy1

 

The last time i’ve heard is that tomboy is related to LGBT community term but that was changed when I’ve encountered a semi-post it notes desktop application in Linux Desktop. Yes its a software , a note taking software that helps a lot in organizing and documenting text. I’ve used this one for quite some time. Googling for some related documents on this software, i’ve found out that its not limited to Linux OS alone, but for Mac and Windows as well.

It has a wiki link system that when you write something and decides that there will be another link on it, you just have to click the link button.

If you’re in debian based distro, just do “apt-get install tomboy” , should be automatically added in your system.

 

 

Blender: The best Opensource 3d Software

box_display.png mamagembalay.jpg fia-nathan.jpg bahaykubo2.jpg

 

 

 

 

 

 

 

I’m returning to my study now in Blender after getting bored of doing some programming task.  These various renders has been for a while and I need to get this updated starting today.  I even ordered 3 books from Switzerland just to get started this. I have few community that I get involved with online including the Blender Philippines before but I didnt get to finish my interest here as there are some pressing task that I have to attend.

Again, this is is my return to the blender software and my rendered 3d before.

 

Thanks and enjoy 🙂

 

 

Fix: Error on py2exe script when wxpython version changes

When you change the version of the wxpython and then rebuild the py2exe script you made, there were some errors that shows up and that it cant be compiled to exe as expected. When this happen,  you need to check  your “build” folder.

And then on the  at the beginning of setup.py, type the following:

# cleanup dist and build directory first (for new py2exe version)
if os.path.exists(“dist/prog”):
shutil.rmtree(“dist/prog”)

if os.path.exists(“dist/lib”):
shutil.rmtree(“dist/lib”)

if os.path.exists(“build”):
shutil.rmtree(“build”)

This should fix the problem you have.

Opencart SEO url in Nginx sample

Here is my sample URL rewriting definition for opencart SEO links that I hope to be useful on other developers running in NGINX. Notice that I have /opencart/ as the path of my opencart installation.

HTH

    location /opencart/ {
        try_files $uri @opencart;
    }

    location @opencart {
        rewrite ^/(.+)$ /opencart/index.php?_route_=$1 last;
    }

    location /opencart/admin/ {
        index index.php;
    }

    location ~* (\.(tpl|ini))$ {
    deny all;
    }

HP Compaq PC that uses Intel 82566DM network problem in Linux

The problem of this pc is upon installation of Centos 5.7, the network is up but if you ping the other pc its just saying “Destination unreachable”.

The fix for this problem is this:

 

1) Download the  http://sourceforge.net/projects/e1000/ driver from that site. Note the e1000 not e100, this is gigabit..

2) tar xfz e1000-<x.x.x>.tar.gz

3) cd e1000-<x.x.x>/src/

4) make install

5) modprobe e1000

 

After doing the the #5, do the command service network restart in the CLI.

HTH

 

PHP simple text file writer and reader code

For file writing

<?php
   $filename = "c:\\temp\\mydata.txt";
   $mystring = fopen($filename, "wb");
   $handle = fopen($filename, "wb");
   $newstring = str_replace("oldword", "newword", $mystring);
   $numbytes = fwrite($handle, $newstring);
   fclose($handle);
   print "$numbytes bytes written\n";
?>

For file reading

<?php
$lines = file('YourFile.txt');
foreach ($lines as $line_num => $line)
{
print "<font color=red>Line #{$line_num}</font> : " . $line . "<br />\n";
}
?>

Google Chrome – No space between words in pdf

In my ubuntu Natty, the rendering of my php script  in google chrome  displays without spaces between words in pdf. But if i view that on other OS like win7 or winxp with google chrome, the script will just display fine.

It turns out that the problem is i need an MS true type core  fonts on my ubuntu. So here is the command:

apt-get install msttcorefonts
fc-cache -fv

This is free anyway, you just have to agree with the EULA during installation.

 

A notes UTF8 in MySQL and PHP

According to Wikipedia, the Congo Region has 3 countries, the 2 Congo countries and the Angola.

I was tasked to list the countries all over the world and that includes the two (2) countries of Congo called Republic of the Congo (Congo-Brazzaville) and the Democratic Republic of the Congo (Congo-Kinshasa).

The addition of the dash – thing on the country to identify that separate country rendered some special unknown characters in both IE and Firefox browser. So upon seeing the content of the combo-box that contains the list of the country, this 2 country was rendered then as Congo <special character> Kinshasa and Congo <special character> Brazzaville. I thought that was just the result of the uploads via LOAD DATA INFILE command of Mysql yet when I browse the code via mysql client console, the dash stays there. Later I realize that this UTF8 thing really made that difference.

Thus using the command :
mysql_query("SET NAMES 'utf8'");
resolves that issue.