Skip to content

Instantly share code, notes, and snippets.

View Janking's full-sized avatar

Janking Janking

View GitHub Profile
@thornbill
thornbill / .gitlab-ci.yml
Created November 22, 2016 21:29
Example Node GitLab CI Yamlfile
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
image: node:6
before_script:
- npm install
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
@TravisMullen
TravisMullen / deep-extend-obj.js
Last active March 10, 2017 01:27
Deep Extend
var deepExtend = function(out) {
out = out || {};
for (var i = 1; i < arguments.length; i++) {
var obj = arguments[i];
if (!obj)
continue;
for (var key in obj) {
// JavaScript In-Depth
JavaScript 的 function 是 first-class 的意義:
* function 可以被指派到某個變數
* function 可以當作另一個 function 的參數
* function 可以作為另一個 function 的回傳值
* function 具備和 Object 一樣的特質,包括:high order(?), assign 及 property
Higher-order function 的意義:1. function 可以將 1 或多個 function 作為參數 2. 輸出(回傳) function
// 如何呼叫 JS function //
==========================
@overtrue
overtrue / gist:f540fbea3c33e3da53fd
Created January 12, 2015 09:23
移动端头部meta大全
<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 -->
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->
<head>
<!-- 声明文档使用的字符编码 -->
<meta charset='utf-8'>
<!-- 优先使用 IE 最新版本和 Chrome -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<!-- 页面描述 -->
<meta name="description" content="不超过150个字符"/>
<!-- 页面关键词 -->