Skip to content

Instantly share code, notes, and snippets.

View nickmalcolm's full-sized avatar

Nick Malcolm nickmalcolm

View GitHub Profile
@nickmalcolm
nickmalcolm / gdrive_files_sample.rb
Created April 15, 2015 21:02
The code we use to paginate through results.
result = @client.execute api_method: @client.drive.files.list, parameters: {
q: "trashed=false and mimeType != 'application/vnd.google-apps.folder'",
pageToken: page_token,
fields: "etag,items(etag,sharingUser,writersCanShare,thumbnailLink,lastModifyingUser,alternateLink,indexableText,owners,id,modifiedByMeDate,description,embedLink,folderColorRgb,thumbnail,downloadUrl,originalFilename,iconLink,editable,exportLinks,mimeType,createdDate,modifiedDate,headRevisionId,lastViewedByMeDate,webViewLink,fileExtension,webContentLink,labels,fileSize,quotaBytesUsed,markedViewedByMeDate,userPermission,defaultOpenWithLink,videoMediaMetadata,appDataContents,imageMediaMetadata,permissions,kind,version,ownerNames,copyable,parents,title,properties,selfLink,shared,lastModifyingUserName,openWithLinks,sharedWithMeDate,md5Checksum,explicitlyTrashed),kind,nextLink,nextPageToken,selfLink"
}

Keybase proof

I hereby claim:

  • I am nickmalcolm on github.
  • I am nickmalcolm (https://keybase.io/nickmalcolm) on keybase.
  • I have a public key whose fingerprint is 0345 8E14 05AE CE7B 5E32 70D2 96BD ED27 0C64 9667

To claim this, I am signing this object:

Code for a Facebook Like Button

Since you have to log in to Facebook to get the html for a share / like / recommend button, here is the code. More options are at https://developers.facebook.com/docs/plugins/like-button

HTML5

Include the JavaScript SDK on your page once, ideally right after the opening tag.

<div id="fb-root"></div>