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 / 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 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 / 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 / .svnignore
Last active January 20, 2016 22:52
SVN Commands
.git
.gitignore
.DS_Store
/log
/public/*.JPEG
/public/*.jpeg
/public/*.png
/public/*.gif
@zhenyanghua
zhenyanghua / Readme.md
Last active March 16, 2016 15:34
Migration from SVN to GIT

Migration from SVN to Git

Migration is not always easy. However, git-svn is a quite useful tool to do the job.

To do the job right, this post from stackoverflow is tremendously helpful in my entire process.

I wrote the m.py to automate the entire process.

@zhenyanghua
zhenyanghua / style.css
Created March 31, 2016 23:20
Bootstrap tab content style fix.
.tab-content > .tab-pane { display: block; height: 0; overflow: hidden; }
.tab-content > .active { display: block; height: auto; }