Sunday, December 30, 2007

being a dictator syadmin: blocking sites using squid

Sometime, it's hard to be a sysadmin, because sometime we have to do evil thing. A good example is, blocking sites, that, have legal use, but some one high above, want it so.

In squid, the is a squid.conf, which should be resided, in your configuration directory. In my example, my network server running fc 7, using squid from repository, so the configuration is in, /etc/squid

In the squid.conf, comes 2 directive, the acl, and http_access. Just below the acl to your own network,
which should be
acl something src "a list of ip"

From this line, there is 2 way to blog a site
First Way
Add the following:
acl evilsite dstdomain somesite
acl deny evilsite

This is not a bad idea, except, for all the site, you want to block, you will have to add one by one.
Make a messy configuration file, more messy.
another way is to create a file with a list of bad ip.

Second Way
first as root create a text file, which I just put it in the same directory as squid.conf. And fill it with the ip you want to block, separated with a newline.
Which in my example, in my squid configuration directory
touch restricted-site.squid
This will create a empty text file
echo "http://evilsite" >>restricted-site.squid
This will add the a line in restricted-site.squid
do it again, by change http://evilsite. with another site.

then create a new acl in your squid.conf
acl badlist dstdomain "yourlistfile
http_access deny badlist
Now this way, you can just add a site, to the restricted file, with messing with the already messy, squid.conf

p.s This is tested on a server I manage, which runs fedora. Not my laptop which runs ubuntu

fun with bash: append text to a file

There is time when we need to edit a file on linux, or unix for that matter, and usually a configuration file. And to me at least, it is usually append to end of a file.

On the other hand, unix got many many, text manipulating utilities, and often, one liner to do text manipulation exist. From cat, to sed. And some an echo will do.

To append a line to a file, it just
echo "your text">> yourFile
here's a bit explaination, in layman term
echo "your text"
will by default, print to your screen, which comes to
>>
which means, redirect output to, somewhere. Another variation is, >, the difference is that, this will replace, the whole thing. >> will append
>> yourFile
means redirect to your file.

And there you go, a one line to append a file.

Saturday, December 29, 2007

fun with python: running programs using popen

Yesterday, I run unix command, by using the command modules.

It turn out that there is another way, and more importantly cross platform. So it will run on windows.

Python provides a set of modules for generic operating system service. In the os module. And in it is a popen() function. Which can be used to call program,

so to run a program using popen, using "ls ~" as an example, it can be many program:

import os
comm=os.popen("ls ~")
for line in comm.read():
print line

which will print the output. But for some reason, cat a file don't work. You don't really need to print an output, you can just use it to run a program.

Friday, December 28, 2007

fun with python: running unix command with commands module

One of the best thing in python is, the fact that it have a "battery included", this I really believe.

There is a few ways of running system command on python. There is the popular, execl, execlv, etc in the os modules, which is cross platform.

There is also a commands module. What is cool about it, is that, it will generate output. Where as execl, will exit python shell, back to the parent shell. Meaning, it's easy to write code that read an output of a command, and put it in a front end of something. While it is cool, the command module comes with a cost, it's only available for unix like system, such as linux, bsd, and other unix.

Here's an example, assumes that you already started python, in python shell, either in terminal, or idle, type

>>> import commands

this will loads the modules, now type

>>> commands.getstatusoutput('ls /')

you should get something like this:
(0, 'bin\nboot\ncdrom\ndebian\ndev\netc\nhome\ninitrd\ninitrd.img\nlib\nlib32\nlib64\nlost+found\nmedia\nmnt\nopt\nproc\nroot\nsbin\nsrv\nsys\ntmp\nusr\nvar\nvmlinuz')
the output depends on the system you have. the first part of the tuple is the exit code, which since the code successfully executed, it's 0. the second part is the output of the command, separated by \n.

Now type

>>> commands.getoutput('ls /')

you should get something like this
'bin\nboot\ncdrom\ndebian\ndev\netc\nhome\ninitrd\ninitrd.img\nlib\nlib32\nlib64\nlost+found\nmedia\nmnt\nopt\nproc\nroot\nsbin\nsrv\nsys\ntmp\nusr\nvar\nvmlinuz'
the output differs between system. now you get a string again separated by \n.

last methods that is available to the commands module is. getstatus, this can only run on an directory:

>>>commands.getstatus('/')

the output should be something like this.
'drwxr-xr-x 23 root root 4096 2007-12-11 13:21 /'
What's interesting is, it getoutput, and getstatusoutput, applies to many system command(if not all).

interesting example that I do. This is to print the result of ping, interesting example

import commands
s=commands.getoutput('ping google.com -c 10')
#i try to limit the command to make sure it stops
l=s.split('\n') #because it's separated by \n
for line in l:
print l


another interesting thing to do is, is to get cpu info, nothing that cannot be done, using open, since it uses the proc filesystem(gotta love /proc) but still it's interesting.

import commands
s=commands.getoutput('cat /proc/cpuinfo)
for line in s.split('\n'):
print line


the commands module is an interesting way to automate stuff on unix. Pity it doesn't work, on windows. But still it's fun, and interesting. Something the original unix principle.

Alternative OS Adventure: Haiku Video

Found a few video, on beos,includes the one from the original beos.



part 1, from be corp





part 2








a demo of haiku, but not by me


Alternative OS Adventure: Haiku On kubuntu Qemu

In the last century, as in 10 years back, was an operating system, totally start from scratch. With the goal of being user friendly, multimedia capable. And in the process of development develop many new operating system concept. It is said that, it is one of the candidate for replacement of the mac os in the 1990's. In the end they choose, nextstep, a type of unix, which ends up as os x

Unlike most system, the os is designed for modern, hardware, so it already have multiprocessor support, 64 bit journaling file system. Really, compared to most commercial desktop OS, it is modern.

Either way the company failed. The fan disappointed. And a few project to recreate the BeOS is created.

Here I use haiku. Which currently in alpha. First thing I see from the boot screen. Quite nice. And on qemu, it booted quite fast. By then it still quite new. Another thing is the shell. Don't fools by it's look, it is actually bash, the shell that is the same on unix.

The desktop is very simplistic, and the layout is different, but very nice. Ubuntu user get used to start button on the top left, and windows on the bottom. Windows on the bottom, and the start button on bottom left. Haiku is different, everything is top right.

Not much application on beos yet. By then it is alpha, and the disk image is just 26-27 meg. Not much here. By then there is a lot of demo to play around.

To run it on qemu on ubuntu,
get the nightly build from
http://haiku-os.org/build_factory

get the raw disk image.
then unzip it, there is 2 ways to run it. one is using command line
qemu haiku.image

or you can use qemulator, like my previous post here.

p.s there is vmware image for use for well vmware and virtualbox

more resource on haiku
http://haiku-os.org/

Qemulator: a front end for qemu.


One of the most popular open source virtualization soft is qemu, arm with kqemu, it can be about as good as vmware. Most probably recognize that qemu don't really have a front end. But it does, Qemulator is a front end for qemu.

Use an example from haiku.


just click on the + on the main menu, then fill in the name,
then open the image file. Then you done. You should have a virtual machine to run.








To install on ubuntu, it just a matter of:
sudo apt-get install qemulator

make sure you have qemu first. Which probably installed as a dependency anyway.

Wednesday, December 26, 2007

network diagnostic using mtr


There is a few ways to diagnose network problem, and tools like ping, and traceroute, are indispensable for the task.

Here's another tools that, is useful. mtr. mtr can be seen as a combination of ping and traceroute. When started it runs as a ncurses program. And what make it interesting is that, it shows the result, live. To me it's interesting. There is 2 version in the ubuntu repository, one is mtr, another is mtr-tiny. The version I use, is mtr-tiny, which do not have x11 support. to install it on ubuntu, is a matter of
sudo apt-get install mtr or sudo apt-get install mtr-tiny

To run in is a matter of
mtr destination(could be address or URL)
or to leave ncurses, useful if you want to redirect the output to a file.
mtr -r destination
or to run on certain cycle
mtr -c 10 destination
or you can combine it
mtr -c 10 -r destination
What interesting is that, when I run it, I noticed some interesting stuff, my route from my home to google always changing. Maybe it just me.

openkomodo: an open source, code editor


Open Komodo, is an initiatif, by active state, to open source some of their software. Open Komodo is essentially Komodo Edit. A shrink down version of their IDE. So what happens here is that, they open source thei Komodo Edit, which is cost free anyway. But not much of an ide, but good enough for most task.

The editor, support quite a number of language, such as python, ruby, java, and a few. One notable exception is PHP, which is not in the list. Been testing it with python, because been playing around with django.

The basics is there, such as organize as project, code completion, which is totally useful. But the code completion feature, is a bit not quite there yet. Some code in the directory cannot be imported, using import. don't really work.

Compared to ide, it is a bit barebone, but by then it is a bit like GUI version of emacs, and vi. Probably the reason, why I think it is quite fine.

One thing is it is still alpha, but it quite usable to me now. Probably there is more to come in the future.

One cool thing is, to install open komodo, on linux, any linux, just run the shell script, in shell, chmod +x install.sh
then
./install.sh.

It will copy to your home directory, and create a shortcut at the desktop. to remove it, just remove the Directory created and the shortcut. It's in the README file,

You can get Open Komodo here
http://www.openkomodo.com/

Saturday, December 22, 2007

me and my realplayer adventure

I noticed that, there is version of real player on helix community site, for amd 64.

http://forms.helixcommunity.org/helix/builds/?category=realplay-current

Which can be found here. Well it is a nightly build, but it is there for sometime, so it show how ignorant, I am.

One thing I tested is, the playback is not choppy anymore, and with sound too. Also with alsa support. What sucks, the sound, it so machine like. Need to figure out the right alsa configuration.

Just Modded My Ubuntu Desktop


Screenshot
Originally uploaded by sweemenghacker
The days when I Modded the Desktop. This is what happen when someone is bored.

The Bar below is actually awn, avant windows navigator, Look Deceptively like apple doc, which actually not, I look like one, it is function more like a taskbar, Which all sort of plugin.

To run awn, you will need to have compiz. It is actually a prerequisite.

The installation guide is here. http://www.ubuntugeek.com/howto-install-avant-window-navgator-in-ubuntu-gutsy-gibbon.html

Note, it is very ubuntu specific, and need a lot of command line, which scares a lot of user. And yeah, install the extra plugin too, it look a lot nicer with it

Thursday, December 20, 2007

photo management (k)ubuntu

One of the thing in life, that we have a lot on our computer is Photo, (no) thanks to the invention of digital camera.

On windows, most of the solution revolve around Picasa. On linux, or most other open source os for that matter, there exist a few.









1) F-Spot









It's a photo manager for gnome desktop. It have a few features, such as tagging, arrange the pictures based on the time, slideshow, a few photo touch up.

All is easy to use. But in term of features, it is a bit lagging. But for most of the task, it is good enough to use.

It is comes with ubuntu when you install ubuntu. But need to install if you use kubuntu, just type "sudo apt-get install f-spot" in terminal


2) DigiKam1. phto edit mode 2) gallery


This on the other hand, is an kde application. Have most of the features, as F-Spot. But it have more features.

Among of it are, import directly from camera, export slide as mpeg, export as remote gallery(which post a gallery online), geolocation, export to ipod etc.

In term of photo touch up, there is more than fspot. For one more effect. Such as decorate etc. But you need to select edit, by right click it.

Kinda reminds me of Picasa.
It comes with kubuntu, i think, if it doesn't just type, "sudo apt-get install digikam" from terminal

3)Picasa








1) photo edit 2) gallery

Picasa is a free (in cost) software from google, and have been runnning on linux for a year. What make it interesting is, it is a way to build the software with wine, so that you can run it on linux.
Yes, picasa is still windows app, but combine with wine to make it runs on linux.

Feature wise, it have all the feature of digikam, and fspot. Except on the latest beta, it integrates with picasa web album. Also the collage feature also a nice thing, and integrate with blog. But some of it didn't really work yet.

One nice thing is that, it have a nice interface to manage and edit the photo. What sucks, it doesn't work as well as the windows version. And not open source. Also the only 64bit version is the latest beta.

http://picasa.google.com/linux/download.html

4) End notes
There is no verdict here, just to show the options available

For 64 bit ubuntu user, the only version of picasa that will run on 64bit machine is, the latest beta. So just download the AMD64 .deb file

Wednesday, December 19, 2007

playing with simh: running unix v5

One of the thing in computer history that I'm fascinated is unix. It's one of the most important Operating System, that most people today didn't use. And already have many concept, that is added much later time, in commercial PC operating system. And it already have the concept of code sharing, before Free Software or Open Source exist.

Pretty all of the resource is from this article. Except my opinion

To simplify the step.

1) download http://simh.trailing-edge.com/kits/uv5swre.zip
2) unzip everything
3) create a pdp11.ini

set cpu U18
attach rk0 unix_v5_rk.dsk

3) then run the pdp11 emulator. This I assume that you installed simh already.
note: on windows you might need to copy the pdp11 emulator, from simh, to the same folder as the unix.

you should see the following. prompt

PDP-11 simulator V3.7-0
Disabling XQ
@

just type unix

which shows
;login:
, then type root. Now you should see the familiar root shell.

But note it's not a unix as we know on linux, or bsd, or any modern unix(i think), for example there is no cd, it's chdir. And many thing is not there, or very different.

But that's unix. What cool, is that, it contain the source code for unix as well. And amazing how to stuff the OS, in a relatively small package

Tuesday, December 18, 2007

playing with simh: need a manual to run cp/m

After a little adventure yesterday, what next?
Actually I'm not sure how to run cp/m 2.2, so I find a manual, which is the link below.
http://www.cpm.z80.de/

Which is interesting, because where is original, 8800 software anyway?

Few more links worth mentioning,
http://www.classiccmp.org/dunfield/altair/altair6.htm
Here, is the manual to operate, the altair.

playing with simh: running altair 8800

One of the consequence of reading "Fire In The Valley", is the urge to run an Altair, even an emulator is good enough.

Last post involve, installing simh on ubuntu. And links to download.

The first part of my altair 8800, is to get the os and software to run. You can get the software of altair here. I'm not sure, how to run the original 8800, which uses the 8080 processor. But the z80 version of the emulator works.

The links have the have the emulator, and cp/m2.2 bundled together. And other software. Since I already have the emulator, just download cp/m2.2 .


This is the cp/m shell, aka the dos shell


To run it on ubuntu, unzip the cp/m 2.2 folder. And at the same directory, run the emulator. That is open terminal type, altairz80. It will open the emulator. Then under the sim> shell, type "do cpm2".

On windows, just unzip the cpm2.2 zip file, into a directory, and put the emulator there too. To run the emulator, click on the emulator, then type "do cpm2"

And well play around, with basic

playing with simh: aka fascinated with computer history

After reading "Fire In The Valley". I wanted to see how an Altair work. Since I am not rich, so I can't get my hand on an Altair. The next best thing is an emulator. Such an emulator exist for quite sometime, and more importantly it's open source, and available on Ubuntu.

Simh is not just an emulator, it's actually a set of emulator, that emulate a number of ancient machine, that I wanted to get a hand on. Such as a PDP-11, which is used to run the first UNIX.

And to install it on ubuntu is again a matter of
sudo apt-get install simh
What make it interesting is that, each machine emulated is represented as an executable, so calling an emulator, is a matter of calling the right program, for example, running an altair is a matter, of running the program, altair on linux, altair.exe on windows.

And there is a windows version too. One reminder, it only provide the emulator not the os and program.

http://simh.trailing-edge.com/

The links provide the emulator, source code, and windows executable.

There is links to the program that are needed to make the emulator useful

Monday, December 17, 2007

Fire In The Valley, a very good book

I'm currently in the Main Library of University Of Malaya. One of the best things here is that, sometime there is treasure in this library, and no one bother to borrow it. Most just get references, past exam papers, academic books.

Treasure, the book "Fire In The Valley: The Making Of Personal Computer" is such a treasure. It have inspired, the film "Pirates Of Silicon Valley". But really, The book is a lot more.

It describe, on the age of computer hobbyist, the MITS, and some old microcomputer company, that don't exist anymore, such as IMSAI.

I won't all it a text book, but still it is an interesting read for computer history buff like me.

Sunday, December 16, 2007

Ajax Chinese Chess

It's actually not many computer chess game in the market. By then I'm quite ignorant on software written in chinese. It's kinda fascinating to check out this game, since I study a lot of computer chess technique for my thesis. It's also fascinating to see that, chinese chess is not quite solve. Which make it interesting to me.

Either way, here is a chinese chess, on ajax,
http://ajaxchess.pragmaticlogic.com/

Saturday, December 15, 2007

cutegod, a fun but laggy game


Yesterday, from The Linux Game Tome, a game got release. It's called cutegod. It's an interesting game, in a few way, one it's from a prototyping challenge from lostgarden.com .

And two, it's written in c#, using mono. Which don't happen frequently. On the positive side, you can run it on both linux, windows. And probably bsd, and mac os x too.

The storyline, you are a god, a child god, which your parents give you a small universe, as gift.
This universe, of course have people. Which have need, simple needs, which they try to get prayer. You as the god of that world(or universe) answer the prayer.



The world

The first thing you see in the world is, people and the tile. The prayer is in form of heart, in the speech bubble, Once you click on it, you should able to see a pattern, on the top left of the screen. Your job, is to rearrange the tiles, to fit the pattern. For every prayer answered, and the pattern arranged correctly, you will be awarded a chest with treasure of sort, and also a good graphics for what your follower come up with the land you rearrange. Here's the catch, there is restriction on where you can put the tiles, which should be found easily, by playing around.


The result, of rearranging the world

Sometime this game can hang the system, kinda reminds me of beagle. By then it's still in alpha stage. By then both is written in c# in mono. Based on my experience, Program written in mono, can be slow, on linux. By then, it's based on beagle.

What's cool: simple game play. Fun. Open Source. Cross platform, so there is windows version too.

What sucks: It have tendency to hang the system. Still in Alpha stage.

To get it:
http://mfgames.com/games/cutegod/
A bit on the history
http://lostgarden.com/2007/05/cutegod-prototyping-challenge.html

Last note:
1. To run the game
You will need the game, and the game data. Once you unzip the game, and unzip the game
data. Copy the game data, into the game folder.

2. Installation on Ubuntu

Before you are able to run the game on linux, few thing is needed. mono's windows.form library, another is DevIL, Developers Image Library, freeglut. I think that's all.
On ubuntu install this:
sudo apt-get install libdevil1c2 libmono-winforms2.0-cil freeglut3
To run the game, assume that you have both the game and the data(the Assets folder, should be in the same directory as the game),
Run the game using the perl script provided using terminal, it's named cutegod.

Friday, December 14, 2007

mame game on ubuntu redux: kxmame configuration

Actually before you are able to run mame, assume that you already have a game.
you will need to configure kxmame. It would be under settings, directories

What next is to add the directory where you have your roms. For me I just create a folder called mame.

lastnote:
Once you get your rom, in the directory, copy the whole directory to the mame folder. Or what ever name you add to kxmame. and copy the bios file to the roms directory

mame game on ubuntu


One of the fun thing on linux, that i do is mame game.
mame emulator is in ubuntu repository for sometime, the interesting is, there is no frontend for gnome. But a very good front end for mame on linux is, kxmame.

to install on ubuntu, run
sudo apt-get install xmame-sdl xmame-tools xmess-sdl
to install kxmame just run
sudo apt-get install kxmame
here's the catch, you need to find the rom yourself, and you will need to find the bios too

Wednesday, December 12, 2007

postgresql adventure: part 4, the graphical frontend


There is a graphical frontend for postgresql, the pgadmin. This is a frontend that pretty much do anything, and really depends that whether you have enough privilege to do certain task.

Here you can write procedure, create(and drop) database, create tables, create schema, privilege etc.

To create a table on your database. it is a matter select your database on the left side. then under the schema, which should be public, unless you created other schema. Then under it is a set of many thing, that I am unsure of.

You can create a table by right click on tables, and click new tables



And it shows a table editor. Which make life easier for gui oriented user.

To install pgadmin 3 on ubuntu.

It is.
apt-get install pgadmin3

Tuesday, December 11, 2007

postgresql adventure: part 3, a bit on the sql

Actually I did this sometime ago for my ruby on rails experiment. On my ubuntu machine

To start on creating the database, on postgres, as I said before, is very unlike mysql. In mysql, it is calling createdb on mysql shell. On postgres, you call on shell:
createdb databasename
if something happen and you want to drop it, it is done by calling
dropdb databasename
then you call
psql databasename
here i assume, that you create a user, in postgresql server that is your name. Suppose the above command doesn't doesn't work, do this, which I only tested on ubuntu, on other you might need to login as postgres user:
sudo -u postgres psql
now you can create tables, which again, very different from mysql. With many similarity as well.
in the psql shell, create table like this:
create table contact(
id serial primary key,
name varchar(255),
address text,
email varchar(255)
);
Which very similar with mysql, except, why id is serial?
Well, it turn out that, there is no autoincrement on postgresql, but it have a serial, which is really an autoincrementing integer. So that's interesting.

Actually this is just the very surface of postgresql sql. Actually, there is many features, that mysql don't have or have it very recently. such as
- inheritance, you can, inherit from another table, ala oop. mysql don't have that
- procedural language, which mysql, introduced stored procedure in mysql 5. not too long ago.

I barely touch this, so there is more adventure for me in the future

Monday, December 10, 2007

postgresql adventure: part 2, difference( from mysql)

One thing I learn from mysql is that. there is only one shell, that is the mysql program.

On the other hand, postgresql have a few program, that is, createuser, createdb, dropdb, among a few. Which is a bit different from mysql, but still, quite cool, nice feature that I like.

And another thing is that, postgresql have one frontend, which is the pgadmin, which is a nice thing to have.

Sunday, December 09, 2007

lesson learns, usermod command

on linux, probably unix too.
to modify a user a user information on shell you type
usermod
here's what i learn, to assignment a group to user, you type
usermod -G groupname username
here's the catch, it will remove all the other group the user is in.

Another thing that I learn,is that to append, a group to a user, on shell, use the -a parameter.
So to append group to user, type:
usermod -aG groupname username
one more thing, always add the -a parameter, before -G, for some reason, -G assumes that -a is a group. so it is always
usermod -a -G groupname username
usermod -aG groupname username
but never
usermod -Ga groupname username
usermod -G -a groupname username
could be an ubuntu bug.

postgresql adventure: part 1, usage and installation on gutsy

I'm actually, start from using mysql, and actually, learn mysql in class. Since i'm on my vacation, so i decide to try out postgresql. Which I qoute from their website, "the world most advance open source database".

So install I did. Like many open source software, it is available on ubuntu repository, can be found using synaptic.

unlike mysql, which only have one program, mysql, to run everything, postgress sql have a few. And actually need a few steps before you can actually start using the database.

1) Basically, first give password to postgres account, this is equivalent to root, on mysql. Also so that you can use it later for pgadmin, a graphical frontend for postgreSQL. Because you will need a password, to login, even you set no password as your password. psql, is equivalent to mysql, the shell to access the database.
sudo -u postgres psql
then type
alter user postgres with password 'your password';
type \q, to quit.

2) Sometime i am lazy, to type long, so i grant access to my own account, since this is a development machine, so I create a user account, as root, for the postgresql server.

So I type:
sudo -u postgres createuser yourname
then it will prompt a few things, just say yet.

Then it done

Friday, December 07, 2007

Been playing around with mozilla prism


Been playing around with mozilla prism, an interesting project, by mozilla, where a webpage(webapps), is presented like an application on your computer.

The big idea is, once you click an icon, on your desktop you should be able to launch your webpage,but this time, with very minimal interface.

Which to me is an interesting concept, because imagine, a web application, like my google apps, really look like application on the desktop.

ruby on rails on netbeans 6

One reason why I get the latest netbeans is ruby support. Netbeans it self have a ruby version, jruby, but it support the native ruby installed.

The difference between the both is, if you download the full version of netbeans, you will get jruby, without needing to install ruby on your system. Which features gems, too. On the other hand, native ruby is supported as well, it just that, netbeans do not have the necessary permissions, to access gems. But syntax, highlighting, works quite well.



So using it is a matter of selecting ruby on rails project under ruby, when you start a new project

And also a generator, to generate stuff, like model, scaffold, controller, and other thing that you done, on the rails generate script

But really, it is not much, it is just a gui for process that is usually done, on shell, nothing ground breaking here, just that having a ide that do syntax highlighting on ruby is quite cool.

p.s able to run ruby on netbeans without ruby, rocks too

Thursday, December 06, 2007

A blog with a list of my here

http://www.codethinked.com/post/2007/12/The-Programmer-Dress-Code.aspx

here is a list of great programmer and computer scientist, and engineer. In the History of computer.

google release their chart api

Just now, google have release their chart api, basically it is a api, that generate chart, using a rest interface.

http://code.google.com/apis/chart/

Here is an example what it can do,


Basically it is a hello world.
http://chart.apis.google.com/chart?cht=lc&chs=200x125&chd=s:helloWorld

a more practical example is this, it is a rough statistics on internet user in the dorm:
http://chart.apis.google.com/chart?cht=p&chs=200x125&chd=s:Nu&chl=niu|iu

niu=non internet user
iu=internet user

the catch is you need to encode your data into a string, notice the chd, that is the data encoded.
you can find more info on the links above.

The thing is this is an easy way for us to actually, visualize data for our website. the fact that it uses a rest interface, does make it easy, to write script to automate task

an interesting java script project

I just found a site, that provide command line interface for javascript. useful to test javascript

http://www.squarefree.com/shell/shell.html

Wireless Hardware Compatibility List

Here is where you can find whether your wireless card is compatible with linux.
http://www.linux-wlan.org/

Wednesday, December 05, 2007

getdeb: the source for third party ubuntu repository

I was suppose to work a little, then got a little distracted.
I was downloading the new version of freeciv. The thing is it is not in ubuntu repository.

On the other hand, there is this site called,
getdeb.net

Basically this is a place for ubuntu user to get third party package, which is usually have the newer version than the once in repository, for example, freeciv.

Tuesday, December 04, 2007

netbeans 6 on ubuntu

Netbeans 6 is out today, before install it on ubuntu, a few things need to be done.

one install jdk, this can be done by
1) use synaptic, search for sun-java6-jdk, and install it.
or
2) type the following on terminal
sudo apt-get install sun-java6-jdk
once done
go to the place you save the netbeans installer
using terminal type
chmod +x netbeans-6.0-linux.sh


then you can execute it, by type
./netbeans-6.0-linux.sh


and there you are, a netbeans on your ubuntu desktop



what next, actually, i'm not sure, watching the netbeans video maybe?
http://www.netbeans.org/kb/60/intro-screencasts.html

Monday, December 03, 2007

netbeans 6 is out

http://sunmicro.vo.llnwd.net/c1/netbeans/6.0/final/

now with ruby on rails support, better mobility(which i don't really care because of android),
got some time to play around

kmobiletools revisited, now on kubuntu gutsy

Not too long ago, i describe ways to use kmobiletools.

now it's different, the function is still there, except now there is kbluetooth. Which is a kde utility to connect with your bluetooth device. Originally I thought everything is automated with it. I am so wrong.

So here is how to make kmobiletools working on kubuntu 7.10 gutsy.

First you need to get your bluetooth address of your phone.
This you can get by type this on terminal:

sudo hciconfig scan


actually you need to edit, 1 /etc/bluetooth/rfcomm.conf
on terminal type:
sudo kate /etc/bluetooth/rfcomm.conf

in the file, add the following

rfcomm0{
bind yes;
device "your bluetooth address"
channel 1;
}

then save it.

now start kmobiletools, kbluetooth should ask you for the pin, just enter it.


Now, if your phone is supported, you should be able to read sms, dial, sync your contact, etc.
I think sync contact is standard, so is save sms.

But still, i cannot send sms from my phone. on the other hand, able to backup my sms is nice. And still didn't test dial from my phone, don't think is working. Because my motorola phone, is not supported well.

Still it is a nifty utility to use.

Sunday, December 02, 2007

so my google pages will be upgraded?

It turn out that, google have bought up jotspot. And the plan is to integrate with google pages to create a new product.

Does this means that my google pages account will be upgraded? Or my page just turn into a wiki?

bandwidth limit on my isp

I reread the agreement from my maxis, wireless broadband, so this is what is realize.

1) i got only 3 gig per months,
2) and they have right to control my p2p traffic.

now, after i begin to feel ok with my isp, i found this, that is sucks.