Skip to content

Instantly share code, notes, and snippets.

@yangfch3
yangfch3 / .eslintrc.js
Last active June 30, 2021 04:51
eslint-config 文件配置说明
{
// 继承,可以继承多个
// 如安装了 eslint-config-airbnb
// 就可以在 extends 这里引用 airbnb/base, 这样就相当于预设了 airbnb/base 的规则
// 常用的预设:"eslint:recommended" "airbnb/base" "stanard"(需先安装 eslint-config-standard)
// 当然,除了 eslint-config-xxx 提供了一系列预设,插件(eslint-plugin-xxx)也能提供预设用于继承
// 例如,当你安装了 eslint-plugin-react 时,就可以在 extends 这里指定 "plugin:react/recommended"
// 当然,也可以指定一个具体的 eslint 配置文件 path/to/file 继承
"extends": [
"airbnb/base"
@kejun
kejun / gist:3f4851c7f3b3e209fcbb
Last active July 9, 2019 15:23
最近一次项目的总结

mathclub是最近做的一个个人项目,帮助考SAT的同学通过在线做题、回顾、问答提高成绩。用户功能有:计次/计时做题、成绩单、错题分布、错题回顾、提问、汇总以及注册登录。管理后台主要是题库管理、学员管理、成绩单管理、问题回复。怎么看都像学校里的课设,的确项目本身并不出奇,开发上选用的一些方案或许更有意思。

整个项目一个人从产品需求、原型设计、前后端开发到部署历时2周左右。可以从截图上感受一下:

image

技术选型上服务端是Node.js,应用框架选了老牌的Express(4.x变化挺大不少中间件都废了),数据服务用的是MongoLab(MongoDB的云服务平台),图片上传用的是又拍云,程序部署在Nodejitsu上。模板引擎没选主流的Jade或ejs,而是用Express React Views它实现了在服务端渲染React组件。前端框架是用React,这次有意想追求前后端全部组件化的组织。之前是用Webpack实现CommonJS模块打包,这次用Browserify配置更简单,它有丰富的transform很赞,其中的reactify转换React的JSX很完美。CSS用Sass+autoprefixer让人省心。将这一切串起来的自动构建工具是Gulp。我其实崇尚用最精简的工具组合开发,上述组合在我看来比较精简了。(帖纸留念)

![image](http://satexam.b0.upaiyu

@caseylai
caseylai / git-flow helper.md
Created August 13, 2014 10:13
Git 开发流程规范(试用版)

#Git 开发流程规范(试用版)

为规范Git在版本控制方面的使用,引入工具git-flow进行分支管理

安装 git-flow

Mac OS X

brew install git-flow
@xyqfer
xyqfer / cookie.js
Created September 28, 2013 07:35
cookie
@barryvdh
barryvdh / carousel.js
Last active March 21, 2024 01:10
Bootstrap Carousel, with jQuery fallback for Internet Explorer (To have sliding images)
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 30, 2024 04:42
A badass list of frontend development resources I collected over time.
@weishai
weishai / JsonUti.js
Last active December 17, 2015 22:59
简单的js代码可以实现格式化json,使用方法很简单: 网页换行和制表符不一样,设置一下 JsonUti.n = "<br />"; JsonUti.t = "&nbsp;&nbsp;&nbsp;"; document.getElementById("afterformat").innerHTML = JsonUti.convertToString(json); 需要注意,此处的json是JSON类型,如果是string的话需要先把string转成JSON格式。
var JsonUti = {
//定义换行符
n: "\n",
//定义制表符
t: "\t",
//转换String
convertToString: function(obj) {
return JsonUti.__writeObj(obj, 1);
},
//写对象
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@paulirish
paulirish / rAF.js
Last active March 22, 2024 00:00
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];