Skip to content

Instantly share code, notes, and snippets.

View zhenyanghua's full-sized avatar
🐢
I may be slow to respond.

Zhenyang Hua zhenyanghua

🐢
I may be slow to respond.
View GitHub Profile
@zhenyanghua
zhenyanghua / code.gs
Created July 15, 2014 19:55
Googlemaps + Google Sheets + Google Forms
var SPREADSHEET_ID='Google Sheets ID';
var SHEET_NAME = 'Google Sheets Table Name';
function doGet(request) {
var callback = request.parameters.jsonp;
var range = SpreadsheetApp.openById(SPREADSHEET_ID).getSheetByName(SHEET_NAME).getDataRange();
var json = callback+'('+Utilities.jsonStringify(range.getValues())+')';
return ContentService.createTextOutput(json).setMimeType(ContentService.MimeType.JAVASCRIPT);
}
@zhenyanghua
zhenyanghua / reset.css
Created December 6, 2014 04:38
CSS Reset | Copy and paste belowing CSS to the top of your new CSS file.
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@zhenyanghua
zhenyanghua / designer.html
Last active August 29, 2015 14:19
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../core-icons/core-icons.html">
@zhenyanghua
zhenyanghua / polymer_gmaps.html
Last active August 29, 2015 14:19
Polymer with Google Maps API
<link rel="import" href="../bower_components/core-scaffold/core-scaffold.html">
<link rel="import" href="../bower_components/core-header-panel/core-header-panel.html">
<link rel="import" href="../bower_components/core-toolbar/core-toolbar.html">
<link rel="import" href="../bower_components/paper-tabs/paper-tabs.html">
<link rel="import" href="../bower_components/paper-tabs/paper-tab.html">
<link rel="import" href="../bower_components/paper-button/paper-button.html">
<link rel="import" href="../bower_components/core-icons/core-icons.html">
<link rel="import" href="../bower_components/core-icon/core-icon.html">
<link rel="import" href="../bower_components/core-animated-pages/core-animated-pages.html">
<link rel="import" href="../bower_components/core-animated-pages/transitions/hero-transition.html">
@zhenyanghua
zhenyanghua / index.html
Created April 25, 2015 05:34
Polyline Interpolation
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html, body, #map-canvas { height: 100%; margin: 0; padding: 0;}
</style>
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?libraries=geometry&key=AIzaSyA7U_W-DipuiGaONpCHJiCxTF9-plPU4o4">
</script>
<script type="text/javascript">
@zhenyanghua
zhenyanghua / index.html
Created May 5, 2015 14:59
iPhone CSS no image
<div class="phone">
<div id="case">
<div id="earsection">
<div id="camera"></div>
<div id="speaker"></div>
</div>
<div id="screen"></div>
<div id="button">
<div id="buttonsquare"></div>
</div>
@zhenyanghua
zhenyanghua / mobile.js
Created May 5, 2015 15:09
Detecting a mobile browser
function detectmob() {
if( navigator.userAgent.match(/Android/i)
|| navigator.userAgent.match(/webOS/i)
|| navigator.userAgent.match(/iPhone/i)
|| navigator.userAgent.match(/iPad/i)
|| navigator.userAgent.match(/iPod/i)
|| navigator.userAgent.match(/BlackBerry/i)
|| navigator.userAgent.match(/Windows Phone/i)
){
return true;
@zhenyanghua
zhenyanghua / .gitignore
Created May 14, 2015 14:44
Git Ignore List
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@zhenyanghua
zhenyanghua / Readme.md
Last active December 16, 2016 02:57
ArcGIS Web Appbuilder Secrets

Up and run with Tutorial

Esri Tutorial covers most part of the content for you to get up and running a customized widget that can be used in the Web Appbuilder.

However, the current release of the Appbuilder (1.3) is still buggy and doesn't cover some on-demand customization. Here are some points that will come in handy when you need them.

How to debug a widget in development?

How to debug a configuration page in development?

@zhenyanghua
zhenyanghua / .svnignore
Last active January 20, 2016 22:52
SVN Commands
.git
.gitignore
.DS_Store
/log
/public/*.JPEG
/public/*.jpeg
/public/*.png
/public/*.gif