Skip to content

Instantly share code, notes, and snippets.

View jiraiyame's full-sized avatar
🎯
Focusing

jiraiyame

🎯
Focusing
View GitHub Profile

ECMAScript6th Quiz

Q.1

let func = function() {};
func.name
  1. ""
  2. "func"

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@demisx
demisx / gulpfile.js
Last active July 14, 2022 16:06
Gulp 4 gulpfile.js
// Gulp 4
var gulp = require('gulp');
var using = require('gulp-using');
var grep = require('gulp-grep');
var changed = require('gulp-changed');
var del = require('del');
var coffee = require('gulp-coffee');
var less = require('gulp-less');
var coffeelint = require('gulp-coffeelint');
var sourcemaps = require('gulp-sourcemaps');
@rottmann
rottmann / gist:81b7330f574132e04dbe
Last active August 29, 2015 14:07
React-Router with Auth
// Router
var routes = (
<Routes location="history">
<Route name="index" path="/" handler={App}>
<Route name="test" path="/test/" handler={Test} />
</Route>
<Route name="login" path="/login/" handler={Login}>
</Route>
<Redirect to="index" />
</Routes>
@kejun
kejun / gist:3f4851c7f3b3e209fcbb
Last active September 2, 2024 03:58
最近一次项目的总结

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

@dexteryy
dexteryy / standards_for_webapps_on_mobile.md
Last active August 17, 2017 02:16
W3C Standards for Web Apps on Mobile (After HTML5)
@staltz
staltz / introrx.md
Last active May 12, 2025 23:22
The introduction to Reactive Programming you've been missing
@kl0tl
kl0tl / lazy.js
Last active July 11, 2019 05:55
Lazy initialization with Object.defineProperty
var accessorDescriptor, valueDescriptor;
accessorDescriptor = {
__proto__: null,
get: null, set: null,
enumerable: true,
configurable: true
};
valueDescriptor = {
@maisui99
maisui99 / css-to-base64
Last active August 29, 2015 14:01
css images to base64 and fix ie6/7
/**
* Created with IntelliJ IDEA.
* @author: butian.wth
* @version: 1-0-0
* Date: 14-5-27
* Time: 下午5:23
*/
//new Buffer("Hello World").toString('base64')