Getting all videos by user name using youtube data API V3

Categories: Development Notes; Tagged with: ; @ November 12th, 2015 22:32

I managed to retrieve all videos by user name using v2:

I haven’t find an API to get all videos directly, however it can be done by two steps (thanks to :

Step 1: get the user’s relatedPlaylist (uploads) id by:


Step 2: get all videos by the id retrieved in step 1:


One line to share the current folder via HTTP

Categories: Python; Tagged with: ; @ November 7th, 2015 18:23
>python -m SimpleHTTPServer $PORT

Connecting to Azure Windows virtual machine from Mac

Categories: Development Notes; Tagged with: ; @ October 31st, 2015 17:00


“Cannot verify the identity of the computer that you want to connect to” when I trying to remote login to my Azure virtual machine using ‘Microsoft Remote Desktop Connection Client for Mac 2.1.1′

You may try another client –  Microsoft Remote Desktop’ from iTunes 


Using Event with Polymer

Categories: HTML5; Tagged with: ; @ October 15th, 2015 22:26

Dispatching Event:

<link rel="import" href="../bower_components/polymer/polymer.html" />
<link rel="import" href="../bower_components/iron-icons/iron-icons.html" >
<link rel="import" href="../bower_components/paper-button/paper-button.html" />

<dom-module id="item-detail">
        <div id="container">
        <paper-button on-tap="onAddToCart"><iron-icon icon="icons:shopping-cart"></iron-icon>AddToCart</paper-button>

            is: 'item-detail',

            properties: {
                item_id: {
            onAddToCart: function(e) {
      'eventAddToCart', {item_id: this.item_id});

Event Listener:

<link rel="import" href="bower_components/polymer/polymer.html" />
<link rel="import" href="element/item-detail.html">

<dom-module id="main-app">
        <item-detail id="item_detail" item_id="{{current_detail_id}}"></
            is: 'main-app',

            listeners: {
                'item_detail.eventAddToCart': 'onAddToCart'

            onAddToCart: function(e) {
                console.log('Event received' + e.detail.item_id);
                // this.addToCart(e.detail.item_id);

Dropbox Python SDK 2.2.0 bug: commit_chunked_upload ?

Categories: Development NotesPython; Tagged with: ; @ August 2nd, 2015 23:04

Issue:  dropbox keep ignoring the first folder when committing a chunked upload:

After chunked uploading completed, commit the file by:

response = self.dropbox_client.commit_chunked_upload('/backup/', upload_id, False)
remote_path = response['path']

My understanding was remote_path in the response should be same as the full_path I passed: ‘/backup/’, however, the remote_path is: ‘’. form /commit_chunked_upload:

The full path to which the chunks are uploaded, *including the file name*.
If the destination folder does not yet exist, it will be created.

full path with filename, and it’ll be used by:

url, params, headers = self.request("/commit_chunked_upload/%s" % full_path,
                                    params, content_server=True)

a http request to : /commit_chunked_upload//backup/ will be sent. however, the actual server url is:<path>

Solution / workaround

1. fix the SDK :
Following CheckedUpload class,  the commit url can be generated by:

path = “/commit_chunked_upload/%s%s” % (self.client.session.root, format_path(path))

2. add ‘auto’ in the front of the remote path:

response = self.dropbox_client.commit_chunked_upload('auto/' + remote_path, upload_id, False)

Older Posts

Popular Tags



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.