Skip to content

Instantly share code, notes, and snippets.

@mkaminsky11
mkaminsky11 / download.js
Last active October 20, 2022 12:17
How to manipulate Google Drive files
/*
Download a file
*/
function downloadFile(fileId) {
var request = gapi.client.drive.files.get({
'fileId': fileId
});
request.execute(function(resp) {
window.location.assign(resp.webContentLink);
});
@gudbergur
gudbergur / README.markdown
Created February 19, 2012 23:49
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string