Skip to content

Instantly share code, notes, and snippets.

🎯
I may be slow to respond.

Creeper creeperyang

🎯
I may be slow to respond.
  • pdd
  • Shanghai,China
Block or report user

Report or block creeperyang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@creeperyang
creeperyang / commit.md
Created May 7, 2019 — forked from abravalheri/commit.md
RFC: Git Commit Message Guidelines
View commit.md

Commit Message Guidelines

In the last few yers, the number of programmers concerned about writting structured commit messages had dramatically grown. As exposed by Tim Pope in article readable commit messages are easy to follow when looking through the project history. Moreover the AngularJS contributing guides introduced conventions that can be used by automation tools to automatically generate useful documentation, or by developpers during debbuging process.

This document borrow some concepts, conventions and even text mainly from these two sources, extending them in order to provide a sensible guideline for writing commit messages.

View style.css
html,body { margin: 0;}
.container {
background: #f0f3f6;
display: table;
width: 100%;
/* 不加这个无法正确等宽切分 */
table-layout: fixed;
}
View 前端面试题.md
@creeperyang
creeperyang / Some words.md
Last active Jun 2, 2017
With silence and tears.
View Some words.md

1

派大星:“嗨,海绵宝宝,我们去抓水母吧!”

海绵宝宝:“对不起,今天不行,我要上学。”

派大星:“如果你去上学的话,我今天该干点什么?”

海绵宝宝:“我不知道,一般我不在家的时候,你都干些什么啊?”

View rem.js
(function (doc, win) {
var docEl = doc.documentElement,
isIPhone = window.navigator.appVersion.match(/iphone/gi),
platform = navigator.platform,
justMobile = !/win32/i.test(platform),
fontSize, scale;
recalc();
function recalc() {
var clientWidth = docEl.clientWidth;
@creeperyang
creeperyang / shell-cmd.md
Last active Jun 2, 2017
shell usage and shortcuts
View shell-cmd.md

1. move cursor

  • esc+B: left word, esc and then b
  • esc+F: right word, esc and then f
  • Ctrl+A: jump to the beginning of the current command
  • Ctrl+E: jump to the end
@creeperyang
creeperyang / selector.md
Created Jun 13, 2015
你真的了解原生 dom 选择器吗?
View selector.md

live nodelist?

  1. 只有element/document.getElementsByClassName element/document.getElementsByTagName document.getElementsByName 获取返回的才是 live HTMLCollection of found elements.
  2. querySelectorAll 等获取的是 static nodelist.

所以像操作dom发生时,尤其当心你是否获取了想要的nodelist。

@creeperyang
creeperyang / cookies.js
Created Jan 22, 2015
Manipulate cookies via js
View cookies.js
function CreateCookieMan() {
var cookieStore = getCookies();
var getAll = function() {
return cookieStore;
};
var getItem = function(name) {
return cookieStore[name];
View 有趣的插件与效果.md
View node-and-npm-in-30-seconds.sh
# See <https://gist.github.com/isaacs/579814>
# 1
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
You can’t perform that action at this time.