Search This Blog

Showing posts with label google. Show all posts
Showing posts with label google. Show all posts

Thursday, November 21, 2013

How to create a static URL link to a file stored in Google Drive

You can upload and store files in Google Drive. With this cloud files service you have the ability to view online your files using Google Drive Viewer. An example link https://docs.google.com/file/d/0B7ftIvGKDqYMMWxrbTZmWGxJb0E/edit may look like:


Problem

How to create a static URL links for files stored in a directory on Google drive so you can use them in your HTML code or blog postings.

Solution

For detail instruction take a look at the reference section below. In short you have to first publish the Google drive directory and make it available for everyone on Internet. The link to share will look similar to:

https://drive.google.com/folderview?id=0B7ftIvGKDqYMTGk0Ujd2QzhYS1U

Please note the last part that represent an ID for your directory that we are going to use below.

With this Id you can now see a directory listing by navigating to:

https://googledrive.com/host/0B7ftIvGKDqYMTGk0Ujd2QzhYS1U/

And to see a single file by adding the file name at the end to the URL :

https://googledrive.com/host/0B7ftIvGKDqYMTGk0Ujd2QzhYS1U/shBrushBash.js
 
$ curl -s -v -o tmp https://googledrive.com/host/0B7ftIvGKDqYMTGk0Ujd2QzhYS1U/shBrushBash.js 2>&1 | egrep '[><]'
> GET /host/0B7ftIvGKDqYMTGk0Ujd2QzhYS1U/shBrushBash.js HTTP/1.1
> User-Agent: curl/7.29.0
> Host: googledrive.com
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/x-javascript
< Date: Thu, 21 Nov 2013 00:38:16 GMT
< Content-Length: 2835
< Content-MD5: LXgFS0eQZq4VVenD/ymC6A==
< Last-Modified: Wed, 20 Nov 2013 22:57:22 GMT
< Cache-Control: private, max-age=60
< Expires: Thu, 21 Nov 2013 00:39:16 GMT
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Credentials: false
< Access-Control-Allow-Headers: Accept, Accept-Language, Authorization, Cache-Control, Content-Disposition, Content-Encoding, Content-Language, Content-Length, Content-MD5, Content-Range, Content-Type, Date, GData-Version, Host, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, Origin, OriginToken, Pragma, Range, Slug, Transfer-Encoding, X-ClientDetails, X-GData-Client, X-GData-Key, X-Goog-AuthUser, X-Goog-Encode-Response-If-Executable, X-Goog-Correlation-Id, X-Goog-Upload-Command, X-Goog-Upload-Content-Disposition, X-Goog-Upload-Content-Length, X-Goog-Upload-Content-Type, X-Goog-Upload-Offset, X-Goog-Upload-Protocol, X-Goog-Visitor-Id, X-HTTP-Method-Override, X-JavaScript-User-Agent, X-Origin, X-Referer, X-Upload-Content-Length, X-Upload-Content-Type, X-Use-HTTP-Status-Code-Override, X-YouTube-VVT, X-YouTube-Page-CL, X-YouTube-Page-Timestamp
< Access-Control-Allow-Methods: GET,OPTIONS
< Server: HTTP Upload Server Built on Nov 14 2013 12:41:34 (1384461694)
< Alternate-Protocol: 443:quic

References

http://googleappsdeveloper.blogspot.co.uk/2012/11/announcing-google-drive-site-publishing.html
http://lifehacker.com/5964262/host-web-pages-on-google-drive
http://stackoverflow.com/questions/14928287/webviewlink-now-returning-404-not-found
https://code.google.com/p/google-apps-script-issues/issues/detail?id=2324
http://www.myblogger-tricks.com/2013/02/how-to-host-your-web-page-content-on.html
https://googledrive.com/host/0B0ap0WDOII5mbjdwajNBMlRoZUU/index.html

Sunday, July 28, 2013

The origin of the name Google

I've recently watched a movie National Geographic - Inside Google (High-Definition) (another link to the video is below as well) and was astonished by the Google word root :). The Google company name is based on a big number name that in math is called googol. You put 'e' instead of 'o' and there you we have a Google namesake ;).


Monday, May 13, 2013

Google trends visibility

You can't see Google trends graphs on web pages if you are not logged in to your Google account. That means that his example code from Google trend may be invisible for users.
 
<script 
    type="text/javascript" 
    src="//www.google.com/trends/embed.js?hl=en-US&q=Chef+automation,+puppet+automation&date=1/2011+28m&cmpt=q&
       content=1&cid=TIMESERIES_GRAPH_0&export=5&w=500&h=330">
</script>

Example screenshots showing the the page when the graph is and isn't visible.


References
  1. http://rtomaszewski.blogspot.co.uk/2013/05/popularity-of-automation-and.html

Tuesday, February 26, 2013

Google uses OpenFlow and SDN in its data centers

I tried to describe what SDN is for network industry and how it works in this series of articles http://rtomaszewski.blogspot.co.uk/search/label/sdn. Today I've found a nice video 'OpenFlow @ Google - Urs Hoelzle, Google' that confirms that Google network uses Openflow and is build in a SDN like way. Take your time and happy watching.


Thursday, January 31, 2013

How to inspect HTTP headers for GET request in Chrome


When troubleshooting HTTP protocol it is required to inspection and verify various HTTP headers for the sending requests and receiving response.


Problem

When in Chrome navigating to http://example.com/mysite.html URL how to see all headers.

Solution and demonstration

There are very few extensions that allow you to inspect the request headers  Most of them give you access to the response data only. The Developer tools is the only one extension I found that shows request and response headers in Chrome.

This is how you can start and test it:

References
  1. https://developers.google.com/chrome-developer-tools/
  2. http://stackoverflow.com/questions/4423061/view-http-headers-in-google-chrome 
  3. http://blog.ashfame.com/2010/05/view-html-headers-firefox-google-chrome/

Monday, November 19, 2012

Openstack popularity trends over time since 2010

It is a difficult task to measure a popularity of a product, item, thing or a software. But with a help of Internet we can use specialized search engines that track internet messages and post around the world for a particular string, key work or some for of textual identity.

An simple but powerful example of such an search engine is trend search on Google: http://www.google.com/trends .

Problem

How popular is Openstack.
Who uses Openstack.

Analysis

The below graphs and stats are generated by using this link: http://www.google.com/trends/explore#q=openstack.

Q: Is Openstack getting more and more popular?
Q: How popular is Openstack?

Below is a graph from Google trends (if you can't see it you need to be logged in a Google account)


Q:
What is a country where Openstack is the most popular?
A: China

Q: Is the USA the most popular country for searches that include Openstack?
A: No


Below is a graph from Google trends (if you can't see it you need to be logged in a Google account)


Q:
Is Europe interested in Openstack?
A: Yes

Q: In what European countries is Openstack the most popular?
A: In 2012: UK, Germany, France, Spain, Sweden and Poland

Q: In what cities is Openstack the most popular?

Below is a graph from Google trends (if you can't see it you need to be logged in a Google account)

Sunday, November 18, 2012

How to extract captions from a youtube video

There are videos on youtube that are 30min and longer. You've watched a video and later on you would like to find only a single moment that is interesting for you. With a help of subtitles and key word searching we could easily do it.

Problem

How to download and search in Google text captions file from a youtube video.

Solution

There are couple of solution that can be found on Google in the referece section. All the automatic ways didn't work for me. Below is a manual method that I used to extract the subtitles (caption) file from a Google video.

  • Open a video page in Chrome browser. 
  • Enable debuging and reqeuest trucking by pressing F12 in Chrome.
  • Enable caption in the video. 
  • Navigate into the Network tab and find the last timedtext request (the last at the bottom)
  • Right click on it and open that file in a new tab; An xml file containing subtitles with the imestamps should be opened. 

References
  1. http://mvark.blogspot.in/2012/06/how-to-extract-subtitles-from-youtube.html
  2. http://stackoverflow.com/questions/10036796/how-to-extract-subtitles-from-youtube-videos
  3. http://webapps.stackexchange.com/questions/25072/how-do-i-download-subtitles-from-a-youtube-video
  4. http://www.youtube.com/watch?v=drTyNDRnyxs

Thursday, October 18, 2012

Funny picture from one of the Google's Data Center

There has been a new footage and video about a Google data center this year. To make it more interesting they created a mini Google map version where you can interactively walk through the data center building and look around ;) During my virtual journey this is what found:



References
  1. http://www.engadget.com/2012/10/17/google-inside-data-centers/
  2. http://www.engadget.com/photos/inside-google-s-data-centers/#5366823

Who owns the most servers

The cloud is expanding and changing the landscape in data centers. It would be interesting to know who has the most servers on the world, isn't it? The links below may not be fully up to date but they still revel pretty good overview about the industry. The most interesting part is the difference between the Google #1 and the rest of the world.

References
  1. http://www.datacenterknowledge.com/archives/2009/05/14/whos-got-the-most-web-servers/
  2. http://gizmodo.com/5517041/googles-insane-number-of-servers-visualized
  3. http://news.netcraft.com/archives/2012/09/10/september-2012-web-server-survey.html

Tuesday, October 9, 2012

Google does use SDN in its data centers

There is a lot of rumors that Google already uses SDN inside its data centers as well as to route and control the external traffic between them.

According to this article Going With the Flow: Google’s Secret Switch to the Next Wave of Networking Google is operating an SDN enabled network. But can you really believe in everything what you read? Researching more on the the topic of SDN plus Google I have found this more  skeptical article. It says that this may not be a whole truth Openflow @ Google: Brilliant, but not revolutionary .

Despite this to contradicting articles It would be nice to know that SDN can scale and has already proved its usefulness on a large scale. But without this there is still the open question you have to ask your self.

Is SDN really going to transform and shape the traffic within and outside of small or big data centers. Will it really provide a more sophisticated ways to control and direct the external traffic over wan links as well as over the 10 GiB enabled internal networks? Without any prove of concept (POC) this all is only one idea more that may or may not get bigger traction in networking.

To finis this up I would like to refer refer to this article Balloons, Bags, and SDNs . There is one very useful and I particularly smart conclusion about the whole SDN future:

Before you say, “it won’t scale,” ask, “compared to what?”

With it in mind let's wait how the market is going to move and what expectation will or will not be fulfilled :).