Skip to content

Instantly share code, notes, and snippets.

HACK21 HACK21

Block or report user

Report or block HACK21

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View deferComponentRender.js
import hoistStatics from 'hoist-non-react-statics';
import React from 'react';
/**
* Allows two animation frames to complete to allow other components to update
* and re-render before mounting and rendering an expensive `WrappedComponent`.
*/
export default function deferComponentRender(WrappedComponent) {
class DeferredRenderWrapper extends React.Component {
constructor(props, context) {
@HACK21
HACK21 / index.html
Created Sep 21, 2016 — forked from anonymous/index.html
JS Bin [美团面试两列排序] // source https://jsbin.com/mejapis
View index.html
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[美团面试两列排序]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@HACK21
HACK21 / file_path_test.sh
Last active Dec 8, 2015 — forked from feng-ming/file_path_test.sh
unix shell 判断目录/文件是否存在, 以及是否有读写权限。
View file_path_test.sh
shell判断文件,目录是否存在或者具有权限
#!/bin/sh
Path="/var/log/httpd/"
File="/var/log/httpd/access.log"
#这里的-x 参数判断$Path是否存在并且是否具有可执行权限
if [ ! -x "$Path"]; then
mkdir "$Path"
fi
You can’t perform that action at this time.