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.