Skip to content

Instantly share code, notes, and snippets.

View jerrylau91's full-sized avatar
🎯
Focusing

debuluoooo jerrylau91

🎯
Focusing
View GitHub Profile
@jerrylau91
jerrylau91 / .eslintrc
Last active July 21, 2016 01:43
Shareable ESLint Configuration
{
"extends": "airbnb-base",
// env settings
"env": {
"browser": true,
"node": true
},
// globals
@jerrylau91
jerrylau91 / api.md
Created July 12, 2016 06:02
12306 API

12306数据接口API(草稿)

简化12306接口,规范属性名称,用于数据库设计,数据接口定义

数据定义

命名规则

@jerrylau91
jerrylau91 / margin-collapsing.md
Last active April 8, 2016 06:40
Mastering CSS Margin Collapsing

Mastering margin collapsing

掌握边距重叠

Top and bottom margins of blocks are sometimes collapsed into a single margin whose size is the largest of the margins combined into it, a behavior known as margin collapsing.

Margin collapsing occurs in three basic cases:

  • Adjacent siblings
  • Parent and first/last child If there is no border, padding, inline content, or clearance to separate the margin-top of a block from the margin-top of its first child block, or no border, padding, inline content, height, min-height or max-height to separate the margin-bottom of a block from the margin-bottom of its last child, then those margins collapse. The collapsed margin ends up outside the parent.
@jerrylau91
jerrylau91 / package.json
Created March 16, 2016 02:11
npm scripts as a build tool
{
"scripts": {
"clean": "rm -f resources/css/style.css",
"autoprefixer": "postcss -u autoprefixer -r resources/css/style.css",
"scss": "node-sass --output-style compressed --source-map true resources/sass/PPP.scss resources/css/style.css",
"serve": "browser-sync start --proxy 'ping.dev' --files 'resources/css/*.css, resources/images/*'",
"build:css": "npm run scss && npm run autoprefixer",
"build": "npm run build:css",
"watch:css": "onchange 'resources/sass/*.scss' -- npm run build:css",
"start": "npm-run-all -p serve watch:css",
@jerrylau91
jerrylau91 / correct use "em" with "rem" without "px"
Last active March 7, 2016 07:15
correct use "em" with "rem" without "px"
:root {
font-size: 16px;
}
// Or you can use html
// html {
// font-size: 16px;
// }
@jerrylau91
jerrylau91 / centos6.5_nginx
Created November 23, 2015 02:22 — forked from ifels/centos6.5_nginx
centos 6.5 nginx安装与配置
第一步,在/etc/yum.repos.d/目录下创建一个源配置文件nginx.repo:
cd /etc/yum.repos.d/
vim nginx.repo
填写如下内容:
[nginx]
name=nginx repo
@jerrylau91
jerrylau91 / rc meaning
Created November 11, 2015 07:57
What does rc mean as a file name?
The ‘rc’ suffix goes back to Unix's grandparent, CTSS.
It had a command-script feature called "runcom". Early
Unixes used ‘rc’ for the name of the operating system's
boot script, as a tribute to CTSS runcom.
"http://stackoverflow.com/questions/11030552/what-does-rc-mean-in-dot-files"
{
"Badge Text" : "",
"Working Directory" : "\/Users\/jerryrobot",
"Prompt Before Closing 2" : false,
"Selected Text Color" : {
"Green Component" : 0.5648583769798279,
"Red Component" : 0.5059919357299805,
"Blue Component" : 0.5636365413665771
},
"Rows" : 40,
@jerrylau91
jerrylau91 / README.md
Created November 11, 2015 06:39 — forked from agnoster/README.md
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark