Skip to content

Instantly share code, notes, and snippets.

View gasolin's full-sized avatar

gasolin gasolin

View GitHub Profile
<h3>BMI</h3>
<label for="height">Height(cm)</label>
<input id="height"></input>
<br/>
<label for="weight">Weight(kg)</label>
<input id="weight"></input>
<br/>

name: inverse layout: true class: center, middle, inverse

WebApplate Overview

[gasolin]


TL;DR a template for maintainable web app project.

@gasolin
gasolin / gaiabutton.md
Last active August 29, 2015 14:21
gaia-button syntax proposal v2

<gaia-button> devDependency Status

Installation

$ bower install gaia-components/gaia-button

Then include folowing files in HTML

@gasolin
gasolin / gpush.sh
Created May 12, 2015 02:17
alias for gh-pages push, single command to update master to gh-pages. Ref http://stackoverflow.com/questions/5807459/github-mirroring-gh-pages-to-master
alias gpush="git checkout gh-pages && git merge master && git push origin gh-pages && git checkout -"
@gasolin
gasolin / unselectable
Created April 16, 2015 02:49
user not selectable in browser
.unselectable {
-webkit-touch-callout:none;
-webkit-user-select: none;
-khtml-user-select:none;
-moz-user-select: none;
-ms-user-select: none;
user-select:none;
}
@gasolin
gasolin / gist:cf5d494c2cc56313c3fe
Created April 14, 2015 16:42
fix gulp reference
https://github.com/gulpjs/gulp/issues/873
@gasolin
gasolin / apply_patch.sh
Created January 26, 2015 06:38
apply/reverse patch from PR
# apply patch from PR
$ curl https://github.com/mozilla-b2g/gaia/pull/12345.patch | git apply
# reverse patch from PR, R is for reverse
$ curl https://github.com/mozilla-b2g/gaia/pull/12345.patch | git apply -R
/* original link http://blog.gasolin.idv.tw/2014/11/flux-javascript.html */
// Renderer.js
var ClickRenderer = {
init: function s_init(element, Store) {
this.element = element;
this.store = Store;
window.addEventListener('render_view1', this);
},
handleEvent: s_handleEvent(evt) {
document.getHTML = function(who){
var txt, ax, el= document.createElement("div");
el.appendChild(who.cloneNode(false));
txt= el.innerHTML;
ax= txt.indexOf('>')+1;
txt= txt.substring(0, ax)+who.innerHTML+ txt.substring(ax);
el= null;
return txt.replace(/>/g,'>\n');
}
@gasolin
gasolin / task_flux.js
Last active August 29, 2015 14:07
SPA todo app III, not handle db parts yet
/**
* Take Flux concept
*
* the DOM has been localized and the user sees it in their language.
*
* @class Main
*/
(function(exports) {
'use strict';