Skip to content

Instantly share code, notes, and snippets.

View yesmeck's full-sized avatar
:octocat:
<img src="x" onerror="alert(1)" />

Wei Zhu yesmeck

:octocat:
<img src="x" onerror="alert(1)" />
View GitHub Profile
@yesmeck
yesmeck / toolbar.js
Created January 4, 2021 05:49
Kitchen toolbar
const agentView = NSStackView.alloc().init();
const container = NSView.alloc().initWithFrame(NSMakeRect(0, 0, UI.TOOLBAR_DEFAULT_WIDTH, 400));
container.identifier = pluginConstant.BAR_CONTAINER;
container.addSubview(agentView);
const viewsDictionary = { container, stack: agentView };
const horizontalConstraints = NSLayoutConstraint.constraintsWithVisualFormat_options_metrics_views(
'H:|-0-[stack]-0-|',
0,
nil,
@yesmeck
yesmeck / key.pub
Created April 7, 2020 10:06
My GPG Public key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF6MTcYBEACk2Q+j0zJvzNYsxmkIMA5QzeFeHRxPRI/r1c9jjipJx/0O13JW
UItAQpAPYLcPTtq3lj0g6qjXrcHrnHsQ6rJDO92Fu124GVG47gxDY8FLQoY7Wgci
jZ9JwndFZIULpCLwDxqSFeAX12Zxx3a3SloBzfvLnYOKng/jqYfCMlfnW4T7Tbe3
p/6zwHMdHPdTbCnz9OUk4YilHT4wJB6+8bfIQ0l2P5xd0ghrbovtWehKVGNiAenL
ptypjFC1RvRInvHYhWlFo5TOBHb3HufWM+JM8Oy34gIiaAbCkoq+LHQCUYVmIqed
okqLnFmn0yxKAQ75WnkvvCcOSsmF4ZHrEJcbbTLjnGkNh+PZ5iMkMF9UG++okzSc
Bkqh59wzW1rzsCvguHZkwFExk7oFnuvKPECmUWpAi3unOlUMLY5NsnpxS9y7H4aN
qxeeHVutM0SOHTpfPMFcpSOXwZ1RyQ6cRnxaR+6uEvopARHpMnHkRdwdCVDm7n8t
JavaScript 9 hrs 11 mins ███████▉░░░░░░░░░░░░░ 38.0%
TypeScript 8 hrs 29 mins ███████▍░░░░░░░░░░░░░ 35.1%
JSON 2 hrs 41 mins ██▎░░░░░░░░░░░░░░░░░░ 11.2%
Other 1 hr 44 mins █▌░░░░░░░░░░░░░░░░░░░ 7.2%
Markdown 34 mins ▍░░░░░░░░░░░░░░░░░░░░ 2.4%
@yesmeck
yesmeck / test.md
Created April 9, 2019 04:05
测试

这是一个测试

@yesmeck
yesmeck / useStore.js
Last active November 26, 2018 11:00
useStore
interface State {
list: Trade[];
detail: Trade | null;
}
const initialState = {
list: [],
detail: null,
};
@yesmeck
yesmeck / bundle.js
Last active September 21, 2017 03:57
redundant __webpack_require__
/******/ (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 / result.md
Last active September 30, 2018 23:19
css in js lib stars
@yesmeck
yesmeck / detect-port
Created June 5, 2017 08:57
detect which command using 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 March 9, 2017 03:19
Fix your js project!
#!/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."
@yesmeck
yesmeck / table-hover-edit.js
Last active November 7, 2016 11:43
Table hover edit
import { Table, Icon, Popover, Input } from 'antd';
class EditableTable extends React.Component {
constructor(props) {
super(props);
this.columns = [{
title: '应用名称',
dataIndex: 'appName',
key: 'appName',