This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# temp save git change | |
git stash | |
# list stashed items | |
git stash list | |
# get back | |
git stash pop | |
# get specify version back | |
git stash apply stash@{1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prepare | |
edit ~/.hgrc like this: | |
[ui] | |
username=Name <your@email> | |
[extensions] | |
hgext.mq = | |
[diff] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Main entry point. | |
* | |
* the DOM has been localized and the user sees it in their language. | |
* | |
* @class Main | |
*/ | |
(function() { | |
'use strict'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Main entry point. | |
* | |
* the DOM has been localized and the user sees it in their language. | |
* | |
* @class Main | |
*/ | |
(function() { | |
'use strict'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Take Flux concept | |
* | |
* the DOM has been localized and the user sees it in their language. | |
* | |
* @class Main | |
*/ | |
(function(exports) { | |
'use strict'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/gulpjs/gulp/issues/873 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.unselectable { | |
-webkit-touch-callout:none; | |
-webkit-user-select: none; | |
-khtml-user-select:none; | |
-moz-user-select: none; | |
-ms-user-select: none; | |
user-select:none; | |
} |