Skip to content

Instantly share code, notes, and snippets.

View ZheFeng's full-sized avatar

Zhe Feng ZheFeng

  • Alibaba Group
  • Hangzhou, China
View GitHub Profile
//现在有一个 Ajax 接口,根据用户 uid 获取用户 profile 信息,是一个批量接口。我把这个 ajax 请求封装成以下的异步函数
var requestUserProfile = function (uidList) { // uidList 是一个数组,最大接受 100 个 uid
// 这个方法的实现不能修改
/** 先去重 */
var uidList = uidList || [];
var _tmp = {};
var _uidList = [];
uidList.forEach(function (uid) {
if (!_tmp[uid]) {
//现在有一个 Ajax 接口,根据用户 uid 获取用户 profile 信息,是一个批量接口。我把这个 ajax 请求封装成以下的异步函数
var requestUserProfile = function (uidList) { // uidList 是一个数组,最大接受 100 个 uid
// 这个方法的实现不能修改
/** 先去重 */
var uidList = uidList || [];
var _tmp = {};
var _uidList = [];
uidList.forEach(function (uid) {
if (!_tmp[uid]) {
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"Package Control",
"Solarized Color Scheme",
"Sync Settings",
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@ZheFeng
ZheFeng / .vimrc.after
Created June 17, 2016 00:16 — forked from wilmoore/.vimrc.after
Vim Configuration
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" My Personal Vim Configuration
" Wil Moore III <[email protected]>
"
" I keep this configuration documented here:
" https://gist.github.com/3901161
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""
"" base
@ZheFeng
ZheFeng / iterm2-solarized.md
Created June 16, 2016 14:19 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)

Solarized

# robots.txt generated at http://portal.qiniu.com
User-agent: Baiduspider
Disallow: /
User-agent: Sosospider
Disallow: /
User-agent: sogou spider
Disallow: /
User-agent: YodaoBot
Disallow: /
User-agent: Googlebot
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/User/SublimeLinter/Material-Theme (SL).tmTheme",
"default_encoding": "UTF-8",
"detect_indentation": true,
"draw_indent_guides": true,
"draw_white_space": "all",
"enable_tab_scrolling": true,
location /api {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
rewrite /api/(.*) /$1 break;
proxy_pass http://localhost:1234;
proxy_redirect off;
}
{
"name": "application-name",
"version": "0.0.1",
"main": "app.js",
"private": true,
"scripts": {
"start": "node app"
},
"devDependencies": {
"chai": "*",