Skip to content

Instantly share code, notes, and snippets.

View creeperyang's full-sized avatar
I may be slow to respond.

Creeper creeperyang

I may be slow to respond.
  • pdd
  • Shanghai,China
View GitHub Profile
creeperyang /
Created May 7, 2019 05:31 — forked from abravalheri/
RFC: Git Commit Message Guidelines

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.

creeperyang / style.css
Last active January 23, 2019 04:23
html,body { margin: 0;}
.container {
background: #f0f3f6;
display: table;
width: 100%;
/* 不加这个无法正确等宽切分 */
table-layout: fixed;
creeperyang / Some
Last active June 2, 2017 16:52
With silence and tears.






creeperyang / rem.js
Created November 28, 2016 10:42
rem helper
(function (doc, win) {
var docEl = doc.documentElement,
isIPhone = window.navigator.appVersion.match(/iphone/gi),
platform = navigator.platform,
justMobile = !/win32/i.test(platform),
fontSize, scale;
function recalc() {
var clientWidth = docEl.clientWidth;
creeperyang /
Last active June 2, 2017 16:29
shell usage and shortcuts

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 /
Created June 13, 2015 08:35
你真的了解原生 dom 选择器吗?

live nodelist?

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


creeperyang / cookies.js
Created January 22, 2015 04:31
Manipulate cookies via js
function CreateCookieMan() {
var cookieStore = getCookies();
var getAll = function() {
return cookieStore;
var getItem = function(name) {
return cookieStore[name];
# See <>
# 1
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl | tar xz --strip-components=1
./configure --prefix=~/local