Skip to content

Instantly share code, notes, and snippets.

@zhenyong
zhenyong / gen-eslintrc-for-webstorm.js
Last active July 25, 2017 04:16
Generate eslintrc (json) file since only .eslintrc files are supported (import formatter). And only rules present in the .eslintrc file. Extends are not supported.
const cp = require('child_process');
const fs = require('fs');
cp.exec('eslint --print-config ./eslintrc.js', {}, (err, stdout, stderr) => {
if (stderr) {
console.log(stderr);
return;
}
fs.writeFileSync('./.eslintrc', stdout);
});
@zhenyong
zhenyong / walksync.js
Created July 4, 2017 02:57 — forked from kethinov/walksync.js
List all files in a directory in Node.js recursively in a synchronous fashion
// List all files in a directory in Node.js recursively in a synchronous fashion
var walkSync = function(dir, filelist) {
var fs = fs || require('fs'),
files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function(file) {
if (fs.statSync(dir + file).isDirectory()) {
filelist = walkSync(dir + file + '/', filelist);
}
else {
@zhenyong
zhenyong / .jshintrc
Created April 29, 2016 07:03
jshint配置中文注释
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
//jshint options document: [http://jshint.com/docs/options/#strict](http://jshint.com/docs/options/#strict)
"maxerr" : 50, // {int} 超过{int}个错误后,停止检测错误
// Enforcing
"bitwise" : false, // true: 禁止使用位逻辑符 (&, |, ^, ...)
"camelcase" : false, // true: 变量名必须是驼峰风格
@zhenyong
zhenyong / lib_collect.md
Last active May 30, 2016 07:37
收集前端工具库

web

名称 功能
bootstrap-wysiwyg 富编辑器
almond 小型AMD
backbone.picky 是的模型有些selectable的属性
ExplorerCanvas <=IE8可以用canvas的api
fullcalendar jquery的月日历面板控件,多种视图,类似手机的日历
jquery.easy-pie-chart jquery的pie图
spin loading动态图
快捷键 功能
cmd + shift + p 打开命令菜单
cmd + t 模糊搜索工作目录下的文件
cmt + b 搜索已经打开的文件
ctrl + 0 焦点移动到文件目录
cmd + \ 隐藏左侧目录树
ctrl + [ 目录中展开结点
ctrl + ] 目录中缩起结点
d / a / m 对目录选中的结点进行 删除 / 添加 / 移动

2013-12-25

##本周计划

  • 学生自己过一遍w3c文档中的 html & css 部分,每人挑选两个手机应用界面来练习
  • 进行一次网络会议,讲解css中常用部分,介绍盒子模型
  • 学生自己过一遍w3c文档中 javascript 部分
  • 周日实验室培训,主要内容:
    • css练习评析
    • js动态语言特性
@zhenyong
zhenyong / css_resources.md
Created January 28, 2014 14:11 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@zhenyong
zhenyong / python_resources.md
Created January 28, 2014 14:11 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides