My band performed on 5th of February at the Google London office. This was our first ever gig. This is the first of 5 videos, follow through links on YouTube play list for the rest of the shots.
baran
Tuesday, 27 April 2010
Thursday, 1 April 2010
Goodies from Google, only a fool would pass.
April fools' day jokes from Google started pouring into my inbox this morning. You can now apparently store anything in Google Docs, for example your car keys or your cellphone. Or you can ask the question 'Where am I?' to in Google Search for Mobile, and you will discover your whereabouts. I turn out to be in Laputa.
My favorite is the Google Translate for Animals. This is hilarious.
Both Google Books and Google Streetview announced their 3D features too.
Wednesday, 14 October 2009
Sending a task to the background on Linux
Often I find my self having typed something on the command line and waiting the task to finish. I've just learnt there are better ways of doing this:
"... CTRL Z usually puts a job to the background and u get a bash prompt back , then if u type: - jobs , all the backgrounded processes r given a 'job No' the u can type:- fg(job No) and that job will be brought to the fore. I'm not at me linuxbox at the mo so thats from memeory , but think its more or less accurate.
If u need the background process to keep running rather than remain in suspended state .... after staring the program press CTRL Z and type bg (background). the program u invoked earlier will keep running in the background rather than remain suspended"""
http://www.linuxquestions.org/questions/linux-general-1/send-process-to-background-202974/
Monday, 24 August 2009
Adding maps to my wife's travel posts.
My wife wanted to add some sort of location information to the individual entries she have been posting to her travel blog, http://gezgin.ozgul.net. She had been complaining that such a simple feature was missing from Google's Blogger for so long now, I felt obliged to implement a poor man's map solution for Blogger. It's indeed missing at the moment, but we are working on it. :)
So to clarify, what she needed was:
I looked at http://draft.blogger.com, where Google Blogger team serves a public beta-tester version of blogger, with features not yet released on http://www.blogger.com. There I noticed the feature to set a location for a given post. Apparently my wife was not the only one asking for this, and Google Blogger team was responding. With this feature (still in beta), you can then see the location in the post footer. Still using the http://draft.blogger.com, I went to the settings of my blog and clicked through to Layout > Edit HTML. I expanded the widgets int HTML view and searched for the word 'location'. I came across a 'span' tag with a class attribute 'post-location'. This was indeed the widget section which printed the location name in the post footer.
Those who have used the Google Maps API will know, that in order to display a Google Maps widget on the page, I needed to add a 'div' tag here. Since there would be more than one posts per page, the div would have to have a unique id. This is easily doable by generating an id to this tag using a value unique to the post; I used the internal post id:
<div expr:id='"map-" + data:post.id' style='width: 250px; height: 400px;'/>
To be able to display a map, I also needed to know the latitude and longitude that the map would center on. In the post-location there are some references such as:
data:post.location
data:post.location.mapsUrl
but nothing like:
data:post.location.latitude or data:post.location.longitude.
Depending on this publicly available knowledge only, my best bet was to use the available data:post.location.mapsUrl, which usually has a pretty standard format, to parse the latitude and longitude values:
http://maps.google.com/maps?q=Bruges%2C+Belgium%4051.2094345%2C3.2252377&z=10
So I added a javascript function to the template HTML, and implemented a brute force parsing inside:
Finally, inside the widget, I added a JavaScript section, which calls the load function I added above:
<script type='text/javascript'>
load("<data:post.id/>", "<data:post.location.mapsUrl/>");</script>
Check out the page source code at http://gezgin.ozgul.net for the real action.
So to clarify, what she needed was:
- Be able to set a location for a given post. E.g. she would like to add the latitude and longitude information of Bodrum, Turkey as a meta-data, into the post she wrote about Bodrum
- Be able to display this location information for each of her posts, in the post footer. E.g. "Posted by: John Doe, Location: Bodrum, Turkey".
- And be able to display a Map of the location next to the post.
I looked at http://draft.blogger.com, where Google Blogger team serves a public beta-tester version of blogger, with features not yet released on http://www.blogger.com. There I noticed the feature to set a location for a given post. Apparently my wife was not the only one asking for this, and Google Blogger team was responding. With this feature (still in beta), you can then see the location in the post footer. Still using the http://draft.blogger.com, I went to the settings of my blog and clicked through to Layout > Edit HTML. I expanded the widgets int HTML view and searched for the word 'location'. I came across a 'span' tag with a class attribute 'post-location'. This was indeed the widget section which printed the location name in the post footer.
Those who have used the Google Maps API will know, that in order to display a Google Maps widget on the page, I needed to add a 'div' tag here. Since there would be more than one posts per page, the div would have to have a unique id. This is easily doable by generating an id to this tag using a value unique to the post; I used the internal post id:
<div expr:id='"map-" + data:post.id' style='width: 250px; height: 400px;'/>
To be able to display a map, I also needed to know the latitude and longitude that the map would center on. In the post-location there are some references such as:
data:post.location
data:post.location.mapsUrl
but nothing like:
data:post.location.latitude or data:post.location.longitude.
Depending on this publicly available knowledge only, my best bet was to use the available data:post.location.mapsUrl, which usually has a pretty standard format, to parse the latitude and longitude values:
http://maps.google.com/maps?q=Bruges%2C+Belgium%4051.2094345%2C3.2252377&z=10
So I added a javascript function to the template HTML, and implemented a brute force parsing inside:
function load(id, mapsUrl) {
if (GBrowserIsCompatible()) {
var coords = mapsUrl.split('%40')[1];
var lat = coords.split('%2C')[0];
var long = coords.split('%2C')[1].split('&')[0];
// div tag, unique for a post
var divElement = document.getElementById('map-' + id);
if (divElement == null) {alert(id + 'not found');return;}
var map = new GMap2(divElement);
map.setCenter(new GLatLng(lat, long), 13);
var marker = new GMarker(new GLatLng(lat, long));
map.addOverlay(marker);
map.setUIToDefault();
}
}
Finally, inside the widget, I added a JavaScript section, which calls the load function I added above:
<script type='text/javascript'>
load("<data:post.id/>", "<data:post.location.mapsUrl/>");</script>
Check out the page source code at http://gezgin.ozgul.net for the real action.
Subscribe to:
Posts (Atom)
