Skip to content

Instantly share code, notes, and snippets.

🤷‍♂️
<img src="x" onerror="alert(1)" />

Wei Zhu yesmeck

View GitHub Profile
View test.md

这是一个测试

@yesmeck
yesmeck / referral.md
Last active Apr 18, 2019
🌟蚂蚁金服前端内推🌟
View useStore.js
interface State {
list: Trade[];
detail: Trade | null;
}
const initialState = {
list: [],
detail: null,
};
@yesmeck
yesmeck / bundle.js
Last active Sep 21, 2017
redundant __webpack_require__
View bundle.js
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
@yesmeck
yesmeck / detect-port
Created Jun 5, 2017
detect which command using port
View detect-port
#!/bin/sh
port=$1
pid=`lsof -i :${port} -P -t -sTCP:LISTEN`
dir=`lsof -p ${pid} | awk '$4=="cwd" {print $9}'`
cmd=`ps -o command -p ${pid} | sed -n 2p`
echo "${cmd} in ${dir}"
@yesmeck
yesmeck / fixit.sh
Last active Mar 9, 2017
Fix your js project!
View fixit.sh
#!/bin/sh
COLOR_GREEN='\033[0;32m'
echo "${COLOR_GREEN}Remove node_modules."
rm -rf node_modules
echo "${COLOR_GREEN}Remove yarn.lock."
rm -f yarn.lock
if command -v ayarn > /dev/null 2>&1; then
echo "${COLOR_GREEN}Install node_modules use ayarn."
View table-hover-edit.js
import { Table, Icon, Popover, Input } from 'antd';
class EditableTable extends React.Component {
constructor(props) {
super(props);
this.columns = [{
title: '应用名称',
dataIndex: 'appName',
key: 'appName',
You can’t perform that action at this time.