Skip to content

Instantly share code, notes, and snippets.

@SmokyBob
SmokyBob / gist:82028bb6ad860bc1ce64
Created November 23, 2014 14:18
webcomponents load only when needed
<script>
if ('registerElement' in document
&& 'createShadowRoot' in HTMLElement.prototype
&& 'import' in document.createElement('link')
&& 'content' in document.createElement('template')) {
// We're using a browser with native WC support!
} else {
document.write('<script src="https:\/\/cdnjs.cloudflare.com/ajax/libs/polymer/0.3.4/platform.js"><\/script>')
}
</script>
@SmokyBob
SmokyBob / AndroidManifest.xml
Created December 1, 2013 15:09
Google Drive Quick Start with Android Studio
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.smokybob.testgdrive"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<uses-permission
// Replace 'dependencies' in your build.gradle file with the following
// or add these to whatever other dependencies you have.
dependencies {
compile 'com.android.support:support-v4:19.0.0'
compile 'com.google.android.gms:play-services:4.0.30'
compile('com.google.api-client:google-api-client-xml:1.17.0-rc') {
exclude group: 'com.google.android.google-play-services'
}
compile 'com.google.http-client:google-http-client-gson:1.17.0-rc'