Skip to content

Instantly share code, notes, and snippets.

View XiufengChen's full-sized avatar
🌝
I may be slow to respond.

Xiufeng Chen XiufengChen

🌝
I may be slow to respond.
View GitHub Profile
@XiufengChen
XiufengChen / vanilla-js-cheatsheet.md
Created September 22, 2020 19:55 — forked from thegitfather/vanilla-js-cheatsheet.md
Vanilla JavaScript Quick Reference / Cheatsheet
@XiufengChen
XiufengChen / introrx.md
Created August 2, 2020 03:08 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@XiufengChen
XiufengChen / jQuery-plugin-authoring.md
Created October 20, 2019 21:14 — forked from quexer/jQuery-plugin-authoring.md
如何编写 jQuery 插件

创建插件


看来 jQuery 你已经用得很爽了,想学习如何自己编写插件。非常好,这篇文档正适合你。用插件和方法来扩展 jQuery 非常强大,把最聪明的功能封装到插件中可以为你及团队节省大量开发时间。

开始

@XiufengChen
XiufengChen / iframe.html
Created October 8, 2019 15:41 — forked from cirocosta/iframe.html
Sending messages from child iframe to parent webpage
<!DOCTYPE html>
<html>
<head>
<title>My Iframe</title>
</head>
<body>
<button>Botão</button>
<script type="text/javascript">
@XiufengChen
XiufengChen / Revealing-Module-Pattern.md
Created September 23, 2019 16:04 — forked from zcaceres/Revealing-Module-Pattern.md
Using the Revealing Module Pattern in Javascript

The Revealing Module Pattern in Javascript

Zach Caceres

Javascript does not have the typical 'private' and 'public' specifiers of more traditional object oriented languages like C# or Java. However, you can achieve the same effect through the clever application of Javascript's function-level scoping. The Revealing Module pattern is a design pattern for Javascript applications that elegantly solves this problem.

The central principle of the Revealing Module pattern is that all functionality and variables should be hidden unless deliberately exposed.

Let's imagine we have a music application where a musicPlayer.js file handles much of our user's experience. We need to access some methods, but shouldn't be able to mess with other methods or variables.

Using Function Scope to Create Public and Private Methods

@XiufengChen
XiufengChen / css-media-queries-cheat-sheet.css
Created May 6, 2019 19:15 — forked from bartholomej/css-media-queries-cheat-sheet.css
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@XiufengChen
XiufengChen / System Design.md
Created August 15, 2018 00:17 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@XiufengChen
XiufengChen / README.md
Created October 13, 2017 03:25 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


General
1. Site uses a cache buster for expiring .js, .css, and images
2. JavaScript and CSS is minified and concatenated into logical groupings
3. Images have been optimized by ImageOptim (http://imageoptim.com/)
Markup
1. Code does not contain inline JavaScript event listeners
  1. 每个开发者根据一个base branch(在我们的前端项目中大多数情况下为develop)创建一个自己的feature branch
  2. 完成feature branch开发以后,确认无误,push到相应的branch上
  3. 在github网站上,可以看到

Imgur

点击Compare & pull request 4. 选择创建时的base branch,后面是自己的branch,并且填写pull request记录, create pull request

Imgur