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.

Thursday, November 29, 2007

Open Source Web Design

Now that I'm stuck with HTML, and lazy my self. Honestly, I sucks at make things nice. Now I need a template. A design of the page.

So there is this site that offer free templates, open source web design. They offer 2008 design. Now it's time to get the templates

freewebs html mode

So I finally change into html mode. Rather downgraded from it. So no more of the nifty wysiwyg tools. But now I got all the flexibility I need.

Wednesday, November 28, 2007

free web hosting, redux

yesterday, was playing with geocities, the java applet based editor not working. tripod, web based editor, is clunky, need a lot of reload.

now i try freewebs, which features ajax based editor, like google page edit. and have widgets. and what I like, i am able to integrate youtube, unlike google own web page editor. and able to load from photo bucket. again what google did not offer.

What is similar, unlike geocities or tripod, i didn't see a html edit, for me to insert javascript, it can insert html, but on certain, section. unlike google page creator, i can preview what i have place for the custom html.

so we have our self a winner here? not quite, for one, i can't have my custom javascript, easily. it still didn't integrate well to my flickr, meaning, i have to do things manually. and it still a bit limited.

flickr toys

FD flickr toys have been one of the interesting sites, that generate effect on your pictures.
What interesting about this sites is that
1) it have a list of generator
2) it is one of the very few site, that integrate with flickr. very well.

http://bighugelabs.com/flickr/

Tuesday, November 27, 2007

been playing around with free web hosting

Not too long ago i play around with google page creator, after finding it a bit limiting. So I try another free web hosting. First thing first, last time i created a webpage is in my 1st year in the university. 3 years back, so it is really sometime.

First thing i noticed, it turns out that, now web based, wysiwyg tools, is quite common. And 2 packages i tried, now comes with, add-ons. But unlike google's own gadget seems a bit limited. Also they have a html edit, which is interesting, and flexible too.

Let's start with geocities, I tried with the free package, since, i don't really have cash with me. Now , first impression. The page editor don't work, because there is no 64 bit version of java plug-in. And it need java to run. On the other hand, it have a web uploader, so i can create on desktop then upload it. It also integrates with yahoo 360. Which I stop using for sometime, other seems cool. But it got only 20 meg or disk space to use.

Then move on to tripod, pretty much the same with geocities, except it doesn't have yahoo 360 integration, not that i need it anyway. On the other hand, the page creator works quite well.

Now to take time to play around.

Saturday, November 24, 2007

kde's Keep, a nice backup utility on linux

It turn out that i got a bunch of files that i need to backup, many are work related, some personal stuff. Either way I lazy to have to manually backup my files, in an interval.

It turn out, that linux have many backup solution. Which I just used the one comes with my distro. KDE have a utility called keep, which help automate and keep track of you backup. It comes with kubuntu. Which is good, because I was not in mood to download files in the internet.

And it's actually quite easy to use.

This is the interface:


select your directory to backup:



















select destination, it is similar to above, but this is where you want to store your backup, in my case, just my usb hard disk:


and configure:


just a few clicks, and the job is done. Very useful, for the gui oriented user. To view you backup list, just click on "edit backup list", you can reconfigure your backup there.

Friday, November 23, 2007

one place to get programming video tutorial

There is actually quite a number of place to programming tutorial, here is a list
http://showmedo.com/
this mostly deals on open source stuff, and a lot of python.

http://www.youtube.com/GoogleDevelopers
this revolve around google own stuff.

http://youtube.com/user/googletechtalks
this is google tech talk, not all involve programming, but quite a lot of it is here.

there will be more to come

Thursday, November 22, 2007

playing with yahoo pipes.

Yahoo pipes is one a service by yahoo, to create mash ups. Or rather mash together data source, to be used for your program.

Basically what it does is, first you need to get the data source, which could be a json, atom, or rss. then, filter it based on the criteria you provide, using the modules provided.

Here is an example, using feeds from, forum.lowyat.net

Saturday, November 17, 2007

suprised to find warzone 2100 in ubuntu repository

One of the best game I played is actually warzone 2100, it's not an new, actually it is quite old. Still It quite fun to play. And it is now open sourced. Which is cool. More importantly, I found it in ubuntu's repository. Which means I can now install it on ubuntu by using synaptics.

I wonder how to get snapshot, when it is in full screen anyway.

To install warzone 2100, in ubuntu,
just type
sudo apt-get install warzone2100

for background information
warzone 2100 resurrection project

Thursday, November 15, 2007

playing with Python FlickrAPI

Finally relaxing again, after fixing the server. And at the same time, got my self a couple of pictures i taken by my friends. So i decide to play with stuff that i always wanted to do for sometime, playing around with the python FlickrAPI

Since i'm lazy, and i got some pictures, that i don't want to upload manually, so i decide to automate it. There is a few tools for doing this, from ruby, curl, python. Flickr actually provide a list of language binding for their api. I decide to play around with a python api.

Before i can do that, i need the api key, which can found on flickr api site. Just click on Your Api Key. after going through a few steps, the key is there. There should be a api key and a secret key, you will need the api key to use the application, to authenticate on your flickr account you will need the secret key.

Then get the api here, extract it somewhere, then run
python setup.py install

in the same directory. It is in the readme.

Then though the tutorial online.
import flickrapi
#this is the set the key
api_key='your api key'
secret_key='your secret key
flickr=flickrapi.FlickrAPI(api_key,secret_key)
#authenticate
(token,trob)=flickr.getTokenPartOne(perms='write')
if not token:raw_input("Press Enter After You Authorize This Program")
flickr.getTokenPartTwo((token,trob))
#the call back function
def func(progress,done):
if done:
print "done"
else:
print "at %s%%" % progress
#the upload function, change the filename, and tag, or if want it to be private, change is_public=1 to is_public=0
flickr.upload(filename="your image path",callback=func,is_public=1,tags='your tag')

Which really just to test that it works. The def func is a callback for the flickr.upload() function.
to upload just call flickr.upload with the right parameter. That is simple.

Seems that there is a lot more. Looks like i will be very busy indeed.

this is the python flickr api, the tutorial, and download is here:
http://flickrapi.sourceforge.net/
the api released by flickr:
http://www.flickr.com/services/api/

Wednesday, November 14, 2007

the server project: lesson learned again, aka why server usually have no gui

One thing that we realize from the server project. Is well, it is a resource hog. Put it simply it eats memory for breakfast lunch and dinner, probably even supper and tea too.

One thing i noticed is, webmin can take lot of memory, by then so is mysql, and apache.

One thing is, many of the gui program and the desktop interface, takes quite a lot of ram too.

So it is probably safer to remove the gui, than the server we installed.

Or i could just type "init 3".

case close. one thing i realize that, the one reason why server usually have no gui is, gui take resource. especially now linux desktop comes with desktop search, and eye candies, that take memory for breakfast lunch and dinner. so now it is not a good idea, to have gui in a server that server over 500 people, for their internet. security is not really that bad of an issue.

so next adventure now involve, reducing memory usage, and take away all the unnecessary stuff. which i think not much really.

the server project: lesson learned aka why /var/log is sometime useless, and etc

Got called back to check out some issue on the linux firewall, that is providing the internet connection to 4 blocks. Still figure out why, but i think i got a suspect.

On the other hand, learned a few things.
1) sometime logs are useless,
especially when you set logging on shorewall, or iptables and their friends. I was hoping to see why the server hangs, so from my experience i check on the last minute entry on /var/log/messages . It work last time. It is useful to check out what is the last system states, or kernel states.

only to found out that, the is a lot of complaints from shorewall on martian packets. So cat /var/log/messages|tail, don't work either, because as soon the shorewall starts, there will be complaints on martian packet.

By then my laptop don't serve hundreds of people

2) there is 2 version of top,
one is top, another is htop. htop look nicer, but top comes by default. But really it do the same thing.

anyway htop have more feature

3) webmin can take a lot of cpu cycles.
not webmin it self, but rather, its log rotating scripts, rotate.pl. it can take 100% of the cpu time.

4) on the other hand, webmin can be useful
at least having a gui, is nice, but interestingly awkward.
and it have some useful things such as bandwitdh monitoring. and frontend for configuring your server

5)but webmin can be useless too.
maybe not much, it just happens that we use a maclist to authenticate internet user. and the webmin shorewall module don't provide it. therefore, sometime shell rules.

i know using maclist is not wise, but i am not prepared to change the process of the block resident applying for internet connection.

i think that is pretty much it

Monday, November 12, 2007

Google Android on Ubuntu

So google have release android sdk. So I just have to install it. To get it working on ubuntu.
First download the SDK here.

This instruction is specific from ubuntu.
After you uncompress the file.
In /home/ .
There is a .bashrc file. Just add this line
PATH="$PATH:the path of android tools"
at the end of .bashrc file.

Then just install eclipse, and download the android eclipse integration. And just setup in windows->preference menu in eclipse. Then it is done

Sunday, November 11, 2007

Online Chinese Entry Software

There is time when i can't type in chinese, especially when i am using 32 bit software on my laptop. Which happens to be mostly browser. By then sometime there is not chinese entry software installed.

It happens that the guys in cari.com.my have a solution.
http://chinese.cari.com.my/ime/

It is a web based. Chinese entry system, which i suspect is written in javascript.

Blogged with Flock

A very nice(cute?) firefox cartoon





This is an ads on firefox, in a cartoon form. Quite nice actually

Friday, November 09, 2007

Revision3, an interesting online media site

I am actually a big fan of techtv, until, it got shutdown, or something like that. And more importantly, the local tv not showing it anymore, and i finally move to live in the campus.

Either way, not too long ago I found this site.
http://revision3.com/

actually this is a techtv-ish, online video. Looks quite good. go check it out.

Thursday, November 08, 2007

google page creator.

This is the beginning of my holiday, I'm bored. And lazy.

So I started a simple project, playing with google page creator. It is a product from google that targets, ordinary people. So since I pretty much free anyway, so i created a website for the Chinese community in the College. Here, any sorry for the site for being a bit lame.

The thing is, this project is really target ordinary people, so basic stuff is easy. It features anWYSIWYG editor to edit you page. A set of template, to make page nice. To spice things up, google provide gadget. Which is the same thing you see in igoogle. It does make things easy for most, but sometime it just look strange.

What sucks, doing stuff beyond basic is an hassle, for one you only see html of part of the pages. Not the whole page. Some have issue with javascript. but there is work around. And like most free hosting like geocities. There is no scripting support, so no perl, php or python. And there is a set of template, but it is limited.

The verdict, doing the basic stuff is good. With a WYSIWYG web page editor, how hard could that be. But doing stuff beyond basic is a hassle. Maybe it is not a bad idea to check for other options.

http://10thcollegecc.googlepages.com/home

Sunday, November 04, 2007

Interesting Browser: Flock

Not too long ago flock have reach 1.0. But not too long ago, it seems to be stagnant. It is one of the interesting browser I found online, which expose me to a number of service including del.icio.us.

What flock boast is that, it is a social browser. Which make it easy to use many services, which include, del.icio.us, flickr, youtube, photobucket, even facebook.

It feature a few thing like, an uploader for flickr, a blog editor(which i use to write this blog), media bar, facebook integration, which shows friends updates. web clipboard. And that is quite nifty.

the bad thing is, the interface is strange, a bit cluttered actually.

snapshot2.png:


snapshot1.png:


you can get flock here:
http://www.flock.com/

Blogged with Flock

Saturday, November 03, 2007

server project: cache is full

Today we got the problem where our squid server shutdown because of disk full error:

the solution for that, after check around the faq is:
(our cache is in /var/spool/squid, since it is from the repo), change it to your cache directory
cd /var/spool/squid

type this, in /var/spool/squid:

echo "">swap.state

make sure you have root access before you attempt it.

Monday, October 22, 2007

me and gutsy gibbon redux

So i decide to test more of gutsy, so i decided to install Ubuntu Desktop. So now i have 2 desktop environment, kinda remind me of debian i use few years back.
It is just a matter of
sudo apt-get install ubuntu-desktop

As i suspected, the gnome desktop, is more polished on ubuntu than kde on kubuntu. For one, desktop effect are there, so is correctly rendering the chinese character on the desktop.

anyway, compiz-fusion on ubuntu, is quite ok, not lame, but not that cool either. some of the feature quite productive though. maybe more on that later.

Friday, October 19, 2007

me and Kubuntu Gutsy

Few thing i noticed on kubuntu gutsy, first thing is, dolphin, strigi, restricted driver manager.

1) dolphin:
Dolphin now replace konqueror as the default file manager. But konqueror is still there.
The best thing about dolphin is, there is a navigation menu to the left, which is a nice feature. on the right is the operation that we used to be called by right click on the icon. Nice touch actually.

2) strigi:
Unlike previous version of ubuntu, instead of beagle, strigi is not the file search daemon on ubuntu. And unlike beagle, didn't really slow down the system. Because strigi is written is c(or was it c++), which unlike beagle which written in c# which runs on a virtual machine, will take some overhead.
But later I have to add a search bar later on kicker manually, which would be nice added by default. On the other hand, there is kio slave for strigi, which is cool.

3) Restricted driver manager
Is another thing that previously on ubuntu but not kubuntu. now it is added. nice touch.
previously when i use ubuntu, restricted manager didn't detect my wireless card from broadcom, but it does the job by downloading the firmware.

4) Etc
soundcard works now without configuration.

5)the bad,
now some chinese character didn't render well, but i try to add some fonts from repository and see how.
And i want my desktop effect on kubuntu. would be a waste of resource because i do actually own an nvidia card.


overall this is a nice updates to (k)ubuntu. Now i really hope that kde 4 will be in 8.04, was it hardy heron?

Tuesday, October 16, 2007

waiting for gutsy

gutsy is near, ubuntu 7.10 gutsy gibbon that is. and it is hear in less then 24 hours

actually not much i look forward to.

for ubuntu it is gnome 2.20, the use of tracker.
for kubuntu, not much except that it uses dolphin, the new file manager for kde 4 and strigi, which according to the site, the smallest and fastest file search daemon.

i probably get kubuntu. just have softspot for kde

but what i really look forward to is gutsy +1. which i don't know the name yet. because kde 4 is around in january, which hopefully merge that time.

p.s been testing adsense, hopefully it works.

Thursday, September 13, 2007

me and my flash problem

Currently I'm living quite happily on 64 bit world. Java works well, open office is there, so is most open source game. The only problem now is flash.

Firstly, adobe do not have 64 bit version, which I have to resort to installing 32 bit browser to make it work. But now doesn't really work because, there is no sound after installing the latest alsa to make my sound card works properly.

Which I comes with a few plan, plan A is recompile the driver and change the makefile on
alsa-lib by add -m32 on the cflags, change the directory. let's say the plan don't work well.

plan b is to use gnash, which close to useless, because you don't work at all, so it google video.

So now i am stuck with flash with no sound. Which hopefully will be fixed on gutsy. Since gutsy comes with the same alsa version as mine currently used.

on the other hand, I should really spend some time studying.

update, realplayer don't work too, on 64 bit.

Monday, September 10, 2007

me and my new laptop: the issue

basically there is a few issue on my laptop. one basically it is a 64 bit computer running a 64 bit OS. You just got to love unix, not their design per se, just flexibility. But few issue that i resolve.

First, running flash, basically there is no 64 bit version. So we will need to run 32 bit version of the browser. Which me being morbidly lazy try to find solution. Which resulted in:
- http://ubuntuforums.org/showthread.php?p=1174435

basically this nice person wrote a script to automate, the installation of 32bit browser. With flash etc.

Second, there is issue of the on board sound card, one, produce sound when i put in the head phone, and second i cannot use it to record sound. the audio input is broken. the solution is basically compile it. the solution is basically this.

https://help.ubuntu.com/community/HdaIntelSoundHowto

but there is the catch. the ia32 version of asound, and alsa-oss does not reflect the change. so the result it flash now have no sound at all. i still try to figure out how to compile it.

Lastly is my wifi. an broadcom card, 4311 to be precised. but the firmware is not supported by the ubuntu stock kernel. not on the stable branch either. but on current development branch. which i think i will wait. So currently the solution is to used ndiswrapper, and use the driver from dell. it works like charm, except i can't sniff wireless traffic from it.

Friday, September 07, 2007

me and my new laptop

I just got a new laptop. since the old one dead. It is actually a bargain actually. consider that it is a turion 64 x2, 1 gig ram, 80 gig harddisk. and nvidia, 6150. and it just cost rm 2270.

and works quite well on ubuntu 64 bit. what surprised me is that the nvidia card works quite easily. but what also surprised me is that . the on broadcom wireless, bcm4311 to be precise, don't work as well, which is surprising because it just need a firmware. which i got from a third party repository. which seems to cause trouble
[ 37.273463] bcm43xx driver
[ 37.280132] bcm43xx: Unsupported 80211 core revision 13
[ 37.281980] bcm43xx: Invalid PHY Revision 9
[ 37.961596] bcm43xx: FATAL ERROR: BCM43xx_IRQ_XMIT_ERROR
[ 48.180802] bcm43xx: MAC suspend failed
[ 48.218142] bcm43xx: MAC suspend failed
[ 48.254113] bcm43xx: MAC suspend failed
<---snipped--->
which should work using fwcutter. but seems the firmware not working. so now working on plan b. ndiswrapper. the reason not to use ndiswrapper is because i sometime do some wireless sniffing, on my network that is. and ndiswrapper can't do that . so now try again. worst come to worse use ndiswrapper.

few years back i face with this problem. with the ipw2100 card from intel. at least, intel provide the firmware for use to download to make it easier for us linux user. now i have rely on other to get the driver.

Tuesday, August 14, 2007

fix up wireless on opensuse, and some thought on it

One of my friends is having problem getting the wireless working his laptop. Which he install opensuse 10.2 and the wireless is a intel ipw2200 card. The thing is the driver is open source, but the firmware is not. So it is not installed by default. And he have no internet connection yet, and only have 5 cd, meaning no non-oss cd. This will be a bit tough.

Since I have basically use suse for the first time, second time, first is 9.2. which i use for a short while anyway. First thought, when boot up, it shows a graphical grub menu. More importantly, it shows an option to boot opensuse on xen, which is cool. Because assuming he uses only the default, it means that virtualization is free, comes into opensuse as an option by default. And the interface is ok.

On the other hand, unlike ubuntu, they didn't come with the wireless firmware, need to install manually, which is a pain. And I can't get use to the Yast configuration. maybe i got used to apt-get. It is a bit confusing to me, because I got used to the way kubuntu do things.

Saturday, August 11, 2007

been playing with linux system accounting

One day I play around on my laptop, which I found the acct utilities, which I wonder when I install. Anyway, later I found out what it is. Actually it is a unix system accounting. Which contain a few utilities, such as:
- sa
- ac
- lastcomm

So play around I did. So I start with sa. Which I get a set of statistics of io, memory and cpu usage.

7924 800.15re 18.51cp 0avio 2835k
55 262.28re 17.77cp 0avio 2848k ***other*
46 53.41re 0.30cp 0avio 8430k gdl_indexer
47 1.55re 0.16cp 0avio 2079k apport
21 0.32re 0.13cp 0avio 6228k mono
46 0.68re 0.08cp 0avio 8430k gdl_indexer*
29 0.12re 0.02cp 0avio 478k gzip
2619 1.12re 0.01cp 0avio 514k file
2 0.04re 0.01cp 0avio 936k vrms
4 0.57re 0.00cp 0avio 2317k apache2
10 0.30re 0.00cp 0avio 704k dhclient-script
11 50.67re 0.00cp 0avio 0k pdflush*
12 0.11re 0.00cp 0avio 573k gpgv
2 0.01re 0.00cp 0avio 4346k kde-config
2 0.01re 0.00cp 0avio 1210k troff
----output truncated--------

which not really sorted. So later i found out a parameter for sa, --sort-cpu-avmem

8484 804.23re 18.61cp 0avio 2808k
7 0.20re 0.00cp 0avio 28526k pidgin*
922 0.01re 0.00cp 0avio 19963k beagled-helper*
26 0.12re 0.04cp 0avio 19648k totem-video-ind
49 57.01re 0.33cp 0avio 8457k gdl_indexer
49 0.69re 0.08cp 0avio 8457k gdl_indexer*
6 374.57re 0.00cp 0avio 6753k apache2*
21 0.32re 0.13cp 0avio 6228k mono
2 0.01re 0.00cp 0avio 4346k kde-config
56 262.28re 17.78cp 0avio 2793k ***other*
10 0.10re 0.00cp 0avio 2374k smbd*
4 0.57re 0.00cp 0avio 2317k apache2
----output truncated--------
which interesting because, pidgin take 28meg of memory, or i read wrong. most of the time I get firefox using 50meg.

another interesting command is lastcomm. which display the last command executed.

-----above line deleted------------
find root ?? 0.00 secs Sun Aug 12 09:07
xargs root ?? 0.00 secs Sun Aug 12 09:07
rm root ?? 0.00 secs Sun Aug 12 09:07
find root ?? 0.00 secs Sun Aug 12 09:07
acct root ?? 0.00 secs Sun Aug 12 09:07
acct root ?? 0.00 secs Sun Aug 12 09:07
acct root ?? 0.00 secs Sun Aug 12 09:07
accton S root ?? 0.00 secs Sun Aug 12 09:07
which I didn't fully explore yet. lastly is the ca utility. which can display the amount of time a user log in to the system, for a week.

which all of this is new to actually.

Wednesday, August 08, 2007

Discovered unix system accounting tools

So I was browsing around my laptop, which by incident found, acct. Which is a set of unix system accounting tools. Which from documents stored on my laptop, have:
- accton: which use to turn on/off system accounting
- ac: to show user connect time
- sa: summarize system accounting info.
- lastcomm: which printout previously executed command.
:
ac, is to print out user connect info. Which if executed directly just print out:
sweemeng@sweemeng-laptop:~$ ac
total 82.92
which really nothing, but it have a few parameter

Wednesday, August 01, 2007

data matrix, huh

I was browsing around the web, stumble upon something that is new to me, data matrix.
more about data matrix here and here. Basically it is something like a bar code, that store info from a few byte to 2 kilo bytes. And is used as bar code, to identify object at a warehouse.
,
It seems that a few website, including nokia and this guy. Use it to encode data. It seems that nokia concept, is to encode the something, such as links or text. then expose it somewhere, then read it using a camera phone, with software of course.

Which I have my own.
1185967080

1185966354


it seems that there is reader provided in the links above.

There is other use of this as well, such.
http://www.semapedia.org/

Also there is a few library that can used to generate or decode the code.
http://barcode4j.krysalis.org/ (this is in java)
http://www.libdmtx.org/ (this is for linux, but unfortunately, it got sued by a patent troll, we we cannot download it)

which i should try to play around with it.

Saturday, July 14, 2007

The Server Project: The Adventure With Longhorn

So now one of the team member have installed longhorn beta 3 on the web server. Not me, I'm not a big fan of m$. Anyway, since he have done that, I just have to make use of it don't we.

First impression, it is really made with using .net in mind. Which is not really a good thing for us. because, the college website, is written in PHP. And we don't have time to migrate it. And more importantly We have no one with enough knowledge in asp.net to rewrite the website.

So now, PHP don't work, and mysql is installed, but didn't really try it yet. Seems working.

But sometime, there is warning on permission, by then don't seems to have enforcement. Which to me strange. By then I used to linux, but not much on windows server.

The lesson here, when decide on the platform. We have to think a few times before we make a decision. Like us, we don't have a website working(yet). Because we are new on windows server, and we are using stuff that is very new. And we have to relearn it, at the wrong time.

Wednesday, July 04, 2007

Google Desktop on Linux

So google have finally release their google desktop for linux.

So Download it I have.

So the step involve for ubuntu is quite simple.

it is as follows in the links
http://www.google.com/linuxrepositories/ubuntu704.html

but for synaptoc do this:


just fill in the URI and Distributions and Sections, as shown

Sunday, July 01, 2007

Hong Kong: the livestyle

So what I noticed on Hong Kong is that, the transportation is fast, efficient.

They have a payment system that uses a card, rfid I think. Which is used on many place. Especially on transportation.

It seems that most of my Hong Kong friend use facebook. Instead of friendster.

And the way they subscribe to broadband is on the street. and they have 6 meg. though download have 400k only

hong kong: the study tour and seminar

Got back from Hong Kong, because of the HSBC YEA competition. Mostly it is a study tour, and seminar on entrepreneurship.

Which where we go visits company in Hong Kong and Shen Zhen China. Mostly non tech business. Which give an insight on what business is, and how they start.

Another interesting part is the seminar, which describe what is a VC, angels, how to prepare a business plan, and my favorite is on T people on D-school. Technical people with non technical insight. That's pretty much every thing on business tour and seminar

Thursday, May 17, 2007

My Entrepreneur Project: The ending aka the no.2

So the project, we got number 2, and will go to Hong Kong and china. So what happens, have to present in front of the judge, scared the hell out of me. yeah that.

Then we have dinner, with a few ceo, and bank executive. Surprisingly There is a lot of talk. So it is not as bad. They can be funny too.

It just strange that, I didn't really feel much. Not that I'm sad. It just that, I don't really feel much. At least It wouldn't clash with the orientation. And finally I got a chance to escape from Kuala Lumpur for a week.

Monday, April 23, 2007

my obsession with computer history

One of the reason why I got into this sh*t. Which is my study in the Faculty of Computer Science in University of Malaya. Is because of my interest in computer, and one of the thing I'm interested in is the history.

So occasionally I found gems online. One of the one thing i crazy about is unix:
http://cm.bell-labs.com/cm/cs/who/dmr/cacm.html
http://www.dei.isep.ipp.pt/~acc/docs/unix.html
http://minnie.tuhs.org/UnixTree/
http://cm.bell-labs.com/cm/cs/who/dmr/hist.html

some video i found
http://video.google.com/videoplay?docid=7707585592627775409&q=revolution+os
http://video.google.com/videoplay?docid=7941901498664355924&q=pirates+of+silicon+valley

Thursday, March 22, 2007

wireless usb ehh

2 days ago, the wireless usb standard is approved by ecma.

wireless usb aka wusb is a new standard where a wireless device is able to connect to computer way faster than bluetooth, which is about 480Mbps at 3 meter and 110Mbps at 10 meter.

in layman term, you know why we don't connect our digital camera to a computer with a bluetooth and uses a USB instead? because bluetooth is not fast enough. the wireless USB standard means that, we don't need to use a cable to transfer file between a computer to let say, a digital camera.

in a nutshell, in the future, our personal device, that uses usb, such as mp3 player,camera, phone,memory stick, etc. will probably use, wireless usb instead. while the standard is just being announced 2 days ago, wusb product is already available in the market. and wusb dongle can be used with usb 2.0.

the news is here:
on ars technica
on wikipedia(for explaination)
and linux already provide tools+driver for wireless usb already

Friday, January 19, 2007

application on the go

my last post is about putting diagnostic software on pendrive. today i show another piece of work, but this time is for fun.

http://portableapps.com/apps

http://portableapps.com/suite

portable apps is a set of open source application modified to be installed on your pen drive. the application include, media player, web browser, antivirus, game, office suites. all this for free, which should be because it is open sourced. and when installed take about 260 Mb on the pendrive, and 105Mb if used lite edition.


windows utilities

when you use windows, there is time it is useful to have some system utility to use. i just found a 'few', that is quite useful:

http://www.dailycupoftech.com/usb-drive-systems/3/

this is a website where, the author have combine a set of windows utilities into a 14Mb file, zip file. so you can put it into your pendrive.

another useful one is sysinternal:

http://www.microsoft.com/technet/sysinternals/default.mspx

that you have to download one by one.

not that i like windows, i'm not, in fact i'm an linux user(penguin rocks man), but sometime i have to face it. not to brag, but linux have this set of tools comes in by default. lsof, netstat, tcpdump, top, iftop, touch, i can even cat the /proc directory.
most unix have utilities build in too, just some of it different than those on linux.

command line......... thats cool

today i found this link:
http://tags.lifehacker.com/software/cygwin/

some of my actually think that i'm crazy when i say command line rocks. but seriously, i really mean it. if you happens to own a *nix box, (unix computer i mean) you will understand.

when a linux desktop is unresponsive, i can just open the terminal and type "ps -A" then type "kill -9 process-number". or worst i just press alt-f1, then login again, then type the command again. or reboot, or kill the desktop and restart the desktop, not the whole machine. try do that in windows, when it happen you have to reboot

the purpose of the link is to show that i'm not alone in this. which is cool. or it just mean that i am one of those unix user

passwords

been reading an article on password cracking. thats right, the one on your computer. how they can do it.

http://www.wired.com/news/columns/0,72458-0.html?tw=wn_story_page_prev2

it is written by Bruce Schneier, an expert on computer security. and in this article there is this advice which:

So if you want your password to be hard to guess, you should choose something not on any of the root or appendage lists. You should mix upper and lowercase in the middle of your root. You should add numbers and symbols in the middle of your root, not as common substitutions. Or drop your appendage in the middle of your root. Or use two roots with an appendage in the middle.

finally there is a funny page about choosing password:

http://www.brunching.com/passwordguide.html