Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

jerry lau Jerry-Lau

🎯
Focusing
Block or report user

Report or block Jerry-Lau

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
@Jerry-Lau
Jerry-Lau / mobile-layout.js
Created Oct 23, 2019
手机端页面自适应解决方案—rem布局进阶版
View mobile-layout.js
/**
* @param {Boolean} [normal = false] - 默认开启页面压缩以使页面高清;
* @param {Number} [baseFontSize = 100] - 基础fontSize, 默认100px;
* @param {Number} [fontscale = 1] - 有的业务希望能放大一定比例的字体;
*/
const win = window;
export default win.flex = (normal, baseFontSize, fontscale) => {
const _baseFontSize = baseFontSize || 100;
const _fontscale = fontscale || 1;
@Jerry-Lau
Jerry-Lau / curl.md
Created Jan 28, 2018 — forked from subfuzion/curl.md
curl POST examples
View curl.md

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@Jerry-Lau
Jerry-Lau / .zshrc
Created Dec 14, 2017
my zsh config
View .zshrc
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Uncomment the following line to use case-sensitive completion.
@Jerry-Lau
Jerry-Lau / .eslintrc
Last active Nov 30, 2017
eslint rules based airbnb javascript style guide
View .eslintrc
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"extends": [
"airbnb" // 以社区广泛使用的 airbnb 风格指南作为基础
],
@Jerry-Lau
Jerry-Lau / rewrite-nginx-server.conf
Created Aug 30, 2017
remove html extension and trailing slash with nginx
View rewrite-nginx-server.conf
server {
listen 80;
server_name test.com *.test.com;
rewrite ^(/.*)\.html(\?.*)?$ $1$2 permanent;
rewrite ^/(.*)/$ /$1 permanent;
root /path/to/project/root;
index index.html;
try_files $uri/index.html $uri.html $uri/ $uri =404;
@Jerry-Lau
Jerry-Lau / JS-Function-Bind
Created Aug 25, 2017
JS Function.prototype.bind usage
View JS-Function-Bind
## What does Function.prototype.bind do ?
Function.prototype.bind = function (scope) {
if (typeof this !== "function") {
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
}
var fn = this;
return function () {
return fn.apply(scope);
@Jerry-Lau
Jerry-Lau / phpdemo.conf
Last active Aug 24, 2017
Nginx PHP configuration
View phpdemo.conf
server {
listen 8090;
server_name localhost;
root /Users/jerryliu/Coding/myapp/phpdemo01;
index index.php index.html index.htm;
autoindex off;
location / {
try_files $uri $uri/ /index.php;
@Jerry-Lau
Jerry-Lau / .eslintrc
Last active Jul 21, 2016
Shareable ESLint Configuration
View .eslintrc
{
"extends": "airbnb-base",
// env settings
"env": {
"browser": true,
"node": true
},
// globals
View api.md

12306数据接口API(草稿)

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

数据定义

命名规则

You can’t perform that action at this time.