Saturday, October 11, 2008

gtdshell release 0.2

A quick release containing bugfix and some new features. The ones I really needed are, contexts and gnu readline support. Here goes the full changelog:

Release 0.2

Fixed:
- There is an invalid EOL character in the done items.
- A command line with space only causes segfault.
- Removed the duplicate [done: ...] from the end of done items.
- Made contexts visible on the next item output.

Features:
- Appended anonymous project results to the 'list' command output.
- Added total item count to the 'list' command output.
- Added the 'stat' command, displaying the done item count in the past week.
- Wrapped the done item timestamps in square brackets.
- Implemented contexts.
- Added gnu readline support.

Internals:
- Done item management refactoring.
Have fun.

Sunday, September 28, 2008

Sample OpenID scenario

In a Unix computer when I log in and open an application it loads my settings, my documents, my music, etc. Windows provides similar functionality, I believe. When I install an application, it doesn't ask me who I am, it just fetches it from somewhere, be it environment variables, or registry, or some other OS API. However, when you sign up for an online service or an application it asks who you are and you cannot say to fetch your data from another web site you have already registered with.

There are some services to provide this. As far as I remember MS tried to implement something like it. Facebook, provided a common framework for applications, open social is another alternative for Facebook's framework. Each comes with their own pros and cons. However the real problem is there is no unified way for it.

Now, there is a somewhat similar standard created to provide a similar functionality, OpenID. It does not handle all the issues, but surely a starting point. There is a lot of technical definition on the OpenID web site. Here I will show a sample scenario, in which I use my blogger account as my OpenID identity and connect my sourceforge account to it.

Log in to the sourceforge.net site.
Go Account Options -> Manage My OpenIDs -> Add an OpenID -> Enter your blogger url -> Click Log In -> Enter Your Password to Blogger if it asks -> Say "Yes, Always"

To test it: Click log out. -> Click Log In at sf.net page -> Enter your openid url -> There will be a blogger account login screen if you are not signed in to your blogger account. Enter your mail and password -> Well, that's it. You have an online identity.

Have fun.

Wednesday, September 24, 2008

Console based GTD tool: gtdshell

There is a loud buzz about GTD, a productivity method by David Allen, so I guess everyone interested in productivity improvement is already heard about it. What he says is the best tool for gtd is paper and pen, however there are many software out there both free and for sale. You can use one of them instead. But probably the worst thing you would prefer to do is to design your own gtd software and, yes, that's what I did. Here I present gtdshell.

Why I need it? Simply, I didn't like the other tools. Most of them are online and I am not 100% connected to the internet and I don't want every detail of my personal life to be somewhere on the web. Well, maybe except gmail. Most of these tools are not flexible enough, I can't use vi to edit them, someday I want to be able to access it with my openmoko, etc. So I decided to store my next actions in text files and started to develop an application which I can somewhat easily process it.

Finally, I think it is at a usable point, though you still need a text editor sometimes, here goes the first published revision. You can download the tarball from the gtdshell web page or check out from the subversion for the bleeding edge. Feedbacks are appreciated.

Have fun.

Tuesday, September 23, 2008

Slow laptop, funny reason

It is normal Windows to slow down as you install new applications but if your linux installed laptop is getting slower and slower, there may be a pile of dust blocking the fan or there may be around five hundred thousand files in your home folder, or both as in my case. Probably I should clean inside of my laptop periodically.

Thursday, September 18, 2008

SMS reminders with Google Calendar

Day by day I am adapting to a new Google service. My new favorite is the Google Calendar. Recently I've discovered that Google sends SMS messages to my phone as reminders for the events I defined in Google Calendar. Since than I am started to use it day by day. I don't have a life with full of appointments and hours long meetings but I need to remember stuff. What I do is, I add every task I should remember to the Google Calendar as 5 minute events and then I get reminders as SMS messages. Which works great so far. Try it, have fun.

C++ Linux to Windows port

It took about 10 minutes to port the gtdshell into Visual Studio 2003 (I used linux+gcc at the development.) The only problem was apparently boost::date_time has some issues with VS, so it is replaced with ctime functions.

Wednesday, September 10, 2008

Turkçe Alt-Q Klavye

Linux'daki Alt-Q Türkçe klavyeyi özleyenler için. traltq.zip

Change is good

I moved to İstanbul.
Started a new job.
Got a twitter account (nick: emreturkay).
Turker tricked me to use nedurum (nick: emre).

Monday, July 21, 2008

Most simple XMLHttpRequest example.

For the ones need to get a quick start here goes a very simple XMLHttpRequest example with pure javascript. Note that this example works with the Firefox. For the Internet Explorer "xmlhttp = new XMLHttpRequest();" line should be changed with "xmlhttp = new ActiveXObject("MSXML2.XMLHTTP");" although this usage varies with the Internet Explorer version.

At the server side you need a text.txt file which contains a partial html document such as:

<p> hello </p>

The code:

<html>

<head>

<script language="javascript" type="text/javascript">

function back_ajax()
{
if (xmlhttp.readyState == 4)
{
var o = document.getElementById('o');
o.innerHTML = xmlhttp.responseText;
}
}

function call_ajax()
{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", "test.txt", true);
xmlhttp.onreadystatechange = back_ajax;
xmlhttp.send(null);
}

</script>

</head>

<body>

<form name="f">
<input name="in"/>
<input type="button" onClick="call_ajax()"/>
</form>

<div id="o">
<ul>
<li> test 1 </li>
<li> test 2 </li>
</ul>
</div>

</body>

</html>

Thursday, July 10, 2008

subversion behind proxy

For the people who needs subversion access behind a corporate proxy, all you need to do is to append the lines below at the end of ~/.subversion/servers file. Unfortunately, this only works for subversion http access.
http-proxy-host = your.proxy.host.ip
http-proxy-port = port-number
http-proxy-username = your-user-name
http-proxy-password = your-password
http-proxy-exceptions = comma-seperated-list-of-internal-subversion-hosts
Have fun.

Thursday, June 19, 2008

e-mail @ console

There are times I want to send a file, write a couple of lines to someone or simply send a reminder to my own mailbox by e-mail directly from terminal. This is where the plain old mail tool comes to the scene. It's manual page and all kinds of tutorials on how to use it is available on the web. However it took a little time to configure it to send mail via the corporate SMPT server. Finally, I could find something on the web and after modifying it a little bit it works. Install the gnu mailutils package, put the lines below to the ~/.mailrc and voilà.

set sendmail="/usr/lib/mailutils/mail.remote \
--mailer smtp://mail.server.address \
-f you@your.mail.address"

Thursday, December 20, 2007

New applications for your moko

Starting a new blog with the announcement of three new applications for the openmoko platform. All are free, all are GPL, automoko, thunder, and ringer.

automoko: This is a shell script for compiling an autotools projects for the openmoko platform. It is a very simple one and requires a locally compiled openmoko/openembedded distribution. You can use MokoMakefile to fetch and compile your own.

There is a similar project called toolchain. The purpose is the same, cross compile applications for the openmoko platform but the method is different. Toolchain is a huge tarball, which contains cross compilation tools and various scripts to simplify the compilation process. I have two problems with toolchain. First, like most of the openmoko people out there, I am compiling the whole source code of openmoko on my own machine and flashing the generated image to my neo 1973 (once in a week or couple weeks) so I already have the cross compile tools on my laptop and I would not prefer to download them again. The second one is that I have to compile all the libraries the application which I'm porting requires. The first one actually is not a big deal but the second one is a problem. MokoMakefile does the compilations for me, generates a stage directory containing all the cross compiled libraries and there is no reason for me to go through all those steps again. So, if you have openembedded/openmoko development distribution downloaded on your computer use automoko, if not use toolchain.

As a last comment about toolchain, obviously that's the way to go when openmoko platform gets stabilized, however for now I think automoko will be a useful tool for many.

thunder: This is a specific application for the FIC Neo 1973 to assist overcoming the battery problem of the device. The only way to charge the Neo is it's USB port and the device consumes power so fast it does not even go for 24 hours. It's OK if you are sleeping with your laptop, hugging it, otherwise you need an AC to USB adapter.

I've done the second and bought a USB wall charger. Here starts the problem, Neo does pull only 100 mA from the device, not 500 mA, which is not enough even to keep it's power state stable. As far as I understand the reason is that the USB protocol says “pull current with 100 mA unless the current source acknowledges that it can provide more”. However, the wall charger is dumb and cannot answer the queries made by the openmoko, even if it can handle with 500 mA (the one I bought has capability to drive 650 mA output). So it continues to draw power with 100 mA current.

The good thing is, you can force openmoko to draw 500 mA manually. Well, this is what thunder does, it is a graphical interface for this feature. Before using it, ensure that your wall charger can drive 500 mA otherwise high probably using thunder will damage your wall charger. There is no guarantee and use with your own risk.

ringer: This is not as complicated as thunder. It is an alarm clock for the openmoko. It plays an mp3 playlist repeatedly until you press the big, wide “Stop” button. For now, the configuration is done by editing text files and you need to restart the neo (if you know a way to restart the matchbox-panel, that works, too) to apply your changes.

With thunder and ringer, I can finally use my Neo as an alarm clock. Wel, still wondering if it will work tomorrow morning.

Grab them, use them, bug report, and fix them if you can. Have fun.

Neo 1973 Power Management

Last weekend during my trip to Istanbul I made a simple test of the power usage of the Neo 1973. The GSM and dim light turned off, playing music with the media player and it went on at least for four hours. It was playing pretty hard stuff. I tried ogg, but apparently 200 MHz CPU of Neo was not enough to play ogg files and failing especially on fast distorted sounds so I go with mp3. It was still playing until I turned it off when we enter into the city, that was far more than I expected. Well, which is good news. I guess my time to switch my old T610 with Neo is near.

I made a list what do I need to switch Neo,

  • Flawless GSM implementation, talking and SMS. It's been quite a while since my first talk with the phone but I'm still having trouble sometimes, each new software update brings a bad surprise and I still check if GSM is still working after a new compile/flash process, well the bad news is it's chance of working is no more than a coin flip.
  • Power on time for whole one day which includes 20-30 minutes speaking, a couple hours dim light on with active usage, like reading stuff or writing messages. Around one hour music would be a plus.
  • An alarm clock.
  • A working GUI interface for fast charging with the wall charger (AC-USB adaptor).
  • Backup utility for address book and stored messages.

Label Cloud