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
set -g default-command /bin/zsh set -g default-shell /bin/zsh | |
set-option -g mouse-select-pane on | |
set-option -g mouse-select-window on | |
set-window-option -g mode-mouse on |
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
audio { | |
display: none; | |
} |
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
#box { | |
width: 300px; | |
background-color: #f8f8f8; | |
padding: 10px; | |
} | |
.details { | |
height: 0px; | |
overflow: hidden; | |
} | |
.close { |
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
.flexcroll{ height:200px; | |
overflow:auto; | |
} | |
.flexcroll{ | |
scrollbar-face-color: #367CD2; | |
scrollbar-shadow-color: #FFFFFF; | |
scrollbar-highlight-color: #FFFFFF; | |
scrollbar-3dlight-color: #FFFFFF; | |
scrollbar-darkshadow-color: #FFFFFF; | |
scrollbar-track-color: #FFFFFF; |
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
// @credit to http://stackoverflow.com/questions/8567114/how-to-make-an-ajax-call-without-jquery | |
function ajax(options) { | |
if (!options) { | |
throw new Error('Ajax: options is missing'); | |
} | |
if (!options.url) { | |
throw new Error('Ajax: options.url is missing'); | |
} | |
var async = options.async === undefined ? true : (!!options.async); | |
var type = options.type || 'GET'; |
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
/***** Fixed Phone Number Regex *****/ | |
/* | |
Fixed phone numbers' format: | |
(district number)-(phone number) | |
*/ | |
var phoneRegex = /^(0[\d]{2,3}-)?[\d]{7,8}$/; | |
phoneRegex.test("020-82376643"); //=> true | |
phoneRegex.test("0755-6633868"); //=> true |
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
var __hasProp = {}.hasOwnProperty; | |
var __extends = function(child, parent) { | |
for (var key in parent) { | |
if (__hasProp.call(parent, key)) child[key] = parent[key]; | |
} | |
function ctor() { | |
// why set the prototype's constructor to child? | |
this.constructor = child; | |
} | |
ctor.prototype = parent.prototype; |
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
// arr = [12,3,7] | |
// arr_source = [{id:1, name:'a'}, {id:2, name:'b'}, ..., {id:100, name:'xxxx'}] | |
// sort arr_source based on arr: | |
// [{id: 12, name: 'xx'}, {id: 3, name: 'xxx'}, {id: 7, name: 'xxx'}, …., {id: 100, name: 'xxxx'}] | |
const sortByArr = (targetArr, orderArr) => { | |
let ret = orderArr.slice(0) | |
targetArr.forEach((item,index) => { | |
let orderIndex = orderArr.indexOf(item.id) | |
if (orderIndex > -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
//=== Using Observable.create() ===// | |
import Rx from 'rxjs/Rx' | |
let observable = Rx.Observable | |
.create(observer => { | |
observer.next('Jerry') | |
observer.next('Anna') | |
}) | |
// OR: | |
// let observable = Rx.Observable.of('Jerry', 'Anna') | |
// let observable = Rx.Observable.from(['Jerry', 'Anna']) // **any enumerables** |
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
<template> | |
<div class="item">{{ number }}</div> | |
</template> | |
<script> | |
export default { | |
name: 'TestItem', | |
props: { | |
number: Number | |
} |