├── .editorconfig
├── .gitignore
├── 404.html
├── Gemfile
├── LICENSE
├── README.md
├── _config.yml
├── _includes
├── footer.html
├── head.html
├── header.html
├── icon-github.html
├── icon-github.svg
└── mathjax_support.html
├── _layouts
├── default.html
├── html.html
├── page.html
└── post.html
├── _posts
├── 2016
│ ├── 2016-01-01-welcome-to-jekyll.markdown
│ ├── 2016-02-15-generator-demo.markdown
│ ├── 2016-04-07-tmall-collections.markdown
│ ├── 2016-04-12-docer-node-example.markdown
│ ├── 2016-04-28-phaser-demo.markdown
│ ├── 2016-05-12-docker-on-aliyun.markdown
│ ├── 2016-05-12-jpeg.markdown
│ ├── 2016-05-12-sms-platform.markdown
│ ├── 2016-06-15-docker-tips.markdown
│ ├── 2016-06-29-es6.markdown
│ ├── 2016-06-29-multi-task.markdown
│ ├── 2016-06-29-thunk-promise.markdown
│ ├── 2016-07-07-nodejs-debug-v6.0.markdown
│ ├── 2016-07-12-express-to-koajs.markdown
│ ├── 2016-07-21-git-tips.markdown
│ ├── 2016-08-10-weex-quick-start.md
│ ├── 2016-08-13-export-localstorage-data.md
│ ├── 2016-09-27-element-position-value-demo.md
│ ├── 2016-09-27-element-position-value-demo2.md
│ ├── 2016-09-27-element-position-value.md
│ ├── 2016-10-06-browser-cache.md
│ ├── 2016-10-06-keeping-people.md
│ ├── 2016-10-24-git-cmds.md
│ ├── 2016-10-28-vue-source-note.md
│ ├── 2016-11-17-cmd-note.md
│ ├── 2016-11-21-atom-note.md
│ ├── 2016-11-28-Flexbox.md
│ ├── 2016-11-28-https.md
│ ├── 2016-12-08-machine-learn.md
│ ├── 2016-12-09-RSA-note.md
│ ├── 2016-12-09-jekyll-tips.md
│ ├── 2016-12-19-observer.md
│ └── 2016-12-26-subset-of-webcomponents.md
├── 2017
│ ├── 2017-01-04-Node-attributes.md
│ ├── 2017-01-04-Object.defineProperty.md
│ ├── 2017-01-05-my-stars.md
│ ├── 2017-01-10-service-worker-for-cache.md
│ ├── 2017-02-07-project-code-style.md
│ ├── 2017-02-13-chrome-note.md
│ ├── 2017-02-13-javascript-prototype.md
│ ├── 2017-02-27-nodejs-best-practices.md
│ ├── 2017-02-28-machine-stock.md
│ ├── 2017-03-03-Try-node7-async-await.md
│ ├── 2017-03-09-data-center.md
│ ├── 2017-03-16-graphqlviz.md
│ ├── 2017-03-17-hiring-without-whiteboards.md
│ ├── 2017-03-20-SingleFileLearning-Promise.md
│ ├── 2017-03-20-html-tips-demo.md
│ ├── 2017-03-20-html-tips.md
│ ├── 2017-04-06-electron-note.md
│ ├── 2017-04-07-feedback-system.md
│ ├── 2017-04-08-you-dont-know-js.md
│ ├── 2017-04-13-weex-bugs-on-windows.md
│ ├── 2017-04-19-templates.md
│ ├── 2017-04-27-best-component-based-framework.md
│ ├── 2017-05-31-Something-about-virtual-dom.md
│ ├── 2017-05-31-proxy-list.markdown
│ ├── 2017-06-01-chrome-extension.md
│ ├── 2017-06-07-simple-svg.md
│ ├── 2017-06-09-interview-answers.md
│ ├── 2017-06-14-webpack-usage.md
│ ├── 2017-06-15-weex-to-vue.md
│ ├── 2017-06-18-vue-code-review.md
│ ├── 2017-06-19-node-stream.md
│ ├── 2017-06-21-game-notes.md
│ ├── 2017-06-21-thoughts-about-ai.md
│ ├── 2017-06-22-how-to-create-blog.md
│ ├── 2017-08-28-360-image1.md
│ └── 2017-08-28-360-image2.md
├── 2017-06~12
│ ├── 2017-06-24-learning-how-to-learn-2.md
│ ├── 2017-06-24-learning-how-to-learn.md
│ ├── 2017-06-25-TCPIP-HTTP.md
│ ├── 2017-06-25-spring-framework.md
│ ├── 2017-06-26-hello-to-WebAssembly.md
│ ├── 2017-06-28-java-notes.md
│ ├── 2017-06-29-setup-shadowsocks.md
│ ├── 2017-06-30-html5-semantic-elements.md
│ ├── 2017-07-03-interview-answers.md
│ ├── 2017-07-03-second-kill.md
│ ├── 2017-07-04-eyes.md
│ ├── 2017-07-10-how-to-write-non-spa-with-vue.md
│ ├── 2017-07-12-wpa-practice.md
│ ├── 2017-07-14-github-security.md
│ ├── 2017-07-17-weex-gif.md
│ ├── 2017-07-18-requirejs.md
│ ├── 2017-07-20-seajs.md
│ ├── 2017-07-21-pell.md
│ ├── 2017-07-22-koa-source.md
│ ├── 2017-07-24-promise-source.md
│ ├── 2017-07-25-1483.md
│ ├── 2017-07-26-event-loop.md
│ ├── 2017-07-26-symbol.md
│ ├── 2017-07-27-chromeless-test.md
│ ├── 2017-07-28-Debug-Redux.md
│ ├── 2017-08-01-protect-api.md
│ ├── 2017-08-05-learning-how-to-learn-3.md
│ ├── 2017-08-07-beyond-framework.md
│ ├── 2017-08-07-webcomponents-demo.md
│ ├── 2017-08-08-weex-notes.md
│ ├── 2017-08-15-7000words.md
│ ├── 2017-08-17-hello-to-puppeteer.md
│ ├── 2017-08-23-spreadsheets-as-database.md
│ ├── 2017-08-24-360-image.md
│ ├── 2017-08-26-1+1.md
│ ├── 2017-08-29-use-cygwin.md
│ ├── 2017-09-09-mac-shortcuts.md
│ ├── 2017-09-12-my-snippets.md
│ ├── 2017-09-18-chrome-module.md
│ ├── 2017-09-20-groovy-example.md
│ ├── 2017-10-11-mac-sts.md
│ ├── 2017-10-17-mac-command-alias.md
│ ├── 2017-10-18-flex-summary.md
│ ├── 2017-10-20-Tool-tips.md
│ ├── 2017-10-21-apollo-notes.md
│ ├── 2017-10-31-momery-leaks.md
│ ├── 2017-11-01-install-multi-chrome.md
│ ├── 2017-11-02-debug-ie-on-mac.md
│ ├── 2017-11-02-uml-cheatsheets.md
│ ├── 2017-11-20-new-retail.md
│ ├── 2017-11-20-xaas.md
│ ├── 2017-11-24-flow-chart.md
│ ├── 2017-11-28-AI-notes.md
│ ├── 2017-11-30-jupyter-notebook.md
│ ├── 2017-12-01-docker.md
│ ├── 2017-12-08-frontend-tecs.md
│ ├── 2017-12-11-css-in-js.md
│ ├── 2017-12-11-data-flow.md
│ ├── 2017-12-11-react-component.md
│ ├── 2017-12-15-books.md
│ ├── 2017-12-17-D2.md
│ ├── 2017-12-17-the-future-of-fe.md
│ ├── 2017-12-20-finance-in-china.md
│ ├── 2017-12-22-global-tshirt.md
│ ├── 2017-12-27-2018-fe.md
│ ├── 2017-12-27-UC.md
│ ├── 2017-12-28-medium.md
│ └── css-in-js.html
├── 2018-01~03
│ ├── 2018-01-06-10-skills.md
│ ├── 2018-01-08-bff.md
│ ├── 2018-01-08-scrum.md
│ ├── 2018-01-16-color-picker.md
│ ├── 2018-01-19-js-123.md
│ ├── 2018-01-23-vi-guide.md
│ ├── 2018-01-25-xmind.md
│ ├── 2018-01-27-elon-musk.md
│ ├── 2018-01-27-zsh-shell.md
│ ├── 2018-02-01-block-chain.md
│ ├── 2018-02-04-netease-broadcast.md
│ ├── 2018-02-07-falcon-heavy.md
│ ├── 2018-02-09-process-thread.md
│ ├── 2018-02-11-webpack-optimization.md
│ ├── 2018-02-12-ux-time.md
│ ├── 2018-02-22-2017-firefox.md
│ ├── 2018-02-23-ar.md
│ ├── 2018-02-23-js-decorators.md
│ ├── 2018-02-26-sketch-code.md
│ ├── 2018-02-27-export-certs.md
│ ├── 2018-02-28-douyin.md
│ ├── 2018-02-28-flutter-rn-weex.md
│ ├── 2018-03-01-prototype.md
│ ├── 2018-03-07-js-test.md
│ ├── 2018-03-20-facebook_aliexpress_shopify.md
│ ├── 2018-03-26-debuglog.md
│ ├── 2018-03-26-npm.md
│ ├── 2018-03-28-debug-tips.md
│ └── 2018-03-30-git.md
├── 2018-04~06
│ ├── 2018-04-01-after-effects.md
│ ├── 2018-04-02-after-effects2.md
│ ├── 2018-04-05-aliyun-ossutil.md
│ ├── 2018-04-06-npx.md
│ ├── 2018-04-06-set-proxy-iterm.md
│ ├── 2018-04-08-ps.md
│ ├── 2018-04-14-ar-ai.md
│ ├── 2018-04-15-fe-checklist.md
│ ├── 2018-04-15-learning-how-to-learn-4.md
│ ├── 2018-04-15-sipo.md
│ ├── 2018-04-16-data-analysts.md
│ ├── 2018-04-21-alitech.md
│ ├── 2018-04-22-compiler.md
│ ├── 2018-05-05-pn-junction.md
│ ├── 2018-05-06-diode-logic.md
│ ├── 2018-05-06-z-adder.md
│ ├── 2018-05-08-js-adder.md
│ ├── 2018-05-18-shell-selector.md
│ ├── 2018-05-18-vscode-debug.md
│ ├── 2018-05-25-better-me.md
│ ├── 2018-05-27-getcookies.md
│ ├── 2018-05-27-manage-apis.md
│ ├── 2018-05-29-colorful-echo.md
│ ├── 2018-06-06-license.md
│ ├── 2018-06-11-macaca.md
│ ├── 2018-06-17-aliyunfc.md
│ ├── 2018-06-20-thinking.md
│ ├── 2018-06-24-filesystem.md
│ └── 2018-06-30-bluetooth.md
├── 2018-07-09
│ ├── 2018-07-01-global-risks-report.md
│ ├── 2018-07-10-redux-design.md
│ ├── 2018-07-15-wto.md
│ ├── 2018-07-16-test-model.md
│ ├── 2018-07-21-UEFI.md
│ ├── 2018-08-07-base64-tools.md
│ ├── 2018-08-07-kill-by-name.md
│ ├── 2018-08-12-new-mind.md
│ ├── 2018-09-08-header-meta.md
│ ├── 2018-09-14-sync-mac.md
│ └── 2018-09-21-yunxi.md
├── 2018-10~12
│ ├── 2018-10-01-trump.md
│ ├── 2018-10-17-alliren.md
│ ├── 2018-10-23-charles.md
│ ├── 2018-10-27-pid.md
│ ├── 2018-11-05-nginx.md
│ ├── 2018-11-06-ffmpeg.md
│ ├── 2018-11-19-data-science.md
│ ├── 2018-11-24-linux-disk.md
│ ├── 2018-12-08-vision.md
│ ├── 2018-12-20-git-branch.md
│ └── 2018-12-24-mid-platform.md
├── 2019-01~03
│ ├── 2019-01-02-flink.md
│ ├── 2019-01-06-commands-alias.md
│ ├── 2019-01-20-future.md
│ ├── 2019-01-22-github-math.md
│ ├── 2019-01-22-matrix1.md
│ ├── 2019-01-26-google-ai.md
│ ├── 2019-01-27-college.md
│ ├── 2019-01-28-matrix3.md
│ ├── 2019-02-11-saas.md
│ ├── 2019-02-17-edu.md
│ ├── 2019-02-17-matrix4.md
│ └── 2019-03-17-how-to-ask-questions.md
├── 2019-04~06
│ ├── 2019-04-01-elon-musk.md
│ ├── 2019-05-14-dt-fe.md
│ ├── 2019-06-02-adv.md
│ └── 2019-06-12-week-share.md
├── 2019-07~09
│ ├── 2019-07-08-deep-learning.md
│ ├── 2019-07-21-deep-learning-demo.md
│ ├── 2019-08-09-book-2.md
│ ├── 2019-08-09-book.md
│ ├── 2019-08-11-book.md
│ ├── 2019-08-11-book2.md
│ ├── 2019-08-19-daydayup.md
│ ├── 2019-08-19-xindian.md
│ ├── 2019-08-20-ps.md
│ ├── 2019-08-25-json-editor.md
│ ├── 2019-08-30-join.md
│ ├── 2019-08-31-data-insight.md
│ ├── 2019-09-14-think.md
│ ├── 2019-09-21-kb.md
│ └── 2019-09-22-china.md
├── 2019-10~12
│ ├── 2019-10-13-ss.md
│ ├── 2019-10-26-ppt.md
│ ├── 2019-10-28-think.md
│ ├── 2019-11-03-define-problem.md
│ ├── 2019-11-03-strategy.md
│ ├── 2019-11-13-double-11.md
│ └── 2019-12-29-problem-solving.md
├── 2020-01~03
│ ├── 2020-01-28-new-year.md
│ ├── 2020-02-01-math-staticsc.md
│ ├── 2020-02-02-math-cal.md
│ ├── 2020-02-07-lit-element.md
│ ├── 2020-02-07-webcomponents.md
│ ├── 2020-02-15-dbs.md
│ ├── 2020-02-18-product.md
│ ├── 2020-03-02-strategy.md
│ ├── 2020-03-14-ie.md
│ ├── 2020-03-14-maps.md
│ └── 2020-03-15-sql-null.md
├── 2020-04~09
│ ├── 2020-04-06-manage.md
│ ├── 2020-05-22-xor.md
│ ├── 2020-06-08-micro-frontends.md
│ ├── 2020-07-29-review.md
│ ├── 2020-08-02-open-in-terminal.md
│ ├── 2020-08-02-open-in-vscode.md
│ ├── 2020-09-06-influence.md
│ ├── 2020-09-21-hou-hei.md
│ ├── 2020-10-03-mac-proxy.md
│ ├── 2020-10-03-vscode-remote.md
│ └── 2020-10-09-the-effective-executive.md
├── 2020-10~12
│ ├── 2020-10-10-the-fifth-discipline.md
│ ├── 2020-10-13-the-fifth-descipline-2.md
│ ├── 2020-10-17-your-own-data.md
│ ├── 2020-10-24-the-fifth-descipline-3.md
│ ├── 2020-11-15-the-2035.md
│ ├── 2020-12-06-dm-1.md
│ ├── 2020-12-06-dm-2.md
│ ├── 2020-12-06-dm-3.md
│ ├── 2020-12-06-dm-4.md
│ ├── 2020-12-13-python.md
│ └── 2020-12-15-k-means.md
├── 2021-01~03
│ ├── 2021-02-07-usa.md
│ ├── 2021-03-28-imagination.md
│ ├── 2021-03-28-xwlb.md
│ ├── 2021-04-24-inequality.md
│ ├── 2021-04-24-infomation.md
│ ├── 2021-04-24-succeed.md
│ └── 2021-06-11-mom-okr.md
├── 2021-04~09
│ ├── 2021-08-10-web-components.md
│ ├── 2021-08-27-letsencrypt-oss.md
│ ├── 2021-09-02-stack.md
│ ├── 2021-09-25-datetime-format.md
│ └── 2021-10-20-yunxi.md
├── 2022-01~03
│ ├── 2022-01-04-santi.md
│ ├── 2022-03-03-vscode-web.md
│ ├── 2022-03-25-springboot.md
│ ├── 2022-03-31-dbs.md
│ └── 2022-04-08-zookeeper.md
├── 2022-04~09
│ ├── 2022-06-01-switchhosts.md
│ ├── 2022-06-15-fe-big-picture.md
│ ├── 2022-06-19-new-mac.md
│ ├── 2022-06-20-fix-java-long.md
│ ├── 2022-07-24-scholar.md
│ ├── 2022-08-17-npm.md
│ ├── 2022-08-21-smart-contract.md
│ ├── 2022-08-23-rsa.md
│ ├── 2022-08-25-p2p.md
│ ├── 2022-08-29-rsa-math.md
│ ├── 2022-08-31-java-lambda.md
│ ├── 2022-09-03-rsa-math-2.md
│ ├── 2022-09-05-java-stream.md
│ └── 2022-09-28-alfred.md
├── 2022-10~12
│ ├── 2022-10-03-mac-applications.md
│ ├── 2022-10-10-magazine.md
│ ├── 2022-10-11-transform-jspm.md
│ ├── 2022-10-21-rust.md
│ ├── 2022-10-25-rust-macro.md
│ ├── 2022-10-26-rust-webassembly.md
│ ├── 2022-11-04-yunxi.md
│ ├── 2022-11-05-modelscope.md
│ ├── 2022-11-05-population.md
│ ├── 2022-11-08-java-proxy.md
│ ├── 2022-12-04-linux.md
│ ├── 2022-12-06-rust-web.md
│ ├── 2022-12-10-x86-assembly.md
│ ├── 2022-12-11-arm-assembly.md
│ ├── 2022-12-12-arm-assembly-svc.md
│ ├── 2022-12-15-webassembly.md
│ ├── 2022-12-19-boot.md
│ └── 2022-12-30-i386.md
├── 2023-01~03
│ ├── 2023-01-03-corss-compile.md
│ ├── 2023-01-07-i386-2.md
│ ├── 2023-01-08-mmx.md
│ ├── 2023-01-15-i386-3.md
│ ├── 2023-01-17-i386-4.md
│ ├── 2023-01-18-vm.md
│ ├── 2023-01-19-asm.md
│ ├── 2023-01-30-debug.md
│ ├── 2023-01-30-i386-5-memory.md
│ ├── 2023-02-03-feture.md
│ ├── 2023-02-05-cpu-simulator.md
│ ├── 2023-02-07-react-quick-start.md
│ ├── 2023-02-11-intel-4004.md
│ ├── 2023-03-17-product.md
│ └── 2023-03-17-project-mange.md
├── 2023-04~09
│ ├── 2023-05-02-search.md
│ ├── 2023-05-29-postgresql.md
│ ├── 2023-06-20-org.md
│ ├── 2023-06-20-org2.md
│ ├── 2023-07-03-chatglm.md
│ ├── 2023-07-11-chatglm-gpu.md
│ ├── 2023-09-06-chatglm-kmeans.md
│ ├── 2023-09-12-economic.md
│ └── 2023-09-19-d2l.md
├── 2023-10~12
│ ├── 2023-10-11-autostart.md
│ ├── 2023-10-12-autostart2.md
│ ├── 2023-10-19-WebComponents copy.md
│ ├── 2023-10-20-Thinking-in-AI.md
│ ├── 2023-10-22-CF-workers.md
│ ├── 2023-10-30-talk.md
│ ├── 2023-11-25-harmonyos.md
│ ├── 2023-12-03-hangfang.md
│ ├── 2023-12-18-lit-flow.md
│ ├── 2023-12-19-hap.md
│ ├── 2023-12-19-virtualdom.md
│ ├── 2023-12-24-lit-html-flow.md
│ └── 2023-12-27-lit-ssr.md
├── 2024-01~03
│ ├── 2023-12-30-jvm.md
│ ├── 2024-01-09-ember-glimmer.md
│ ├── 2024-01-10-alfred.md
│ ├── 2024-01-10-react.md
│ ├── 2024-01-10-virtualdom-2.md
│ ├── 2024-01-10-virtualdom-3.md
│ ├── 2024-01-11-virtualdom-4.md
│ ├── 2024-01-14-01-package.md
│ ├── 2024-01-19-quick-develop.md
│ ├── 2024-01-20-np.md
│ ├── 2024-01-20-tm.md
│ ├── 2024-02-17-rust-borrowing.md
│ ├── 2024-02-18-wasm-runtime.md
│ ├── 2024-03-03-salary.md
│ ├── 2024-03-05-positive.md
│ ├── 2024-03-25-drawio.md
│ └── 2024-03-28-gemini.md
├── 2024-04~06
│ ├── 2024-04-07-visionary.md
│ ├── 2024-04-20-manage.md
│ ├── 2024-04-27-ocr.md
│ ├── 2024-05-04-gemini-trans.md
│ ├── 2024-05-05-book.md
│ ├── 2024-05-29-with.md
│ ├── 2024-06-03-excel-with-sqlite.md
│ ├── 2024-06-05-zindex.md
│ └── 2024-06-06-wasi.md
├── 2024-07~09
│ ├── 2024-07-07-police.md
│ ├── 2024-07-08-embedding-db.md
│ ├── 2024-07-11-merge-videos.md
│ ├── 2024-07-14-chrome-vnc.md
│ ├── 2024-07-21-house.md
│ ├── 2024-07-28-ml.md
│ ├── 2024-08-01-unicode.md
│ ├── 2024-08-02-csv.md
│ ├── 2024-08-05-ml.md
│ ├── 2024-08-06-extend.md
│ ├── 2024-08-12-igr.md
│ ├── 2024-08-20-dart-vs-rust.md
│ ├── 2024-08-21-node-sass.md
│ ├── 2024-08-22-sqlite-vec.md
│ ├── 2024-08-28-spotlight.md
│ ├── 2024-09-09-politics.md
│ ├── 2024-09-10-yes_minister.md
│ ├── 2024-09-11-extend2.md
│ ├── 2024-09-12-extend3.md
│ ├── 2024-09-22-ebpf.md
│ ├── 2024-09-24-wechat-miniprogram.md
│ └── 2024-09-26-git-rollback-master.md
├── 2024-10~12
│ ├── 2024-10-04-docker.md
│ ├── 2024-10-04-gcc.md
│ ├── 2024-10-10-chrome.md
│ ├── 2024-10-13-ipv6.md
│ ├── 2024-10-16-iso.md
│ ├── 2024-10-17-lfs.md
│ ├── 2024-10-18-bootloader.md
│ ├── 2024-10-18-docker-speedup.md
│ ├── 2024-10-19-ruijie.md
│ ├── 2024-10-25-elf.md
│ ├── 2024-10-31-elf-2.md
│ ├── 2024-11-07-j2wasm.md
│ ├── 2024-11-26-nginx.md
│ ├── 2024-12-22-jni.md
│ ├── 2024-12-22-wasm.md
│ ├── 2025-10-21-boot.md
│ └── 2025-10-22-gcc.md
├── 2025-01~03
│ ├── 2025-02-09-download-proxy.md
│ ├── 2025-02-09-lambda.md
│ ├── 2025-02-20-wasm.md
│ ├── 2025-03-03-lima.md
│ ├── 2025-03-12-chrome-cookies.md
│ ├── 2025-03-25-colima.md
│ ├── 2025-03-29-selenium.md
│ └── 2025-03-30-legacy-chrome.md
├── 2025-04~06
│ ├── 2025-04-14-browser-use.md
│ ├── 2025-05-06-debug.md
│ └── 2025-06-05-browser.md
├── 2025-07~09
│ ├── 2025-07-13-proxy.md
│ ├── 2025-07-16-fe.md
│ ├── 2025-09-08-cloudphone.md
│ ├── 2025-09-16-jupyter.md
│ ├── 2025-09-17-ml.md
│ ├── 2025-09-17-ml2.md
│ └── 2025-09-17-ml3.md
└── 2025-10~12
│ ├── 2025-10-20-rnn-2-attention.md
│ ├── 2025-11-03-quick-action.md
│ ├── 2025-11-17-jacoco.md
│ └── 2025-11-26-grpc.md
├── _sass
├── minima.scss
└── minima
│ ├── _base.scss
│ ├── _layout.scss
│ └── _syntax-highlighting.scss
├── about.md
├── assets
├── 2016
│ ├── 2016-01-01
│ │ └── search.js
│ └── 2016-04-28-phaser
│ │ ├── assets
│ │ ├── background.png
│ │ ├── bear.png
│ │ ├── bird.png
│ │ ├── block.png
│ │ └── jump.wav
│ │ └── index.html
├── 2017
│ ├── 07-04-eyes
│ │ └── eyes.aac
│ ├── 08-15-7000words
│ │ ├── 100句背7000个单词.txt.txt
│ │ ├── 11到20.mp3
│ │ ├── 1到10.mp3
│ │ ├── 21到30.mp3
│ │ ├── 31到40.mp3
│ │ ├── 41到50.mp3
│ │ ├── 51到60.mp3
│ │ ├── 61到70.mp3
│ │ ├── 71到80.mp3
│ │ ├── 81到90.mp3
│ │ └── 91到100.mp3
│ └── 08-24-360-image
│ │ └── 360.jpg
├── 2018
│ ├── 04-01-after-effects
│ │ └── demo.html
│ └── 04-02-after-effects2
│ │ ├── canvas.html
│ │ ├── fight.json
│ │ └── index.html
└── 2019
│ └── 2019-07-21-deep-learning-demo
│ ├── dl.json
│ └── index.html
├── css
└── main.scss
├── feed.xml
├── index.html
├── search.html
└── tags.html
/.editorconfig:
--------------------------------------------------------------------------------
1 | #example#################################
2 | # editorconfig.org
3 |
4 | root = true
5 |
6 | [*]
7 | charset = utf-8
8 | end_of_line = lf
9 | indent_size = 2
10 | indent_style = space
11 | insert_final_newline = true
12 | trim_trailing_whitespace = true
13 |
14 | [*.py]
15 | indent_size = 4
16 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .idea
3 |
4 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
5 | hs_err_pid*
6 | /.settings
7 | /.git
8 | /build
9 | /target
10 | node_modules
11 |
12 | #output
13 | #build
14 | #grunt-www.js
15 | #grunt-mobile.js
16 | #run-www.cmd
17 | #run-admin.cmd
18 | #run-mobile.cmd
19 | _site
20 | .sass-cache
21 | .jekyll-metadata
22 |
23 | Gemfile
24 | .DS_Store
25 |
--------------------------------------------------------------------------------
/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 404
6 |
29 |
30 |
31 |
32 |
33 | 60s
34 | Take me to the Home Page.
35 |
36 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 | ruby RUBY_VERSION
3 |
4 | # Hello! This is where you manage which Jekyll version is used to run.
5 | # When you want to use a different version, change it below, save the
6 | # file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
7 | #
8 | # bundle exec jekyll serve
9 | #
10 | # This will help ensure the proper Jekyll version is running.
11 | # Happy Jekylling!
12 | # gem "jekyll", "3.2.1"
13 |
14 | # This is the default theme for new Jekyll sites. You may change this to anything you like.
15 | gem "minima"
16 |
17 | # If you want to use GitHub Pages, remove the "gem "jekyll"" above and
18 | # uncomment the line below. To upgrade, run `bundle update github-pages`.
19 | # gem "github-pages", group: :jekyll_plugins
20 | gem 'github-pages'
21 | # If you have any plugins, put them here!
22 | # group :jekyll_plugins do
23 | # gem "jekyll-github-metadata", "~> 1.0"
24 | # end
25 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 keke
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Website
2 | [](http://makeapullrequest.com) [](./LICENSE)
3 |
4 | [https://zhoukekestar.github.io/notes/](https://zhoukekestar.github.io/notes/)
5 |
6 | ## 同步文章网站
7 | * [掘金](https://juejin.im/user/5833a1563923c7006b022458)
8 | * [微博](https://weibo.com/3514877350/profile?rightmod=1&wvr=6&mod=personinfo)
9 | * [简书](http://www.jianshu.com/u/9a622eecb3f9)
10 | * [知乎](https://www.zhihu.com/people/zhoukekestar/posts)
11 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 |
2 | # Jekyll Config
3 |
4 | title: Notes
5 | email: zhoukekestar@163.com
6 | description: >
7 | This site is hosted with ❤️ by Github. Powered by Jekyll.
8 | Thanks a lot.
9 | baseurl: "/notes"
10 | url: "https://zhoukekestar.github.io"
11 | github_username: zhoukekestar
12 |
13 | # paging
14 | paginate: 20
15 | paginate_path: "/page:num/"
16 |
17 |
18 | markdown: kramdown
19 | theme: minima
--------------------------------------------------------------------------------
/_includes/head.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/_includes/header.html:
--------------------------------------------------------------------------------
1 |
27 |
--------------------------------------------------------------------------------
/_includes/icon-github.html:
--------------------------------------------------------------------------------
1 | {% include icon-github.svg %} {{ include.username }}
2 |
--------------------------------------------------------------------------------
/_includes/icon-github.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/_includes/mathjax_support.html:
--------------------------------------------------------------------------------
1 |
8 |
10 |
--------------------------------------------------------------------------------
/_layouts/default.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {% include head.html %}
5 |
6 | {% if page.use_math %}
7 | {% include mathjax_support.html %}
8 | {% endif %}
9 |
10 |
11 | {% include header.html %}
12 |
13 |
14 |
15 | {{ content }}
16 |
17 |
18 |
19 | {% include footer.html %}
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/_layouts/html.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ content }}
4 |
--------------------------------------------------------------------------------
/_layouts/page.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | ---
4 |
5 |
6 |
9 |
10 |
11 | {{ content }}
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/_posts/2016/2016-01-01-welcome-to-jekyll.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Welcome to Jekyll!"
4 | date: 2016-01-01 14:15:39 +0800
5 | categories: jekyll update
6 | tags: [jekyll]
7 | commentIssueId: 1
8 | ---
9 | You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
10 |
11 | To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
12 |
13 | Jekyll also offers powerful support for code snippets:
14 |
15 | {% highlight ruby %}
16 | def print_hi(name)
17 | puts "Hi, #{name}"
18 | end
19 | print_hi('Tom')
20 | #=> prints 'Hi, Tom' to STDOUT.
21 | {% endhighlight %}
22 |
23 | Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk].
24 |
25 | [jekyll-docs]: http://jekyllrb.com/docs/home
26 | [jekyll-gh]: https://github.com/jekyll/jekyll
27 | [jekyll-talk]: https://talk.jekyllrb.com/
28 |
--------------------------------------------------------------------------------
/_posts/2016/2016-04-07-tmall-collections.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "天猫好文收集"
4 | date: 2016-04-07 16:36:00 +0800
5 | categories: tmall
6 | note: [articles]
7 | ---
8 | ## 好文
9 | * [解耦神器](http://pingguohe.net/2015/11/24/Navigator-and-Rewrite.html)
10 | * [天猫App的动态化配置中心实践](http://mp.weixin.qq.com/s?__biz=MzA3ODg4MDk0Ng==&mid=402842876&idx=1&sn=e15d596c95bf7d1ed579cfd7e410696a#rd)
11 |
--------------------------------------------------------------------------------
/_posts/2016/2016-04-12-docer-node-example.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Docker Node Demo"
4 | date: 2016-04-12 15:39:00 +0800
5 | categories: docker node
6 | tags: [docker, nodejs]
7 | ---
8 |
9 | # index.js
10 |
11 | {% highlight js linenos %}
12 | var express = require('express');
13 |
14 | // Constants
15 | var PORT = 8080;
16 |
17 | // App
18 | var app = express();
19 | app.get('/', function (req, res) {
20 | res.send('Hello world\n');
21 | });
22 |
23 | app.listen(PORT);
24 | console.log(__dirname)
25 | console.log('Running on http://localhost:' + PORT);
26 |
27 | {% endhighlight %}
28 |
29 | # package.json
30 |
31 | {% highlight json %}
32 | {
33 | "name": "docker-centos-hello",
34 | "private": true,
35 | "version": "0.0.1",
36 | "description": "Node.js Hello world app on CentOS using docker",
37 | "author": "Daniel Gasienica ",
38 | "dependencies": {
39 | "express": "3.2.4"
40 | }
41 | }
42 | {% endhighlight %}
43 |
44 | # Dockerfile
45 | {% highlight bash %}
46 | FROM centos:centos6
47 |
48 | # Enable Extra Packages for Enterprise Linux (EPEL) for CentOS
49 | RUN yum install -y epel-release
50 | # Install Node.js and npm
51 | RUN yum install -y nodejs npm
52 |
53 | # Install app dependencies
54 | COPY package.json /src/package.json
55 | RUN cd /src; npm install --production
56 |
57 | # Bundle app source
58 | COPY . /src
59 |
60 | EXPOSE 8080
61 | CMD ["node", "/src/index.js"]
62 | {% endhighlight %}
63 |
--------------------------------------------------------------------------------
/_posts/2016/2016-04-28-phaser-demo.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Phaser 游戏小Demo"
4 | date: 2016-04-28 09:50:00 +0800
5 | categories: phaser
6 | tags: [game, javascript]
7 | ---
8 |
9 | [Demo]({{ site.baseurl }}/assets/2016/2016-04-28-phaser/index.html)
10 |
--------------------------------------------------------------------------------
/_posts/2016/2016-05-12-docker-on-aliyun.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "阿里云Docker实践"
4 | date: 2016-05-12 10:03:00 +0800
5 | categories: docker aliyun
6 | tags: [docker]
7 | ---
8 |
9 |
10 | ## Docker目录(windows)
11 | "C:\Program Files\Docker Toolbox"
12 |
13 | ## 设置为阿里云的docker服务
14 | {% highlight bash %}
15 | set DOCKER_TLS_VERIFY=1
16 | set DOCKER_HOST=tcp://master2.cs-cn-hangzhou.aliyun.com:13678
17 | set DOCKER_CERT_PATH=D:\docker\certs\
18 | {% endhighlight %}
19 |
20 | ## 使用容器mysql
21 | {% highlight bash %}
22 | docker run -p 3306:3306 -d --name redmine-mysql -e MYSQL_ROOT_PASSWORD=123456 -e MYSQL_DATABASE=redmine mysql
23 | docker run -p 80:3000 -d --name toomao-redmine --link redmine-mysql:mysql redmine:3.1
24 | {% endhighlight %}
25 |
26 | ## 使用RDS部署
27 | {% highlight bash %}
28 | docker run -p 80:80 -d --name=toomao-redmine-rds
29 | --env='DB_ADAPTER=mysql2'
30 | --env='DB_HOST=xxx.xxx'
31 | --env='DB_NAME=redmine'
32 | --env='DB_USER=redmine'
33 | --env='DB_PASS=123456'
34 | --env='SMTP_USER=xxx'
35 | --env='SMTP_DOMAIN=smtp.qq.com'
36 | --env='SMTP_HOST=smtp.qq.com'
37 | --env='SMTP_PORT=25'
38 | --env='SMTP_PASS=xxx'
39 | --env='SMTP_METHOD=smtp'
40 | --env='SMTP_AUTHENTICATION=plain'
41 | --volume=/srv/docker/redmine/redmine:/home/redmine/data sameersbn/redmine:3.2.1-6
42 |
43 | // 合并成一行
44 | docker run -p 80:80 -d --name=toomao-redmine-rds --env='DB_ADAPTER=mysql2' --env='DB_HOST=xxxx' --env='DB_NAME=redmine' --env='DB_USER=redmine' --env='DB_PASS=123456' --env='SMTP_USER=xxx' --env='SMTP_DOMAIN=smtp.qq.com' --env='SMTP_HOST=smtp.qq.com' --env='SMTP_PORT=25' --env='SMTP_PASS=xxx' --env='SMTP_METHOD=smtp' --env='SMTP_AUTHENTICATION=plain' --volume=/srv/docker/redmine/redmine:/home/redmine/data sameersbn/redmine:3.2.1-6
45 | {% endhighlight %}
46 |
--------------------------------------------------------------------------------
/_posts/2016/2016-05-12-jpeg.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "jpeg"
4 | date: 2016-05-12 10:03:00 +0800
5 | categories: jpeg
6 | tags: [javascript, tools]
7 | ---
8 |
9 | # Create a jpeg
10 |
11 | {% highlight js %}
12 | var jpeg = require('jpeg-js');
13 | var fs = require('fs');
14 | var width = 320, height = 180;
15 | var frameData = new Buffer(width * height * 4);
16 | var i = 0;
17 |
18 | var setColor = function(x, y, r, g, b, a) {
19 |
20 | var p = 4 * x + 4 * width * y;
21 |
22 | frameData[p++] = r;
23 | frameData[p++] = g;
24 | frameData[p++] = b;
25 | frameData[p++] = a;
26 | }
27 |
28 | console.log(0xFF)
29 |
30 | for (var i = 0; i < width; i++) {
31 | for (var j = 0; j < height; j++) {
32 | setColor(i, j, 255 * i / width, 255 * j / height, 100, 0)
33 | // if (i == width / 2) {
34 | // setColor(i, j, 255, 255, 255, 0)
35 | // } else {
36 | // setColor(i, j, 0, 0, 0, 0)
37 | // }
38 |
39 | }
40 | }
41 | // while (i < frameData.length) {
42 | // frameData[i++] = 0xFF; // red
43 | // frameData[i++] = 0xFF; // green
44 | // frameData[i++] = 0x00; // blue
45 | // frameData[i++] = 0xFF; // alpha - ignored in JPEGs
46 | // }
47 | var rawImageData = {
48 | data: frameData,
49 | width: width,
50 | height: height
51 | };
52 | var jpegImageData = jpeg.encode(rawImageData, 50);
53 | fs.writeFileSync('a.jpg', jpegImageData.data)
54 | console.log(jpegImageData)
55 |
56 | {% endhighlight %}
57 |
--------------------------------------------------------------------------------
/_posts/2016/2016-05-12-sms-platform.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "短信验证码平台"
4 | date: 2016-05-12 10:03:00 +0800
5 | categories: sms
6 | tags: [note]
7 | ---
8 |
9 | 容联:http://docs.yuntongxun.com/(0.06)
10 |
11 | 轻码:http://www.qingmayun.com/(0.04)
12 |
13 | 网易云信:http://netease.im/price(0.05)
14 |
15 | 短信先行,比较简单
16 |
17 | 可以对接各种平台,免费发送短信或语音验证
18 |
19 | 可以用chrome插件的方式进行免费发送
20 |
--------------------------------------------------------------------------------
/_posts/2016/2016-06-29-es6.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "es6"
4 | date: 2016-06-29 14:13:00 +0800
5 | categories: es6
6 | tags: [javascript, es6]
7 | ---
8 |
9 | ### List
10 | * [thunk vs promise](https://github.com/zhoukekestar/notes/blob/master/ES6/thunk_promise.md)
11 | * [multi-task](https://github.com/zhoukekestar/notes/blob/master/ES6/multi-task.md)
12 |
--------------------------------------------------------------------------------
/_posts/2016/2016-06-29-multi-task.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "multi task"
4 | date: 2016-06-29 14:13:00 +0800
5 | categories: es6
6 | tags: [javascript, es6]
7 | ---
8 |
9 | ### multi-task
10 |
11 | ```js
12 | var Promise = require('bluebird')
13 | , thunkify = require('thunkify')
14 | , co = require('co');
15 |
16 | var time = function(str, callback) {
17 | setTimeout(function(){
18 | callback(null, str)
19 | }, 1000)
20 | }
21 |
22 | console.time('Generator');
23 | co.wrap(function*(){
24 | var res1 = yield thunkify(time)('gen-a');
25 | var res2 = yield thunkify(time)('gen-b')
26 | console.log('Generator res1: ' + res1 + ' res2: ' + res2);
27 | console.timeEnd('Generator')
28 | })();
29 |
30 |
31 | console.time('Promise');
32 | Promise.all([Promise.promisify(time)('pro-a'), Promise.promisify(time)('pro-b')]).then(function(res){
33 | console.log('Promise res1: ' + res[0] + ' res2: ' + res[1]);
34 | console.timeEnd('Promise')
35 | })
36 |
37 | /*
38 | output:
39 | Promise res1: pro-a res2: pro-b
40 | Promise: 1004.672ms
41 | Generator res1: gen-a res2: gen-b
42 | Generator: 2002.848ms
43 | */
44 | ```
45 |
--------------------------------------------------------------------------------
/_posts/2016/2016-06-29-thunk-promise.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Thunk Promise"
4 | date: 2016-06-29 14:10:00 +0800
5 | categories: es6 thunk promise
6 | tags: [javascript, es6]
7 | ---
8 |
9 | ## Thunk VS Promise
10 |
11 | ```js
12 | var Promise = require('bluebird')
13 | , thunkify = require('thunkify')
14 | , co = require('co')
15 |
16 | co.wrap(function*(){
17 | var res = yield thunkify(function(callback) {
18 | setTimeout(function(){
19 | callback(null, 'Hello thunkify')
20 | }, 1000)
21 | })();
22 | console.log('res:' + res);
23 |
24 | })();
25 |
26 | Promise.coroutine(function* () {
27 | var res = yield new Promise(function(resolve, reject) {
28 | setTimeout(function(){
29 | resolve('Hello promise')
30 | }, 2000)
31 | })
32 | console.log('res:' + res);
33 | })();
34 |
35 | co.wrap(function* () {
36 | var res = yield new Promise(function(resolve, reject) {
37 | setTimeout(function(){
38 | resolve('Hello promise by co.')
39 | }, 3000)
40 | })
41 | console.log('res:' + res);
42 | })();
43 |
44 | ```
45 |
--------------------------------------------------------------------------------
/_posts/2016/2016-07-07-nodejs-debug-v6.0.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Nodejs Debug"
4 | date: 2016-07-07 13:07:00 +0800
5 | categories: node debug
6 | tags: [nodejs, javascript]
7 | ---
8 |
9 | ## DEBUG
10 | * [nodejs v6.x](https://github.com/nodejs/node/pull/6792)
11 |
12 | ```bash
13 | $ ./node --inspect benchmark/http_simple.js
14 | Debugger listening on port 5858. To start debugging, open following URL in Chrome:
15 |
16 | chrome-devtools://devtools/remote/serve_file/@4604d24a75168768584760ba56d175507941852f/inspector.html?experiments=true&v8only=true&ws=localhost:5858/node
17 | ```
18 |
19 |
20 |
21 | * npx debug
22 |
23 | ```
24 | npx --node-arg=--inspect-brk snowpack dev
25 | ```
26 |
27 |
--------------------------------------------------------------------------------
/_posts/2016/2016-07-12-express-to-koajs.markdown:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Express to Koajs"
4 | date: 2016-07-12 16:40:00 +0800
5 | categories: koajs express
6 | tags: [nodejs, javascript]
7 | ---
8 |
9 | ## Express to Koa
10 |
11 |
12 | |---
13 | | Express | Koa
14 | |:-|:-
15 | | var express = require('express'), router = express.Router();| var router = require('koa-router')();
16 | | module.exports = router | module.exports = router.routes()
17 | | function(req, res) | function* ()
18 | | router.get('/:id') //relative path | router.get('/test/:id') // fullpath
19 | | res.render('') | this.render('')
20 | | res.redirect('') | this.redirect('')
21 | | res.end('') | this.body = ''
22 | | req.headers['key'] | this.request.headers['key']
23 | | req.params['key'] | this.params['key']
24 | | req.query['key'] | this.query['key']
25 | | res.cookie(key, value, options) | this.cookies.set(key, value, options)
26 | | req.cookies['key'] | this.cookies.get('key', options)
27 | | req.body | this.request.body
28 | | value = method(params, callback) | value = yield method(params)
29 |
--------------------------------------------------------------------------------
/_posts/2016/2016-09-27-element-position-value-demo.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: html
3 | title: "元素位置信息"
4 | date: 2016-09-27 08:53:00 +0800
5 | ---
6 |
7 |
8 |
9 | getBoundingClientRect
10 |
32 |
33 |
34 |
35 |
36 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/_posts/2016/2016-09-27-element-position-value-demo2.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: html
3 | title: "元素位置信息"
4 | date: 2016-09-27 08:53:00 +0800
5 | ---
6 |
7 |
8 |
9 | eventXY
10 |
28 |
29 |
30 |
31 |
32 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/_posts/2016/2016-09-27-element-position-value.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "元素位置信息"
4 | date: 2016-09-27 08:53:00 +0800
5 | categories: element position value
6 | tags: [css]
7 | ---
8 |
9 | # getBoundingClientRect
10 | 
11 | 
12 |
13 | Example:
14 | [getBoundingClientRect](https://zhoukekestar.github.io/notes/2016/09/27/element-position-value-demo.html)
15 |
16 | # Event XY
17 | 
18 |
19 | Example:
20 | [eventXY](https://zhoukekestar.github.io/notes/2016/09/27/element-position-value-demo2.html)
21 |
--------------------------------------------------------------------------------
/_posts/2016/2016-10-06-browser-cache.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "游览器缓存机制"
4 | date: 2016-10-06 16:22:00 +0800
5 | categories: browser cache Last-Modified expire
6 | tags: [cache, network]
7 | ---
8 |
9 | [web游览器缓存机制](http://www.alloyteam.com/2012/03/web-cache-2-browser-cache/)
10 |
11 | [http缓存](https://developers.google.com/web/fundamentals/performance/optimizing-content-efficiency/http-caching?hl=zh-cn)
12 |
13 | ## 摘要
14 |
15 | #### Cache-Control与Expires
16 |
17 | Cache-Control与Expires的作用一致,都是指明当前资源的有效期,控制浏览器是否直接从浏览器缓存取数据还是重新发请求到服务器取数据。只不过Cache-Control的选择更多,设置更细致,如果同时设置的话,其优先级高于Expires。
18 |
19 | #### Last-Modified/ETag与Cache-Control/Expires
20 |
21 | 配置Last-Modified/ETag的情况下,浏览器再次访问统一URI的资源,还是会发送请求到服务器询问文件是否已经修改,如果没有,服务器会只发送一个304回给浏览器,告诉浏览器直接从自己本地的缓存取数据;如果修改过那就整个数据重新发给浏览器;
22 |
23 | Cache-Control/Expires则不同,如果检测到本地的缓存还是有效的时间范围内,浏览器直接使用本地副本,不会发送任何请求。两者一起使用时,Cache-Control/Expires的优先级要高于Last-Modified/ETag。即当本地副本根据Cache-Control/Expires发现还在有效期内时,则不会再次发送请求去服务器询问修改时间(Last-Modified)或实体标识(Etag)了。
24 |
25 | 一般情况下,使用Cache-Control/Expires会配合Last-Modified/ETag一起使用,因为即使服务器设置缓存时间, 当用户点击“刷新”按钮时,浏览器会忽略缓存继续向服务器发送请求,这时Last-Modified/ETag将能够很好利用304,从而减少响应开销。
26 |
27 | #### Last-Modified与ETag
28 |
29 | 你可能会觉得使用Last-Modified已经足以让浏览器知道本地的缓存副本是否足够新,为什么还需要Etag(实体标识)呢?HTTP1.1中Etag的出现主要是为了解决几个Last-Modified比较难解决的问题:
30 | * Last-Modified标注的最后修改只能精确到秒级,如果某些文件在1秒钟以内,被修改多次的话,它将不能准确标注文件的新鲜度
31 | * 如果某些文件会被定期生成,当有时内容并没有任何变化,但Last-Modified却改变了,导致文件没法使用缓存
32 | * 有可能存在服务器没有准确获取文件修改时间,或者与代理服务器时间不一致等情形
33 | Etag是服务器自动生成或者由开发者生成的对应资源在服务器端的唯一标识符,能够更加准确的控制缓存。Last-Modified与ETag是可以一起使用的,服务器会优先验证ETag,一致的情况下,才会继续比对Last-Modified,最后才决定是否返回304。Etag的服务器生成规则和强弱Etag的相关内容可以参考,《互动百科-Etag》和《HTTP Header definition》,这里不再深入。
34 |
35 | 
36 |
--------------------------------------------------------------------------------
/_posts/2016/2016-11-17-cmd-note.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Windows 10"
4 | date: 2016-12-13 10:05:00 +0800
5 | categories: windows10 cmd 笔记 learn 学习 virtual desktop
6 | tags: [note, windows, command]
7 | ---
8 |
9 | # Commands
10 |
11 | ```shell
12 | where calc
13 | // 查找命令所处的路径
14 |
15 | set
16 | // 显示当前环境变量
17 |
18 | set windir
19 | // 显示某变量值
20 |
21 | set Path=%Path%;C:\Users\Administrator\AppData\Local\atom\bin
22 | // 追加变量
23 |
24 | start /b yourcmd
25 | // 后台运行程序
26 | // cd a
27 | // start /b run.cmd
28 | // cd b
29 | // start /b run.cmd
30 |
31 | netstat -aon|findstr :3000 // 查找占用端口
32 | ```
33 |
34 | # Virtual Desktop
35 | * `win` + `ctrl` + `D` create new virtual Desktop
36 | * `win` + `ctrl` + `F4` Close the current virtual Desktop
37 | * `win` + `shift` + `ctrl` + `Left/Right` ==
38 |
39 | # Cmder
40 | * new console on current window: `cmd -new_console:b:t:"rename" "task"`, [wiki](https://conemu.github.io/en/NewConsole.html)
41 |
42 | ```shell
43 | cd ../www.toomao.com
44 | cmd -new_console:b:t:"www" "./rrun.cmd"
45 | ```
46 | * `ctrl` + `w` Close current tab
47 |
48 | # Curl
49 | * `-i` Show headers
50 | * `-X OPTIONS` Send OPTIONS request
51 |
52 | ## virutal Box install Mac OSX
53 | * [https://techsviewer.com/how-to-install-mac-os-x-el-capitan-on-pc-on-virtualbox/](https://techsviewer.com/how-to-install-mac-os-x-el-capitan-on-pc-on-virtualbox/)
54 |
--------------------------------------------------------------------------------
/_posts/2016/2016-11-21-atom-note.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Atom Note"
4 | date: 2017-02-14 13:18:00 +0800
5 | categories: Atom Note
6 | tags: [atom, note]
7 | ---
8 |
9 | ## Shortcuts
10 | * `Ctrl + Shift + I` to open developer tools.
11 | * `Ctrl + Shift + P` to open command panel.
12 | * `Ctrl + Shift + F5` to reload Atom.
13 |
14 | ## snippets.cson
15 | ```json
16 | '.source.js':
17 | 'Console log':
18 | 'prefix': 'log'
19 | 'body': 'console.log($1);'
20 | 'WebComponents V0':
21 | 'prefix': 'webcom0'
22 | 'body': """
23 | var proto = Object.create(HTMLElement.prototype)
24 |
25 | proto.createdCallback = function() {
26 | $2
27 | }
28 |
29 | proto.attachedCallback = function() {
30 | $3
31 | }
32 |
33 | document.registerElement("$1", {
34 | prototype: proto
35 | });
36 | """
37 |
38 | "WebComponents V1":
39 | 'prefix': 'webcom1'
40 | 'body': """
41 | class ${1:HelloWorld} extends HTMLElement {
42 | constructor() {
43 | super();
44 |
45 | $3
46 | }
47 | }
48 |
49 | customElements.define('${2:hello-world}', ${1:HelloWorld});
50 | """
51 |
52 | 'close':
53 | 'prefix': 'fc'
54 | 'body': """
55 | !(function() {
56 | $1
57 | })();
58 | """
59 |
60 | 'if, else if, else':
61 | 'prefix': 'ieie'
62 | 'body': """
63 | if (${1:true}) {
64 | $2
65 | } else if (${3:false}) {
66 | $4
67 | } else {
68 | $5
69 | }
70 | """
71 |
72 | ```
73 |
74 | # ESlint for Atom
75 | * [atom-eslint.es6](https://gist.github.com/zhoukekestar/fc9d70a032a7edd456a50853a2d834fa)
76 |
--------------------------------------------------------------------------------
/_posts/2016/2016-11-28-Flexbox.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Flexbox"
4 | date: 2016-11-28 13:52:00 +0800
5 | categories: Flexbox
6 | tags: [css]
7 | ---
8 |
9 | # Links
10 | * [cssreference](http://cssreference.io/flexbox/)
11 | * [caniuse](http://caniuse.com/#search=flex)
12 |
--------------------------------------------------------------------------------
/_posts/2016/2016-11-28-https.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "https"
4 | date: 2016-11-28 11:14:00 +0800
5 | categories: https
6 | tags: [network, security]
7 | ---
8 |
9 | ## links
10 | * [Https原理与过程](http://blog.imallen.wang/blog/2016/11/20/httpsyuan-li-yu-guo-cheng/?utm_source=tuicool&utm_medium=referral)
11 | * [数字签名是什么?](http://www.ruanyifeng.com/blog/2011/08/what_is_a_digital_signature.html)
12 |
--------------------------------------------------------------------------------
/_posts/2016/2016-12-26-subset-of-webcomponents.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Subset of Web Components"
4 | date: 2016-12-26 11:51:00 +0800
5 | categories: subset webcomponents polyfill
6 | tags: [webcomponents, polyfill]
7 | ---
8 |
9 | # WebComponents, our future!
10 | WebComponents is great, but it's just too advanced so that we can't use it on all platform.
11 |
12 | # webcomponentsjs
13 | [Webcomponentsjs]() is also great, he did so much work on W3C's spec. But what we can see on it is bad compatibility on old mobile browser.
14 |
15 | What should we do if we want to use webcomponents with good compatibility. Just remove the bad compatibility part of webcomponentsjs.
16 |
17 | We just give up some feature (like: shadowdom or something is not able to polyfill) so we can use it on almost platform. That's subset of webcomponentsjs which is friendly for old mobile browser.
18 |
19 | Yes, webcomponentsjs is a subset of W3C's webcomponents. And our webcomponents is a subset of webcomponentsjs.
20 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-06-26-hello-to-WebAssembly.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Hello to WebAssembly"
4 | date: 2017-06-26
5 | tags: [webassembly]
6 | ---
7 |
8 | WebAssembly or wasm is a new portable, size- and load-time-efficient format suitable for compilation to the web.
9 | * Efficient & fast
10 | * Safe
11 | * Open and debuggable
12 | * Part of the open web platform
13 |
14 | Ref: [webassembly.org](http://webassembly.org/)
15 |
16 | ### Say Hello to WebAssembly
17 | * Download & Install [emscripten](http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html).
18 | * Write `hello.c` in `C/C++`
19 |
20 | ```c
21 | #include
22 |
23 | int main() {
24 | printf("hello, world!\n");
25 | return 0;
26 | }
27 | ```
28 | * Run `emcc hello.c`, then you can get a `a.out.js`.
29 | * Run `node a.out.js`
30 |
31 | ```bash
32 | C:\Users\Administrator\Desktop>emcc hello.c
33 |
34 | C:\Users\Administrator\Desktop>node a.out.js
35 | hello, world!
36 |
37 | ```
38 |
39 | #### Create HTML file to run `hello.c`
40 | * Run `emcc hello.c -o hello.html`
41 | * Open `hello.html` with Chrome.
42 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-07-03-second-kill.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "一个小而美的秒杀系统"
4 | date: 2017-07-03
5 | tags: [architecture]
6 | ---
7 |
8 | [如何设计一个小而美的秒杀系统?](https://www.ibm.com/developerworks/cn/web/wa-design-small-and-good-kill-system/index.html),by 刘鹏
9 | * 红包系统面临的挑战
10 | * 系统设计
11 | * 优化方案
12 |
13 | ## 参考资源
14 | * [WRK,一种强悍的大流量请求压测工具。](https://github.com/wg/wrk)
15 | * [一号店秒杀系统的参考做法。](http://www.infoq.com/cn/articles/yhd-11-11-queuing-system-design/)
16 | * [电商系统可用的秒杀系统做法。](http://blog.csdn.net/zhanjianshinian/article/details/53342730)
17 | * [JVM 优化建议。](http://calvin1978.blogcn.com/articles/jvmoption-2.html)
18 | * [Ganglia,开源集群监视框架。](http://ganglia.info/)
19 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-07-04-eyes.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "眼保健操"
4 | date: 2017-07-04
5 | tags: [html]
6 | ---
7 |
8 | 眼保健操
9 |
10 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-07-12-wpa-practice.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "PWA Practice"
4 | date: 2017-07-12
5 | tags: [pwa]
6 | commentIssueId: 32
7 | ---
8 |
9 | PWA Articles & Resources:
10 | * [Lavas](https://lavas.baidu.com/): 基于 Vue 的 PWA 解决方案,帮助开发者快速搭建 PWA 应用,解决接入 PWA 的各种问题
11 | * [饿了么的PWA升级实践](http://geek.csdn.net/news/detail/210535)
12 | * [GoogleChrome/sw-precache](https://github.com/GoogleChrome/sw-precache): A node module to generate service worker code that will precache specific resources so they work offline.
13 | * [浅谈 HTTP/2 Server Push](https://zhuanlan.zhihu.com/p/26757514)
14 |
15 | ## 饿了么PWA升级
16 |
17 | * `SPAs` 可能用 `MPA`( `Multi Pages Application` ) 表示更为合理。
18 | * `PRPL` 模式
19 | * `Push/Preload`: 推送/预加载初始URL路由所需的关键资源
20 | * `Render`: 渲染初始路由,尽快让应用可被交互
21 | * `Precache`: 用Service Worker预缓存剩下的路由
22 | * `Lazy-Load`: 按需懒加载、懒实例化剩下的路由
23 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-07-20-seajs.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "seajs 源码浅析"
4 | date: 2017-07-20
5 | tags: [js]
6 | commentIssueId: 35
7 | ---
8 |
9 | 此文紧接[requirejs 源码浅析](https://zhoukekestar.github.io/notes/2017/07/18/requirejs.html),简要分析了一下`seajs`的核心加载代码。==,看代码也要趁热打铁~
10 | * resolve
11 | * pass
12 | * onload
13 | * load
14 | * fetch
15 | * use
16 |
17 | ## 源码
18 |
19 | [sea.js module 源码](https://github.com/seajs/seajs/blob/master/src/module.js)
20 |
21 | ## 流程图
22 |
23 | 点击查看大图
24 |
25 | [](https://user-images.githubusercontent.com/7157346/28424146-76b8b55c-6d9f-11e7-863e-ddeb33ae52ec.jpg)
26 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-07-28-Debug-Redux.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Debug Redux"
4 | date: 2017-07-28
5 | tags: [react]
6 | commentIssueId: 43
7 | ---
8 |
9 | * 下载 `Todos` 样例
10 | * 添加 `Debug` 代码
11 | * 安装插件
12 | * 运行
13 |
14 |
15 | ## 下载样例
16 |
17 | * 下载 [Todos 代码](https://github.com/reactjs/redux/tree/master/examples/todos)
18 | * 安装依赖 `npm install`
19 |
20 | ## 安装调试插件
21 |
22 | [Chrome 商店](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd)
23 |
24 | ## 添加`Debug` 代码
25 |
26 | 根据官方文档,需要在 `createStore` 中添加以下代码。
27 |
28 | ```js
29 | const store = createStore(
30 | reducer, /* preloadedState, */
31 | window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
32 | );
33 | ```
34 |
35 | ## 运行截图
36 | * 使用 `npm start` 启动服务器
37 | * 打开游览器访问页面
38 | * 开启调试,并切换至 `Redux`
39 |
40 | 
41 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-08-01-protect-api.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "保护接口的几点想法"
4 | date: 2017-08-01
5 | tags: [security]
6 | ---
7 |
8 | 基于接口行为判断IP是否为黑IP,以此来限制需要保护的接口。比如,发送短信接口,正常的接口行为是,调用广场接口,个人信息接口或商品详情接口,才可能调发送短信。如果不是,列入黑名单。
9 |
10 | 基于浏览器的接口调用,保证接口通过浏览器调用,nodejs设置根据ua,ip或其他信息,按规则给浏览器设置httponly的签名值,如果无签名值(直接调接口的)或签名值错误,列入黑名单
11 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-09-09-mac-shortcuts.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Mac Shortcuts"
4 | date: 2017-09-09
5 | tags: [mac]
6 | commentIssueId: 53
7 | ---
8 |
9 | Mac Applications
10 | * iTerm2
11 | * Go2Shell
12 |
13 | ## iTerm2
14 | * `command + D` new pane
15 | * `command + [` or `command + ]` to switch pane
16 | * `command + T` new tab
17 | * `command + Number` to swtich tabs
18 | * `command + N` new window
19 | * `option + command + Number` to swtich windows
20 | * `command + W` close current session
21 | * `option + Space` show or hide iTerm2
22 | * `command + ;` show autocompletion
23 |
24 | ## Go2Shell
25 | * Press `command` & drag it to Finder header
26 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-09-18-chrome-module.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Chrome Module"
4 | date: 2017-09-18
5 | tags: [js, chrome]
6 | commentIssueId: 55
7 | ---
8 |
9 | Chrome 61 支持 [script(type='module')](http://caniuse.com/#feat=es6-module) 了!
10 | * defer & async
11 | * demo
12 |
13 | ## Defer & Async
14 | * defer 是渲染完执行
15 | * async 是下载后执行
16 |
17 | 
18 |
19 |
20 | ## Demo
21 |
22 | html
23 | ```html
24 |
28 | ```
29 |
30 | utils.js
31 | ```js
32 | export const sayHello = () => {
33 | console.log('hello');
34 | alert('hello');
35 | };
36 | ```
37 |
38 | ## References
39 | * [spec](https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type)
40 | * [ES6标准解读:Module的加载实现](http://geek.csdn.net/news/detail/235469?utm_source=tuicool&utm_medium=referral)
41 | * [es6-in-depth-modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/)
42 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-09-20-groovy-example.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Groovy Example"
4 | date: 2017-09-20
5 | tags: [java, groovy]
6 | commentIssueId: 56
7 | ---
8 |
9 | Groovy Examples
10 |
11 | ```groovy
12 | def res = [
13 | "hello": "world",
14 | "arr": [1,3,4,1,3]
15 | ]
16 |
17 | res.remove('hello')
18 | res.arr.removeAll([1])
19 |
20 | println res // [arr:[3, 4, 3]]
21 |
22 | res = [
23 | "hello": "world",
24 | "arr": [1,3,4,1,3]
25 | ]
26 |
27 | res.arr = res.arr.findResults({ //i ->
28 | // print i
29 | // println it
30 | // println it.key
31 | // println it.value
32 | it > 2 ? it : null
33 | })
34 | println res // [hello:world, arr:[3, 4, 3]]
35 |
36 |
37 | groups = [
38 | "groups":[
39 | "pageSize":10,
40 | "result":[
41 | [
42 | "groupStatus":1,
43 | "hostId":3632383918,
44 | "id":520,
45 | "name":"子纳测试1",
46 | "subType":null
47 | ]
48 | ],
49 | "start":0,
50 | "total":1
51 | ]
52 | ];
53 | println ([
54 | "groups": [
55 | "pagesize": groups?.groups?.pagesizse,
56 | "total": groups?.groups?.total,
57 | "start": groups?.groups?.start,
58 |
59 | "result": groups?.groups?.result?.collect({
60 | [
61 | "userId": it["hostId"],
62 | "tagId": it["id"],
63 | "tagName": it["name"]
64 | ]
65 | })
66 |
67 | ]
68 | ]);
69 |
70 | //println newres; [groups:[pagesize:null, total:1, start:0, result:[[userId:3632383918, tagId:520, tagName:子纳测试1]]]]
71 | ```
72 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-10-11-mac-sts.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Install STS on Mac"
4 | date: 2017-10-11
5 | tags: [java, mac]
6 | commentIssueId: 57
7 | ---
8 |
9 | Install STS on mac:
10 | * Install JDK from [oracle](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
11 | * Specify the JDK version, [more detail](https://stackoverflow.com/questions/24589932/mac-os-jdk1-7-and-1-8-does-not-contain-the-jni-createjavavm-symbol)
12 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-10-18-flex-summary.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Flex Summary"
4 | date: 2017-10-18
5 | tags: [css]
6 | commentIssueId: 59
7 | ---
8 |
9 | Flex summary
10 | * direction
11 | * justify content
12 | * align items
13 | * align self
14 |
15 | ## Flex
16 |
17 | ### Main Axis & Cross Axis
18 | 
19 |
20 | ### Flex Direction
21 | 
22 |
23 | ### Justify Content
24 | > For Main Axis
25 | 
26 |
27 | ### Align Items
28 | > For Cross Axis
29 | 
30 |
31 | ### Align Self
32 | > For item's align in Cross axis.
33 | 
34 |
35 | ## References
36 | * [图解 Flexbox](https://juejin.im/entry/58a3db92b123db00545eee9c)
37 | * [an-animated-guide-to-flexbox](https://medium.freecodecamp.org/an-animated-guide-to-flexbox-d280cf6afc35)
38 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-10-21-apollo-notes.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "React Apollo Notes"
4 | date: 2017-10-21
5 | tags: [react, apollo]
6 | commentIssueId: 61
7 | ---
8 |
9 | [Apollo Client](http://dev.apollodata.com/)
10 | > The flexible, production ready GraphQL client for React and native apps.
11 |
12 | ## [Full-Stack Tutorial](https://dev-blog.apollodata.com/full-stack-react-graphql-tutorial-582ac8d24e3b?_ga=2.260780943.363586923.1508482262-591974180.1508482262)
13 |
14 | Error Message
15 | ```log
16 | Network error: Schema must be an instance of GraphQLSchema. Also ensure that there are not multiple versions of GraphQL installed in your node_modules directory.
17 | ```
18 | Related Topics
19 | * https://github.com/apollographql/react-apollo/issues/742
20 | * https://github.com/apollographql/apollo-test-utils/issues/35
21 |
22 | So we use `npm list | grep graphql` to list all graphql version.
23 | ```bash
24 | ali-6c96cfd8f2a1:client zhoukeke$ npm list | grep graphql
25 | client@0.1.0 /Users/zhoukeke/workspace/GitHub/graphql-tutorial/client
26 | │ ├── graphql@0.10.5
27 | │ ├── graphql-tag@2.5.0
28 | │ └─┬ graphql-tools@1.2.3
29 | │ └── @types/graphql@0.9.4
30 | ├─┬ graphql@0.11.7
31 | ├─┬ graphql-tools@2.5.1
32 | │ │ ├── @types/graphql@0.10.2
33 | │ │ │ ├── graphql@0.10.5
34 | │ │ ├── graphql@0.10.5
35 | │ │ ├── graphql-anywhere@3.1.0
36 | ```
37 |
38 | How to fixed it?
39 | * `sudo npm install npm -g`
40 | * `npm install graphql@0.10.5`
41 |
42 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-11-02-debug-ie-on-mac.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "如何在 Mac 机上调试线上的 页面"
4 | date: 2017-11-02
5 | tags: [mac, debug]
6 | commentIssueId: 64
7 | ---
8 |
9 | 额,线上的页面又在 IE 有错误?Mac 机上怎么破?
10 |
11 | ## 基础工作
12 | * 安装 Charles
13 | * 安装 VirtualBox & Windows
14 |
15 | ## Windows 上安装 Charles 证书并设置代理
16 | * Mac 上导出证书 `Help` -> `SSL Proxying` -> `Save Charles Root Certificate`
17 | * 注意保存格式为 `cer`, 而不是 `pem`
18 | 
19 | 
20 |
21 |
22 | * 拖动证书至 Widnows 并安装
23 | * 注意选择将证书保存到根机构下
24 | 
25 | * 设置代理为 Mac 地址
26 | * 设置完代理后,IE 游览器记得重新启动一下
27 | 
28 |
29 | ## 开启 Charles 进行抓包并做映射
30 | * 查询需要进行代理的 url,右击进行映射即可
31 | 
32 |
33 |
34 | ## 如何抓 iOS 的包
35 | [十分钟学会Charles抓包(iOS的http/https请求)](http://www.jianshu.com/p/5539599c7a25), 其中需要注意的是,在 iOS 上,安装完证书后,需要在 通用 -> 关于本机 -> 证书信任设置中 打开 根信息的开关
36 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-11-02-uml-cheatsheets.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "UML Cheatsheets"
4 | date: 2017-11-02
5 | tags: [mac]
6 | commentIssueId: 65
7 | ---
8 |
9 | ## UML 访问控制
10 |
11 | ```
12 | class Dummy {
13 | - private field1
14 | # protected field2
15 | ~ package method1()
16 | + public method2()
17 | }
18 | ```
19 |
20 | | 可见/访问性 | 在同一类中 | 同一包中 | 不同包中 | 同一包子类中 | 不同包子类中 |
21 | |:--|:--|:--|:--|:--|:--|
22 | | public | yes | yes | yes | yes | yes |
23 | | protected | yes | yes | no | yes | yes |
24 | | package | yes | yes | no | yes | no |
25 | | private | yes | no | no | no | no |
26 |
27 | Static method 使用下划线 1
28 |
29 | ## References
30 | 1. [UMLdiagram](http://pages.cs.wisc.edu/~hasti/cs302/examples/UMLdiagram.html)
31 | 2. [Java中的访问控制public,private,protected,package](http://blog.sina.com.cn/s/blog_5dbdb9780100b6ji.html)
32 | 3. [21分钟入门UML](http://www.jianshu.com/p/1256e2643923)
33 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-11-20-new-retail.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "什么是新零售"
4 | date: 2017-11-20
5 | tags: [note]
6 | commentIssueId: 66
7 | ---
8 |
9 | ## 新零售
10 | * 新零售——服务与产品的售卖组合
11 | > 不仅仅是商品的买卖,更重要的是服务的售卖,增值服务的提供,注重用户体验
12 | * 结合电子商务的升级——线上与线下的结合
13 | > 利润 = 进店人数 * 转化率 * 客单价 * 利润率
14 | > 线上与线下的流量结合,全渠道获客与变现。
15 | > 线上和线下的结合,不是简单和在一起,而是需要整合流量。
16 | * 数据驱动
17 | * 精准营销,用户画像
18 | * 反向驱动供应链
19 | * 有线下店,通过线上买东西(更快的)送到家
20 |
21 | 
22 | ## References
23 | * [「新零售」是什么?有哪些要点?](https://www.zhihu.com/question/52950329)
24 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-11-20-xaas.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "XaaS"
4 | date: 2017-11-20
5 | tags: [note]
6 | commentIssueId: 66
7 | ---
8 |
9 | IaaS, Paas, Saas 这些的区别是什么?
10 |
11 | ## IaaS
12 | Infrastructure-as-a-service
13 | * Aliyun ECS
14 | * Amazon EC2
15 |
16 | ## PaaS
17 | Platform-as-a-service
18 | * Google App Engine
19 | * Docker
20 |
21 | ## Saas
22 | Software-as-a-service
23 | * API market
24 | * Dropbox
25 | * OSS
26 |
27 | ## Others
28 | 
29 |
30 | ## References
31 | * [Iaas, Paas, Saas 的区别](http://www.ruanyifeng.com/blog/2017/07/iaas-paas-saas.html)
32 | * [What Is Serverless?](https://code.tutsplus.com/tutorials/what-is-serverless--cms-30077?utm_source=tuicool&utm_medium=referral)
33 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-11-24-flow-chart.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "流程图 / Flowchart"
4 | date: 2017-11-24
5 | tags: [note]
6 | commentIssueId: 65
7 | ---
8 |
9 | 流程图在分析简单逻辑或代码的时候还是很有必要的,所以,该文章大致整理了流程图的一些符号以及对应的例子。
10 |
11 | ## 符号
12 | 
13 |
14 | ## 样例
15 |
16 | ## References
17 | * [Flowchart Symbols Defined](http://www.breezetree.com/article-excel-flowchart-shapes.htm)
18 | * [Additional clarification on flow chart connectors](http://www.flowhelp.com/flowchart/flowchart_connector_detail.html)
19 | * [Flowchart Examples](https://creately.com/diagram-examples)
20 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-11-28-AI-notes.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "浅谈人工智能"
4 | date: 2017-11-28
5 | tags: [note]
6 | commentIssueId: 67
7 | ---
8 |
9 | 深度好文,给了很多不一样的启发:
10 | * 大数据有他的价值,但在人工智能领域,数据可能不是最重要的
11 | * 人工智能的基础,需要人五官(视觉:图像识别,语义语音:口、耳)的发展。
12 | * 深度学习的方向可能是错的,基于任务的学习可能更重要
13 | * 人工智能的最终突破口应该是人脑科学上
14 | * 这让我想起了,Musk 在做的一个 [脑机接口](https://www.zhihu.com/question/57717238/answer/154017117) 项目
15 |
16 | # References
17 | * [浅谈人工智能:现状、任务、构架与统一](https://mp.weixin.qq.com/s/-wSYLu-XvOrsST8_KEUa-Q)
18 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-11-30-jupyter-notebook.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "jupyter 小试"
4 | date: 2017-11-30
5 | tags: [note]
6 | commentIssueId: 65
7 | ---
8 |
9 |
10 | ## Install jupyter
11 | * Download `get-pip.py` from [https://bootstrap.pypa.io/get-pip.py](https://bootstrap.pypa.io/get-pip.py)
12 | * `sudo python get-pip.py`
13 | * `pip install --user jupyter`
14 | * `cd /Users/xxx/Library/Python/2.7/bin`
15 | * `./jupyter notebook`
16 |
17 | ## References
18 | * [pip](https://pip.pypa.io/en/stable/installing/)
19 | * [jupyter](http://jupyter.org/install.html)
20 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-12-15-books.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "书单"
4 | date: 2017-12-15
5 | tags: [book, learn]
6 | commentIssueId: 65
7 | ---
8 |
9 | 盖茨和扎克伯格认为每个人都应该读的10本书. 以及, 其他整理的书籍
10 |
11 | ## 10 本书
12 | 参考 [盖茨和扎克伯格认为每个人都应该读的10本书](http://new.qq.com/omn/20171214A10B4F.html#p=10)
13 |
14 | * 《创造力,公司》,埃德·卡特莫尔著。
15 | 
16 | * 《基因的历史》,悉达多·穆克吉著。
17 | 
18 | * 史蒂文·平克的《更好的自然天使》
19 | 
20 | * 《一天的帮派领袖》,Sudhir Venkatesh著。
21 | 
22 | * 《人类简史》,尤瓦尔·诺亚·哈拉里著。
23 | 
24 | * 菲尔·奈特的《鞋·狗》奈特,耐克的联合创始人。
25 | 
26 | * 托马斯·库恩的《科学革命的结构》
27 | 
28 | * 福斯特·华莱士《弦理论》不,不是那种弦理论。
29 | 
30 | * 刘慈欣的《三体》系列小说。
31 | 
32 | * 亨利·基辛格的《世界秩序》。
33 | 
34 |
35 | ## More
36 | * 网易的一千零一夜
37 | * PMP 相关
38 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-12-17-the-future-of-fe.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "前端的职业危机感"
4 | date: 2017-12-17
5 | tags: [ learn]
6 | commentIssueId: 69
7 | ---
8 |
9 | 前端的职业危机感? 前端不是挺火的吗? 有危机?
10 | * 端的危机感
11 | * 前端的危机感
12 | * 后端的危机感
13 |
14 |
15 |
16 | ## 端的危机感
17 |
18 | Android 和 iOS ? 两个端 ? IoT 时代, 还会只有这两个端吗? 前端 = 渲染引擎 + web 标准, 以后还会有端的概念吗? 如果是统一, 该由谁来统一?
19 |
20 | 如果是之前, 3 端各开发一套 app, 成本显然过高了. 类 Weex, RN 的跨端方案, 端的工作其实有点尴尬了. 要是采用 Google 推的 PWA 方案呢? 如果 Weex 继续做下去, 会不会成为一个 `类游览器` 呢? 那为什么不用 PWA 这套方案呢?性能还是主要瓶颈吗?
21 |
22 | ## 前端的危机感
23 |
24 | * Sketch to Code, 将 UED 的视觉稿直接转成前端代码, 需要做可能只是数据绑定, 前端的意义又会变成什么?
25 | * 当组件在行业层面上进行沉淀后, 所做的仅仅是拖动组件, 前端人才市场还需要这么大吗?
26 | * 更自然的交互方式, 未来的交互方式, 一定是语音, 手势, 甚至是 Musk 提的人脑接口, UI 还会是重点吗?
27 | * 类似天猫精灵的无屏设备, 我们还能做什么? 展示什么?
28 |
29 | 以后, 正如 运维行业 在阿里云的冲击下, 市场需求变小一样, 我们前端行业, 会不会以行业组件沉淀的方式, 市场需求也会变小呢? 包括以上说的几点, 或许也是不久的将来.
30 |
31 |
32 |
33 | ## 后端的危机感
34 |
35 | Severless 方案通过 FaaS 落地, 之前的 LearnCloud 已经有类似的尝试, AWS 的 BigTable, Lambda, 小应用已经能实现真正的 Serverless 了.
36 |
37 | 包括目前的各种 SDK, 能不能用各种 API as a Service 来替代, 业务只是需要结合各种三方 APIs 呢? 比如, 自己闲来无聊搞个人脸开门服务, 是不是可以这样:
38 |
39 | > 三方摄像头 + IoT 三方 -> 图片获取和上传 (FaaS) -> 三方人脸识别 -> 三方身份证绑定 -> 三方登录 -> 下发指令 (FaaS) + BigTable -> 三方开锁 (物联协议)
40 |
41 | 后端需要做的事, 可能比想象的少.
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-12-22-global-tshirt.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "一件 T Shirt 的全球经济之旅"
4 | date: 2017-12-22
5 | tags: [finance]
6 | commentIssueId: 65
7 | ---
8 |
9 | << 一件 T Shirt 的全球经济之旅 >> 笔记
10 | * 没有真正的全球自由贸易
11 | * 另外一种形式的全球经济
12 |
13 |
14 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-12-27-2018-fe.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "2017 前端梳理"
4 | date: 2017-12-28
5 | tags: [learning]
6 | commentIssueId: 65
7 | ---
8 |
9 |
10 | ## References
11 |
12 | * [前端领域2017年有哪些变化,2018年又有怎样的期待?](https://segmentfault.com/p/1210000012596690/read)
13 |
14 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-12-27-UC.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "UC PWA 探索"
4 | date: 2017-12-28
5 | tags: [learning]
6 | commentIssueId: 65
7 | ---
8 |
9 | ## References
10 |
11 | * [你不知道的圣诞礼物 - U4 2.0 内核正式登陆中文版 UC](https://weibo.com/ttarticle/p/show?id=2309404189246972935760)
12 | * [UC 开发平台](http://open-uc.uc.cn/document/develop/webpush-v3)
--------------------------------------------------------------------------------
/_posts/2017-06~12/2017-12-28-medium.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "价值新闻媒体梳理"
4 | date: 2017-12-28
5 | tags: [learning, news]
6 | commentIssueId: 65
7 | ---
8 |
9 | 价值新闻媒体梳理, 主要是鉴于当前信息💥, 做一层低价值新闻的过滤. 并鉴于之前的经验, 新闻的频率可控制在一次看一次新闻周刊, 而需要太过频繁.
10 |
11 | ## 来源
12 | > 需要自备相关技能, 毕竟立场比较中立.
13 |
14 | ### 外媒
15 |
16 | * [Reuters 路透社](https://cn.reuters.com)
17 | * [Financial Times 中文网](http://www.ftchinese.com/)
18 | * [Bloomberg 彭博社](https://www.bloomberg.com/): English Only
19 | * [The Washington Post 华盛顿邮报](https://www.washingtonpost.com/): English Only
20 | * [The Times 泰晤士报](https://www.thetimes.co.uk/): English Only
21 | * [高盛预测报告](https://www.google.com.hk/search?newwindow=1&q=%E9%AB%98%E7%9B%9B%E7%A0%94%E7%A9%B6%E6%8A%A5%E5%91%8A%E4%B8%8B%E8%BD%BD&sa=X&ved=0ahUKEwjNu5zD-NjYAhVI0oMKHStWCiEQ1QIIfCgA&biw=1332&bih=780)
22 | * [美林 预测报告](https://www.google.com.hk/search?newwindow=1&biw=1332&bih=780&ei=8hRcWsmPH6rGjwT-iJWgBA&q=%E7%BE%8E%E6%9E%97+%E9%A2%84%E6%B5%8B%E6%8A%A5%E5%91%8A&oq=%E7%BE%8E%E6%9E%97+%E9%A2%84%E6%B5%8B%E6%8A%A5%E5%91%8A&gs_l=psy-ab.3...3541.7964.0.8121.13.11.0.0.0.0.324.1275.3-4.4.0....0...1c.1j4.64.psy-ab..9.2.640...0j0i67k1j0i12k1.0.pTcBEGA1Tww)
23 |
24 | ### 国内
25 |
26 | * [CCTV2 财经周刊](http://tv.cctv.com/lm/cjzk/)
27 | * [CCTV-13 新闻周刊](http://tv.cctv.com/lm/xwzk/)
28 |
29 |
--------------------------------------------------------------------------------
/_posts/2017-06~12/css-in-js.html:
--------------------------------------------------------------------------------
1 |
10 | convert
11 | css 2 js
12 |
13 |
57 |
--------------------------------------------------------------------------------
/_posts/2017/2017-01-10-service-worker-for-cache.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "service worker for cache (PWA, HTTP2.0)"
4 | date: 2017-01-10 14:45:00 +0800
5 | categories: service worker cache pwa
6 | tags: [javascript, cache]
7 | ---
8 |
9 | # cache
10 | * [https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage](https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage)
11 | * [https://developer.mozilla.org/en-US/docs/Web/API/Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache)
12 |
13 | # service worker
14 | * [https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers)
15 |
16 | # http2.0
17 |
18 |
19 | # PWA
20 | * [PWA offline](https://www.zhihu.com/question/46690207/answer/104851767)
21 |
22 | > Offline (离线能力)
23 | 离线和弱网环境也能秒开的能力,但是这个就牛逼了。Hybrid 架构搞了那么久,不就为的这个吗?之前有个东西叫 Application Cache,但是那货就是个 shit。
24 | >
25 | 所以这次 Chrome 搞了个 Service Worker 出来,给了 Web 一个可以跑在后台的线程,它可以搭配非常靠谱的 CacheStorage API 做缓存、可以拦截所有 HTTP 请求并使用 Fetch API 进行 response,一个非常完备的 Proxy 就这么诞生了。
26 | >
27 | 作者:黄玄
28 | 链接:https://www.zhihu.com/question/46690207/answer/104851767
29 | 来源:知乎
30 | 著作权归作者所有,转载请联系作者获得授权。
31 |
--------------------------------------------------------------------------------
/_posts/2017/2017-02-13-chrome-note.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Chrome Note"
4 | date: 2017-02-13 11:05:00 +0800
5 | categories: Chrome Note
6 | tags: [chrome, note]
7 | ---
8 |
9 | # Links
10 | * [Chrome开发者工具的小技巧](http://coolshell.cn/articles/17634.html), [img](https://user-images.githubusercontent.com/7157346/187056804-f8db784d-ddcc-4b9a-8fb8-2132f1065b76.png)
11 | * `node --inspect --debug-brk app.js`
12 | * 调试临时 vm js 文件: `//@ sourceURL=dynamicScript.js`, 参考, https://stackoverflow.com/questions/17367560/chrome-development-tool-vm-file-from-javascript
13 |
--------------------------------------------------------------------------------
/_posts/2017/2017-02-27-nodejs-best-practices.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Nodejs Best Practices"
4 | date: 2017-03-03
5 | tags: [javascript, nodejs, best-practices]
6 | ---
7 |
8 | # Articles
9 | * [https://github.com/UltimatePromotions/ourhandsandfeet/issues/109](https://github.com/UltimatePromotions/ourhandsandfeet/issues/109)
10 |
11 | # node.js ES2015, ES2016, ES2017 Support
12 | * [http://node.green/](http://node.green/)
13 |
--------------------------------------------------------------------------------
/_posts/2017/2017-02-28-machine-stock.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "machine stock"
4 | date: 2017-02-28
5 | tags: [machine-learn]
6 | ---
7 |
8 | ```
9 | y = 5-days-stock / 30-days-stock
10 | x1 = date = timestamp / 1000 * 24 * 60 * 60
11 | x2 = gold
12 | x3 = silver
13 | x4 = Dollar
14 |
15 | y = sum(a1 * xn)
16 |
17 | an may equal to 0.5
18 | an my equal to an*xn
19 | an may equal to an*xn*xn
20 | an may equal to (an + b/xn)
21 |
22 | Machine Learning can solve the an?
23 |
24 | ```
25 |
26 | # Discuss
27 | * [https://www.zhihu.com/question/23427108](https://www.zhihu.com/question/23427108)
28 |
--------------------------------------------------------------------------------
/_posts/2017/2017-03-09-data-center.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Data center"
4 | date: 2017-03-09
5 | tags: [data]
6 | ---
7 |
8 | # List
9 | * [data.gov](https://www.data.gov/)
10 | * [archive.org](https://archive.org/)
11 | * [google.com/publicdata](https://www.google.com/publicdata/directory)
12 | * [awesome-public-datasets](https://github.com/caesar0301/awesome-public-datasets)
13 |
--------------------------------------------------------------------------------
/_posts/2017/2017-03-16-graphqlviz.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Graphql Visualization"
4 | date: 2017-03-16
5 | tags: [graphql, visualization]
6 | ---
7 |
8 | # Requirements
9 | * Install `graphviz` form [graphviz.org](http://www.graphviz.org), add it to `PATH`
10 | * Install `graphqlviz` by `npm install -g graphqlviz`
11 |
12 | # Visualize it as an image
13 | * `graphqlviz http://localhost:3000/graphql | dot -Tpng -o graph.png`
14 |
--------------------------------------------------------------------------------
/_posts/2017/2017-04-06-electron-note.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Electorn Note"
4 | date: 2017-04-06
5 | tags: [electron, note]
6 | commentIssueId: 5
7 | ---
8 |
9 | # Install electron
10 | ```shell
11 | set ELECTRON_MIRROR=http://npm.taobao.org/mirrors/electron/
12 | npm install electron --save-dev
13 | ```
14 |
15 | # Run in terminal
16 | `.\"./node_modules/.bin/electron" .`, [more](http://stackoverflow.com/questions/20765337/how-to-fix-is-not-an-internal-or-external-command-error)
17 |
18 | # Debugging in VSCode
19 | Attention! Electron version should be `1.5.1` as `1.6.*` is not work on VSCode.
20 |
21 | `Ctrl + P` & `ext install debugger-for-chrome` to install `Debugger for chrome`, then you can debug the main process.
22 |
23 | # Packager
24 | * `npm install electron-packager -g`
25 | * `electron-packager . --overwrite --icon ./favicon.png --ignore=\.cmd`
26 |
--------------------------------------------------------------------------------
/_posts/2017/2017-04-07-feedback-system.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Feedback Systems"
4 | date: 2017-04-07
5 | tags: []
6 | ---
7 |
8 | # Feedback systems summary
9 |
10 | Those sites come form [zhihu](https://www.zhihu.com/question/28858307?sort=created).
11 | * [UDesk](http://www.udesk.cn/website/)
12 | * [逸创](http://www.kf5.com/)
13 | * [美洽](http://meiqia.com/)
14 | * [网易七鱼](http://qiyukf.com/)
15 | * [daovoice](http://www.daovoice.io/)
16 |
--------------------------------------------------------------------------------
/_posts/2017/2017-04-08-you-dont-know-js.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Note: You Don't Know JS"
4 | date: 2017-04-08
5 | tags: [javascript, note]
6 | commentIssueId: 3
7 | ---
8 |
9 | # To see list
10 | * [ ] Up & Going
11 | * [ ] Foreword
12 | * [ ] Preface
13 | * [ ] Chapter 1: Into Programming
14 | * [x] Chapter 2: Into Javascript
15 | * [ ] Chapter 3: Into YDKJS
16 | * [ ] Scope & Closures
17 | * [ ] this & Object Prototypes
18 | * [ ] Types & Grammer
19 | * [ ] Async & Performance
20 | * [ ] ES6 & Beyond
21 |
22 | # Up & Going
23 |
24 | ## Chapter 1: Into Javascript
25 |
26 | ### typeof a
27 | > Notice how in this snippet the `a` variable holds every different type of value, and that despite appearances, `typeof a` is not asking for the "type of `a`", but rather for the "type of the value currently in `a`." Only values have types in JavaScript; variables are just simple containers for those values.
28 |
29 | ### Truthy & falsy
30 | > The specific list of "falsy" values in JavaScript is as follows:
31 | >
32 | > * `""` (empty string)
33 | > * `0`, `-0`, `NaN` (invalid `number`)
34 | > * `null`, `undefined`
35 | > * `false`
36 | >
37 | > Any value that's not on this "falsy" list is "truthy."
38 |
--------------------------------------------------------------------------------
/_posts/2017/2017-05-31-Something-about-virtual-dom.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Something About Virtual Dom"
4 | date: 2017-05-31
5 | tags: [virtual-dom, framework]
6 | commentIssueId: 12
7 | ---
8 |
9 | Virtual Dom is great! But, actually, I do think it's should be optimized by the browsers itself not some stuff like JS.
10 |
11 | I do believe we just do what we should do, and leave others to the browsers.
12 |
13 | Dang! [morphdom](https://github.com/patrick-steele-idem/morphdom#benchmarks) what I exactly want is come out! Let's end virtual-dom!
14 |
15 | [All projects on github.](https://github.com/search?l=JavaScript&o=desc&q=virtual+dom&s=stars&type=Repositories&utf8=%E2%9C%93)
16 |
--------------------------------------------------------------------------------
/_posts/2017/2017-06-01-chrome-extension.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Chrome Extension"
4 | date: 2017-06-01
5 | tags: [chrome, extension, note]
6 | commentIssueId: 15
7 | ---
8 |
9 | ### Get last focused window.
10 | [Document](https://developer.chrome.com/extensions/windows)
11 |
12 | ```js
13 | chrome.windows.getLastFocused({
14 | populate: true
15 | },
16 | (res) => {
17 | console.log(res);
18 | },
19 | );
20 | ```
21 |
22 | ## Get tab detail
23 | [Document](https://developer.chrome.com/extensions/tabs)
24 |
25 | ```js
26 | chrome.tabs.get(699, (tab) => console.log(tab))
27 | ```
28 |
29 | ## webRequest
30 | [Document](https://developer.chrome.com/extensions/webRequest)
31 |
32 | #### http -> https
33 | If you can't visit `http://www.google.com.hk`. It will atomically modify `http` to `https`.
34 |
35 | ```js
36 | chrome.webRequest.onErrorOccurred.addListener(
37 | details => {
38 | console.log(details);
39 | if (details.type === 'main_frame' && /ERR_CONNECTION_TIMED_OUT|ERR_CONNECTION_RESET/.test(details.error) && /http:/.test(details.url)) {
40 | chrome.tabs.update(details.tabId, {
41 | url: details.url.replace('http:', 'https:'),
42 | });
43 | }
44 | },
45 | {
46 | urls: [""]
47 | }
48 | );
49 | ```
50 |
--------------------------------------------------------------------------------
/_posts/2017/2017-06-18-vue-code-review.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Vue Code Review"
4 | date: 2017-06-18
5 | tags: [vue, code-review]
6 | commentIssueId: 21
7 | ---
8 |
9 | * Mind map for Vue
10 | * References
11 |
12 | ## Mind Map
13 | [Vue mind map hosted by baidu-naotu](http://naotu.baidu.com/file/9e62c1b8f795036cbb2aebf16609bc01?token=7d74266c1fa4e5eb)
14 |
15 | ## Virtual-Dom
16 | [simple-vurtual-dom](https://github.com/livoras/simple-virtual-dom).
17 |
18 | ## References
19 | * [vue-code-review by 勾股](http://jiongks.name/blog/vue-code-review/)
20 | * [阅读vue.js源码可以从哪几方面入手?](https://www.zhihu.com/question/36986850)
21 | * [vue-come-true](https://github.com/coderzzp/vue-come-true/blob/master/README.md)
22 | * [mvvm: 源码注释](https://github.com/fastCreator/MVVM)
23 | * [深度剖析:如何实现一个 Virtual DOM 算法](https://github.com/livoras/blog/issues/13)
24 | * [The Diffing Algorithm in React](https://facebook.github.io/react/docs/reconciliation.html), [协调算法(Diff算法)](https://swenyang.gitbooks.io/translation/content/react/diff-algorithm.html)
25 |
--------------------------------------------------------------------------------
/_posts/2017/2017-06-21-game-notes.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Game notes"
4 | date: 2017-06-21
5 | tags: [game, canvas, webgl]
6 | commentIssueId: 24
7 | ---
8 |
9 | Game notes
10 | * Canvas VS WebGL
11 | * Math
12 | * [Math-Note-for-Game-Dev](https://github.com/gdgoldlion/Math-Note-for-Game-Dev): 系统的,完备的,清晰的整理游戏开发中所使用的数学知识笔记。用于游戏开发者的数学手册。
13 | * Frameworks
14 | * [pixi.js](https://github.com/pixijs/pixi.js): Super fast HTML 5 2D rendering engine that uses webGL with canvas fallback.
15 | * [Hilo](https://github.com/hiloteam/Hilo): A Cross-end HTML5 Game development solution developed by Alibaba Group
16 | * [phaser](https://github.com/photonstorm/phaser): Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
17 | * [Babylon.js](https://github.com/BabylonJS/Babylon.js): a complete JavaScript framework for building 3D games with HTML 5 and WebGL.
18 | * Play game with AI
19 |
--------------------------------------------------------------------------------
/_posts/2017/2017-08-28-360-image1.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: html
3 | title: "360 Image1"
4 | date: 2017-08-28
5 | ---
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/_posts/2017/2017-08-28-360-image2.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: html
3 | title: "360 Image2"
4 | date: 2017-08-28
5 | ---
6 |
7 |
8 | 360 Image
9 |
18 |
19 |
20 |
21 |
22 |
36 |
37 |
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-01-06-10-skills.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Top 10 Skills"
4 | date: 2018-01-06
5 | tags: [note]
6 | commentIssueId: 71
7 | ---
8 |
9 |
10 |
11 | Top 10 skills in the Fourth Industrial Revolution. 第四次革命中的 10 大最重要技能.
12 |
13 |
14 |
15 | ## Skills
16 |
17 | * Complex Problem Sloving / 复杂问题解决能力
18 | * Critical Thinking / 批判性思维
19 | * Creativity / 创造力
20 | * People Management / 人事管理
21 | * Coordination with Others / 协调能力
22 | * Emotional Intelligence / 情商
23 | * Judgment and Decision / 判断和决策
24 | * Service Orientation / 服务能力
25 | * Negotiation / 协商能力
26 | * Cognitive Flexcibility / 认识灵活性
27 |
28 |
29 |
30 | ## Image
31 |
32 |
33 |
34 |
35 |
36 | 
37 |
38 |
39 |
40 | 
41 |
42 | ## References
43 |
44 | * [The 10 skills you need to thrive in the Fourth Industrial Revolution](https://www.weforum.org/agenda/2016/01/the-10-skills-you-need-to-thrive-in-the-fourth-industrial-revolution/)
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-01-08-bff.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "BFF"
4 | date: 2018-01-08
5 | tags: [note]
6 | commentIssueId: 71
7 | ---
8 |
9 |
10 |
11 | BFF (Backends for Frontends): 通用服务 API 和 体验者 API 之争
12 |
13 |
14 |
15 | ## References
16 |
17 | * [Developer Experience First —— TWA 的理念与实践](https://zhuanlan.zhihu.com/p/32219319)
18 | * [蚂蚁财富 BFF 实践](https://os.alipayobjects.com/rmsportal/WtUmBLJSmqtDHkvJzuzM.pdf)
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-01-08-scrum.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "scrum"
4 | date: 2018-01-08
5 | tags: [note]
6 | commentIssueId: 71
7 | ---
8 |
9 | Scrum 是迭代式增量软件开发过程,通常用于敏捷软件开发。Scrum包括了一系列实践和预定义角色的过程骨架。Scrum中的主要角色包括同项目经理类似的Scrum主管角色负责维护过程和任务,产品负责人代表利益所有者,开发团队包括了所有开发人员。虽然Scrum是为管理软件开发项目而开发的,它同样可以用于运行软件维护团队,或者作为计划管理方法:Scrum of Scrums.
10 |
11 |
12 |
13 | ## References
14 |
15 | * [ScrumMaster的检查清单](http://scrummasterchecklist.org/pdf/ScrumMaster_Checklist_zh-Hans.pdf)
16 | * [open project github](https://github.com/opf/openproject)
17 | * [taiga.io github](https://github.com/taigaio)
18 | * [simple scrum](https://github.com/taigaio)
19 | * [peerjs]()
20 | * [gitscrum](https://github.com/gitscrum-community-edition/laravel-gitscrum)
21 | * [docker gitscrum](https://github.com/gitscrum-community-edition/docker-gitscrum/blob/master/docker-compose.yml)
22 | * [Introduction to Scrum PPT](https://www.mountaingoatsoftware.com/presentations/an-introduction-to-scrum)
23 | * [scrum 现状](http://www.infoq.com/cn/news/2018/02/2017-2018-state-of-scrum) @20180227
24 |
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-01-16-color-picker.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "颜色选择, 设计配色"
4 | date: 2018-01-16
5 | tags: [design, UI]
6 | commentIssueId: 65
7 | ---
8 |
9 | 最基本的颜色搭配知识, 摘录自[UI 设计色彩搭配](http://www.xueui.cn/tutorials/color-tutorial/ui-color-matching-design.html)
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | ## References & Tools
26 | * [Coolors + SkillShare](https://coolors.co/browser/best/1)
27 | * [Color Schema Designer](http://colorschemedesigner.com/csd-3.5/)
28 | * [UI 设计色彩搭配](http://www.xueui.cn/tutorials/color-tutorial/ui-color-matching-design.html)
29 | * [UI 设计的配色方法](http://www.360doc.com/content/16/0402/22/4587493_547409402.shtml)
30 | * [Ant Design](https://ant.design/docs/spec/introduce-cn): 关于设计理念的介绍挺好的
31 |
32 |
33 |
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-01-19-js-123.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "javascript( a == 1 && a == 2 && a == 3)"
4 | date: 2018-01-19
5 | tags: [javascript]
6 | commentIssueId: 65
7 | ---
8 |
9 | 要使 `javascript( a == 1 && a == 2 && a == 3)` 为 true, 有可能吗? 既然抛出来了, 那一定是有解的.
10 |
11 |
12 |
13 |
14 | ```js
15 | var obj = {
16 | index: 1,
17 | get a() {
18 | return obj.index++;
19 | }
20 | }
21 |
22 | console.log('getter 第一次:', obj.a == 1 && obj.a == 2 && obj.a == 3)
23 | console.log('getter 第二次:', obj.a == 1 && obj.a == 2 && obj.a == 3)
24 |
25 | class A {
26 | constructor() {
27 | this.index = 1;
28 | }
29 | toString() {
30 | return this.index++;
31 | }
32 | }
33 | var a = new A();
34 | console.log('class 第一次:', a == 1 && a == 2 && a == 3)
35 | console.log('class 第二次:', a == 1 && a == 2 && a == 3)
36 | ```
37 |
38 |
39 |
40 | 还有队友的 hack
41 |
42 | ```js
43 | a = [1,2,3];
44 | a.join = a.shift;
45 | console.log(a == 1 && a == 2 && a == 3); // 数据进行字符串比较的时候, 会自动调用 join 函数, 将 join 函数重写即可.
46 | ```
47 |
48 |
49 |
50 | 还有一种障眼法, 搞3个不同的 a, 编码不一样, 但是看上去一样也行哈
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-01-25-xmind.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Xmind 之 Gantt Chart"
4 | date: 2018-01-25
5 | tags: [note]
6 | commentIssueId: 65
7 | ---
8 |
9 | xmind 还是比较强大的哈, 而且意外得知 xmind 竟然支持 gantt chart, 在 windows 上由于没有 OmniPlan 这么好用的工具, 就用 xmind 管理也行哈.
10 |
11 |
12 |
13 | ## 安装过程
14 |
15 | * 下载官网最新版 [xmind 8 pro update6](http://www.xmind.net/), [或进入历史版本查看下载](http://www.xmind.net/download/previous/),
16 |
17 | * 目前 mac 版需要下载`7.5`, 因为最新版仅支持邮件激活
18 | * windows 版可以下 `8 pro`.
19 |
20 | > 下载备份地址: 链接: https://pan.baidu.com/s/1nxiiXT3 密码: f7yc
21 |
22 | * 下载 `XMindCrack.jar` , 地址同上面的百度云地址
23 |
24 | * 正常安装 `xmind`
25 |
26 | * 进入安装目录, 并找到 `xmind.ini`
27 |
28 | * windows: 如 `c:\Program Files (x86)\XMind`
29 |
30 | * mac: `Application/xmind` 显示包内容
31 |
32 | 
33 |
34 | * 添加文本: `-javaagent:./XMindCrack.jar`
35 |
36 | * 在 mac 下貌似需要绝对路径: `-javaagent:/Applications/XMind.app/Contents/Eclipse/XMindCrack.jar`
37 |
38 | * 在系统 hosts 中添加 `127.0.0.1 www.xmind.net`
39 |
40 | * 打开` xmind`, 邮箱随便填, 输入序列号: `XAka34A2rVRYJ4XBIU35UZMUEEF64CMMIYZCK2FZZUQNODEKUHGJLFMSLIQMQUCUBXRENLK6NZL37JXP4PZXQFILMQ2RG5R7G4QNDO3PSOEUBOCDRYSSXZGRARV6MGA33TN2AMUBHEL4FXMWYTTJDEINJXUAV4BAYKBDCZQWVF3LWYXSDCXY546U3NBGOI3ZPAP2SO3CSQFNB7VVIY123456789012345`
41 |
42 | ## 愉快玩耍了
43 |
44 | 
45 |
46 | ## References
47 |
48 | * [各版本xmind pro 破解](http://blog.csdn.net/mxiaochao/article/details/79054163)
49 | * [Xmind 8 update7破解版(附破解教程|激活补丁|序列号) ](http://blog.csdn.net/Smile0806/article/details/78954882)
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-02-01-block-chain.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "区块链笔记"
4 | date: 2018-02-01
5 | tags: [learning]
6 | commentIssueId: 73
7 | ---
8 |
9 | 区块链的本质是一种关于信任的互联网协议, 或者说是建立在互联网上的分布式记账(或超级账本), 智能合约(包括数字资本, 鉴权证明), 信用体系(共识数据库). 下面简单列一下目前能想到的应用场景
10 |
11 | ## 应用场景
12 |
13 | #### 加密货币
14 |
15 | 比特币
16 |
17 | #### 追踪产品信息
18 |
19 | * 钻石交易和非法来源杜绝
20 | * 数据化土地流转协议
21 | * 房地产信息
22 |
23 | #### 数字资本
24 |
25 | * 音乐版权
26 | * 影视作品版权
27 |
28 | ## 腾讯区块链
29 |
30 | 
31 |
32 | ## References
33 |
34 | * [区块链入门教程](http://www.ruanyifeng.com/blog/2017/12/blockchain-tutorial.html)
35 | * [谈谈我对区块链的理解](https://mp.weixin.qq.com/s/6zdlnPrvbtH_RI89Lc71BQ)
36 | * [EmTech China : Brian Behlendorf](http://www.emtechchina.cn/)
37 | * [腾讯区块链](https://trustsql.qq.com/)
38 | * [腾讯白皮书](https://www.jianshu.com/p/7780575fa069)
39 |
40 |
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-02-04-netease-broadcast.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "网易的圈层传播"
4 | date: 2018-02-04
5 | tags: [learning]
6 | commentIssueId: 65
7 | ---
8 |
9 |
10 |
11 | [为什么网易总能刷屏?背后的“圈层营销"才是真正的秘诀](https://www.digitaling.com/articles/43199.html)
12 | > 在中心化传播的基础上, 使用受众圈层传播, 并吸引用户去获得社交货币, 来达到穿层传播, 以用户裂变达到更广泛的传播效果
13 | >
14 |
15 |
16 | 还可参考: [干货丨5分钟学会涨粉必备的裂变推广方法论](http://www.meihua.info/a/71280)
17 |
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-02-12-ux-time.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "时间 & 用户体验"
4 | date: 2018-02-12
5 | tags: [learning]
6 | commentIssueId: 74
7 | ---
8 |
9 |
10 |
11 | 此文简单记录一下时间和用户体验之间的关系
12 |
13 |
14 |
15 | ## 引用
16 |
17 |
18 | 
19 |
20 | 
21 |
22 | ### References
23 |
24 | * [交互微动效设计指南](https://isux.tencent.com/articles/106.html)
25 | * <<人机对话的相应时间>> Robert B. Miller
26 | * [H5App用户体验开发规范2017](http://h5.alipay.net/entry/share/doc/110)
27 | * [Measure Performance with the RAIL Model](https://developers.google.com/web/fundamentals/performance/rail)
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-02-27-export-certs.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Export Cert"
4 | date: 2018-02-27
5 | tags: [note]
6 | commentIssueId: 74
7 | ---
8 |
9 | 从 chrome 中导出对应 CA 证书, 适用于 mac
10 | > 仅用于导出目前已信任的根证书, 导出后, 可发送给手机端安装
11 | * 右击查看网站证书信息
12 | * 打开 chrome 搜索 ssl
13 | * 打开 keychain 选择对应的 cert , 右击导出即可
14 |
15 |
16 | 
17 |
18 |
19 |
20 | 
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-02-28-douyin.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "抖音的运营"
4 | date: 2018-02-28
5 | tags: [note]
6 | commentIssueId: 74
7 | ---
8 |
9 | Todo: [上线仅500天的抖音,居然PK掉了快手和美拍,这个团队做了什么?](https://www.digitaling.com/articles/43843.html)
10 |
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-02-28-flutter-rn-weex.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: " Flutter & React & Weex"
4 | date: 2018-02-28
5 | tags: [note]
6 | commentIssueId: 74
7 | ---
8 |
9 | Google 混合框架有啥亮点? Todo: Flutter, RN, Weex 区别
10 |
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-03-07-js-test.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "An Overview of Javascript testing"
4 | date: 2018-03-07
5 | tags: [note, js, test]
6 | commentIssueId: 74
7 | ---
8 |
9 | 测试是保证项目质量交付的重要手段. Todo: [an-overview-of-javascript-testing-in-2018](https://medium.com/welldone-software/an-overview-of-javascript-testing-in-2018-f68950900bc3)
10 |
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-03-20-facebook_aliexpress_shopify.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Facebook Aliexpress Shopify"
4 | date: 2018-03-20
5 | tags: [note]
6 | commentIssueId: 75
7 | ---
8 |
9 | 营销三剑客:Facebook, AliExpress,Shopify。引流 + 开店 + 全球物流。
10 |
11 |
12 |
13 | ## 引流
14 |
15 | 微信,微信,在国内的流量巨头,但放眼国际,流量巨头不只有微信。
16 |
17 |
18 |
19 | ## 物流
20 |
21 | 全球买,全球卖,AliExpress 已不在是问题
22 |
23 |
24 |
25 | ## 店铺
26 |
27 | 微信里的微店,还有流行的 PHP 模板商城。天猫,淘宝,Amazon 等平台的店铺优势在哪儿?仅仅是背书吗?在最求个性化的道路上,综合商城和街道店铺,谁会更有优势?标准和个性化,谁会更有优势?目前风口在前者,在未来趋势应该是后者。
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-03-26-debuglog.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "debug log tips"
4 | date: 2018-03-26
5 | tags: [note, tips]
6 | commentIssueId: 75
7 | ---
8 |
9 |
10 | debuglog 日志输出的小技巧
11 | * util/debuglog
12 | * npm/debug
13 | * cross-env
14 |
15 |
16 |
17 | ## util/debuglog
18 |
19 | [node api](https://nodejs.org/api/util.html#util_util_debuglog_section)
20 |
21 | > 使用 node 自带的 debuglog 工具,需设置 NODE_DEBUG 变量
22 |
23 | ```bash
24 | ➜ test-001 NODE_DEBUG=foo node -e "require('util').debuglog('foo')('hello world')"
25 | FOO 70475: hello world
26 | ➜ test-001 node -e "require('util').debuglog('foo')('hello world')"
27 | ➜ test-001
28 | ```
29 |
30 |
31 |
32 | ## npm/debug
33 |
34 | [npm/debug](https://www.npmjs.com/package/debug)
35 |
36 | > 使用 debug npm 包调试的,需设置 DEBUG 变量
37 |
38 | ```bash
39 | ➜ test-001 DEBUG=foo node -e "require('debug')('foo')('hello world')"
40 | foo hello world +0ms
41 | ➜ test-001 node -e "require('debug')('foo')('hello world')"
42 | ➜ test-001
43 | ```
44 |
45 |
46 |
47 | ## npm/cross-env
48 |
49 | > 需要在 mac & windows 上跨平台设置系统变量的,可使用 cross-env 设置
50 |
51 | ```bash
52 | ➜ test-001 node_modules/.bin/cross-env ZZZ=ABC node -e "console.log(process.env.ZZZ)"
53 | ABC
54 | ➜ test-001 ZZZ=AB node -e "console.log(process.env.ZZZ)"
55 | AB
56 | ➜ test-001 node -e "console.log(process.env.ZZZ)"
57 | undefined
58 | ➜ test-001
59 | ```
60 |
61 |
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-03-26-npm.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "npm Cannot find module xxx"
4 | date: 2018-03-26
5 | tags: [note]
6 | commentIssueId: 75
7 | ---
8 |
9 | `npm i` 又出错了,又 Google,算了,还是记一下解决方法吧。。。
10 |
11 | ## Bash History
12 |
13 | ```bash
14 | ➜ test-001 npm i
15 | npm ERR! code MODULE_NOT_FOUND
16 | npm ERR! Cannot find module 'internal/util/types'
17 |
18 | npm ERR! A complete log of this run can be found in:
19 | npm ERR! /Users/zhoukeke/.npm/_logs/2018-03-26T07_49_53_692Z-debug.log
20 | ➜ test-001 sudo n
21 | node/6.11.3
22 | ➜ test-001
23 | ➜ test-001
24 | ➜ test-001
25 | ➜ test-001 sudo npm install npm -g
26 | /usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
27 | /usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js
28 | - fstream@1.0.10 node_modules/npm/node_modules/fstream
29 | ...
30 | ➜ test-001 sudo n stable
31 | ➜ test-001 npm i
32 | npm notice created a lockfile as package-lock.json. You should commit this file.
33 | npm WARN test-001@0.1.0 No repository field.
34 | npm WARN test-001@0.1.0 No license field.
35 |
36 | added 48 packages in 2.524s
37 |
38 | ```
39 |
40 |
41 |
42 | # References
43 |
44 | * https://blog.csdn.net/m1213642578/article/details/79085782
45 | * https://stackoverflow.com/questions/40308623/cannot-find-module-internal-fs-after-upgrading-to-node-7/40406482#40406482
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-03-28-debug-tips.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "debug web tips on native"
4 | date: 2018-03-28
5 | tags: [note]
6 | commentIssueId: 75
7 | ---
8 |
9 | Debug on Android & iOS with Chrome & Safari.
10 | * Debug iOS Web Page
11 | * Debug Android Web Page
12 |
13 | ## Debug iOS Web Page
14 |
15 | * Mac Safari:
16 | * Safari -> Preferences -> Advanced -> Show Develop menu in menu bar
17 | * 
18 | * iPhone
19 | * Settings -> Safari -> Advanced -> Javascript & Web Inspector
20 | * 
21 | * 在 iOS 上通过 Safari 打开页面,即可在 Mac 上使用 Develop 按钮调试
22 |
23 | 
24 | 
25 |
26 |
27 | ## Debug Android Web Page
28 |
29 | * 打开开发者模式
30 |
31 | * 如小米参考: https://jingyan.baidu.com/article/425e69e602008cbe15fc161b.html
32 | * 打开 USB debugging
33 | * 手机通过数据线连接
34 | * PC Chrome 打开 `chrome://inspect` 页面
35 | * Android 游览器打开页面 (用 系统游览器或 chrome 都可以)
36 | * 一切正常的话,能看到 Chrome 和 webview 的网页
37 |
38 | 
39 |
40 | * 点击 inspect 即可正常调试页面
41 | * 
42 | * 页面也可通过控制台的更多 -> Remote devices 打开
43 |
44 | 
45 |
46 |
--------------------------------------------------------------------------------
/_posts/2018-01~03/2018-03-30-git.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Add multiple remote git locations"
4 | date: 2018-03-30
5 | tags: [note]
6 | commentIssueId: 75
7 | ---
8 |
9 | Add multiple remote git locations
10 | * create new ssh by `ssh-kegen`
11 | * edit `/.ssh/config`
12 | * `git remote add`
13 |
14 |
15 | ## Add multiple remote git locations
16 | ```bash
17 | # create new ssh key
18 | $ ssh-keygen -t rsa -C "name@abc.com" -f $HOME/.ssh/yournewsssh
19 |
20 | # create new ssh config
21 | $ vi ~/.ssh/config
22 | Host code.aliyun.com
23 | Hostname code.aliyun.com
24 | IdentityFile ~/.ssh/yournewsssh
25 | IdentitiesOnly yes
26 |
27 | # add remote alias & push
28 | $ git remote add aliyun git@code.aliyun.com:xxx/xxx.git
29 | $ git push aliyun master
30 | Counting objects: 1546, done.
31 | Delta compression using up to 8 threads.
32 | Compressing objects: 100% (1443/1443), done.
33 | Writing objects: 100% (1546/1546), 3.46 MiB | 2.79 MiB/s, done.
34 | Total 1546 (delta 544), reused 947 (delta 37)
35 | remote: Resolving deltas: 100% (544/544), done.
36 | * [new branch] master -> master
37 | ```
38 |
39 |
40 |
41 | ## References
42 |
43 | * [pull-push-from-multiple-remote-locations](https://stackoverflow.com/questions/849308/pull-push-from-multiple-remote-locations)
44 | * [specify-private-ssh-key-to-use-when-executing-shell-command](https://stackoverflow.com/questions/4565700/specify-private-ssh-key-to-use-when-executing-shell-command)
--------------------------------------------------------------------------------
/_posts/2018-04~06/2018-04-08-ps.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "PS 切图小记"
4 | date: 2018-04-14
5 | tags: [note]
6 | commentIssueId: 77
7 | ---
8 |
9 | PS 切图小技巧
10 | > 在能使用右击快速导出的情况下,快速导出 png 即可,要是导出的 png 周围有空白,使用以下方法:
11 | >
12 | > 新建图层,合并图层,复制,选择,新建,粘贴
13 |
14 |
15 |
16 | ## PS 导出 png 去除周围空白
17 |
18 | * 选中需要导出的组,和选中组同等级目录下,新建一个图层
19 |
20 |
21 | 
22 |
23 | * 将组和新建的图层进行合并图层操作
24 |
25 |
26 | 
27 |
28 | * 使用选择框工具,大范围选中需要导出的图层,并按 `Command + C` 复制
29 |
30 |
31 | 
32 |
33 | * `Command + N` 新建图层,选择来自剪切板,并设置背景为透明即可
34 |
35 | 
36 |
37 | * 粘贴
38 |
39 |
40 |
41 | 
42 |
43 |
--------------------------------------------------------------------------------
/_posts/2018-04~06/2018-04-14-ar-ai.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "AR AI 观点小记"
4 | date: 2018-04-14
5 | tags: [note]
6 | commentIssueId: 77
7 | ---
8 |
9 | 基于当前认知的判断
10 | - 数据分析师,目前看来在公司和社会的价值较大
11 | > 缺陷是强依赖科学思维辩证观,在以创造力和想象力为主导的未来社会可能并不适用
12 | - AR 成熟时间比 AI 会早一些,和人的创造力,想象力,以及人的低效结合,商业增值可能会比较大
13 | - AI 成熟时间会比较迟,将 Thing 模式化,增值空间较小,但会变成基础设施
14 |
15 |
16 |
--------------------------------------------------------------------------------
/_posts/2018-04~06/2018-04-15-fe-checklist.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "前端技术考虑点 checklist"
4 | date: 2018-04-15
5 | tags: [fe]
6 | commentIssueId: 77
7 | ---
8 |
9 |
10 |
11 | 前端在考虑新技术,考虑新架构时,需要考虑的 list ,包括:统计类,技术侧和运营侧需要考虑的问题。
12 |
13 |
14 |
15 | ## Checklist
16 |
17 | * 统计类
18 | * 页面大小
19 | * 页面性能
20 | * 资源加载 timeline
21 | * pv,uv,端类型及游览器或 app 版本统计
22 | * 接口错误率
23 | * 页面总的错误率
24 | * 运营活动页面下线设计,下线 302 循环跳转检测机制
25 | * 运营策略:页面 AB 测试,页面分流策略(根据用户标签分流)
26 | * 技术策略:页面灰度上线,指定测试人员白名单
27 | * 考虑页面回归验证方案,以及考虑回归方案的 case 覆盖率
28 | * 评估页面采用新技术后的影响面,通常分三方面:server,native,front-end
29 | * 页面错误后的降级容灾方案,以及接口的容灾兜底
30 | * 展示(view),逻辑(logic),数据(data)尽量抽象分离复用,mvc & mvvm
31 | * 页面远程调试特性,行为日志覆盖率
32 | * 技术运营分离,但有统一的对接口进行沟通协商交流
33 | * 页面的实验特性做开关设计
34 | * 页面架构或运行框架是否考虑了可插拔的 feature,并支持插件化扩展
35 | * 对于 native 端上的依赖版本判断并做降级方案
36 | * 页面资源是否做到了足够的复用,包括复用模块、数据等
37 | * 资源、数据是否做了预加载,以及预加载时机的选择
38 | * 安全风险控制,包括开源代码,运营文案(如默认勾选用户协议等)
39 | * 权限验证等
40 | * 数据统计之后的数据反哺,推动业务和技术侧升级改造
41 |
42 |
43 |
44 | ### Q & A
45 |
46 | * 页面遇到 xxx is undefined ?但 chrome 上正常?
47 |
48 | > 不管是什么问题,先加一波 polyfill,https://polyfill.io/v2/docs/,引入:https://cdn.polyfill.io/v2/polyfill.min.js
--------------------------------------------------------------------------------
/_posts/2018-04~06/2018-04-15-sipo.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "知识产权笔记"
4 | date: 2018-04-15
5 | tags: [note]
6 | commentIssueId: 77
7 | ---
8 |
9 | 听到一句话:未来企业的竞争是知识产权的竞争。最近习近平也刚好在博鳌论坛上特别提了 `知识产权` 保护,国家知识产权局也发布了17 年的数据,在此记录一下相关内容。
10 |
11 | ## 2017
12 |
13 | > 2017年,我国发明专利授权量排名前十位的企业(不含港澳台)依次为:国家电网公司(3,622件)、华为技术有限公司(3,293件)、中国石油化工股份有限公司(2,567件)、京东方科技集团股份有限公司(1,845件)、中兴通讯股份有限公司(1,699件)、联想(北京)有限公司(1,454件)、珠海格力电器股份有限公司(1,273件)、广东欧珀移动通信有限公司(1,222件)、中国石油天然气股份有限公司(1,008件)、中芯国际集成电路制造(上海)有限公司(862件)。
14 | >
15 | > 引用自:http://www.sipo.gov.cn/twzb/gjzscqj2017nzygztjsjjygqkxwfbk/)
16 |
17 |
18 |
19 | ## 股票代码
20 |
21 | * 国家电网子公司:[国电电力(600795.SH)](http://finance.sina.com.cn/realstock/company/sh600795/nc.shtml)
22 | * 华为技术有限公司,未上市
23 | * 中国石油化工股份有限公司:[600028](http://finance.sina.com.cn/realstock/company/sh600028/nc.shtml)
24 | * 京东方:[000725](http://finance.sina.com.cn/realstock/company/sz000725/nc.shtml?from=BaiduAladin)
25 | * 中兴通讯股份有限公司:[000063](http://finance.sina.com.cn/realstock/company/sz000063/nc.shtml)
26 | * 联想(北京)有限公司:[00992](http://stockpage.10jqka.com.cn/HK0992/)
27 | * 珠海格力电器股份有限公司:[000651](http://stockpage.10jqka.com.cn/000651/)
28 | * 广东欧珀移动通信有限公司
29 | * 中国石油天然气股份有限公司:[601857](http://stockpage.10jqka.com.cn/601857/)
30 | * 中芯国际集成电路制造: [纽约证交所](https://baike.baidu.com/item/%E7%BA%BD%E7%BA%A6%E8%AF%81%E4%BA%A4%E6%89%80)股票代码:SMI,[香港联合交易所](https://baike.baidu.com/item/%E9%A6%99%E6%B8%AF%E8%81%94%E5%90%88%E4%BA%A4%E6%98%93%E6%89%80)股票代码: 981)
31 |
32 |
33 |
34 | ## References
35 |
36 | * [国家知识产权局](http://www.sipo.gov.cn/twzb/gjzscqj2017nzygztjsjjygqkxwfbk/)
37 | * [习近平博鳌再提“知识产权保护](http://news.sina.com.cn/o/2018-04-11/doc-ifyuwqez8905919.shtml)
--------------------------------------------------------------------------------
/_posts/2018-04~06/2018-04-22-compiler.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "AST & Compiler 简记"
4 | date: 2018-04-21
5 | tags: [fe]
6 | commentIssueId: 77
7 | ---
8 |
9 | JS 编译器通过 AST 解析,转换,再生成新代码等过程进行编译操作,笔记简单记一下使用 babel 的 ast 解析器 (babylon) 来动态生成新代码。
10 |
11 | ## AST
12 |
13 | Abstract Syntax Tree
14 |
15 | 
16 |
17 | 简要说明:https://github.com/barretlee/babel-plugin-ast/blob/master/docs/babel-loader-ast.pdf
18 |
19 | ## Demo
20 |
21 | ```js
22 | const babylon = require("babylon");
23 | const traverse = require("babel-traverse").default;
24 | const generate = require('babel-generator').default;
25 |
26 | const code = `
27 | const abc = 1;
28 | let hello = 'world';
29 | `;
30 |
31 | const ast = babylon.parse(code);
32 |
33 | traverse(ast, {
34 | enter(path) {
35 | if (path.node.type === 'Identifier') {
36 | path.node.name = path.node.name.split('').reverse().join('');
37 | }
38 | }
39 | });
40 |
41 | console.log(generate(ast).code);
42 | // output:
43 | // const cba = 1;
44 | // let olleh = 'world';
45 |
46 | ```
47 |
48 |
49 |
50 | ## References
51 |
52 | * [The Super Tiny Compiler](https://github.com/jamiebuilds/the-super-tiny-compiler)
53 | * [Babel Plugin AST](https://github.com/barretlee/babel-plugin-ast)
54 | * [AST for JavaScript Developers](https://itnext.io/ast-for-javascript-developers-3e79aeb08343)
55 | * [astexplorer](https://github.com/fkling/astexplorer)
--------------------------------------------------------------------------------
/_posts/2018-04~06/2018-05-25-better-me.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "工作思维方式简记"
4 | date: 2018-05-25
5 | tags: [human]
6 | commentIssueId: 80
7 | ---
8 |
9 |
10 |
11 | `Base: 以当前认知水平理解` 任何岗位、任何公司,对人的要求本质是:商业化思维和创业精神。这其中蕴含了积极主动承担、痛点挖掘、解决能力的能力、还有资源整合能力、想象力和创造力、情商。总归是要有成为 CEO 的觉悟。就目前而言,可操作的低预期的 actions 包括:
12 | * 痛点挖掘
13 | * 数据支撑
14 | * 可行性地实施
15 | * 解决痛点
16 | * 点面扩展
17 |
18 |
19 |
20 |
21 | ## Actions
22 |
23 | * 发现业务、用户、产品、运营痛点
24 | * **业务理解能力**
25 | * 多和业务方、需求方理解(深度了解你的客户)
26 |
27 |
28 | * 数据分析、挖掘
29 | * 和产品、运营差异化发展
30 | * 强调前端优势的发挥
31 | * 用户调研、产品规划、方案调研、技术调研
32 | * **技术能力**
33 | * 基础的产品规划能力
34 | * 反推方案和痛点的 match 程度
35 | * **拿结果的能力**
36 | * 并能推广和移植
37 | * 反推痛点对应业务的优化
38 | * 举一反三
39 | * 点到线再到面
40 | * 即使最后业务是失败了,也能从业务中积累、沉淀一定的能力
41 |
42 |
43 |
44 | ## 人才要求
45 |
46 | * 全球化
47 | * 面向未来
48 | * 责任
49 |
50 | 这里也引用一下马老师的几句话:
51 |
52 | > 未来不是知识的竞争,而是创造力和想象力的竞争,是学习能力的竞争,是独立思考的竞争。如果你像机器一样思考,那么问题就会接踵而至。
53 |
54 |
55 |
56 | 爱商的重要性不太理解?后续努力一下
57 |
58 | > 未来,将不再是知识驱动,而是智慧驱动,是体验驱动;过去是知识和制造业驱动,未来则将是创造驱动;未来世界将不应只关注智商和情商,更要关注爱商。
59 | >
60 | > **只有当你关心其他人,其他人比你更成功的时候,你才有机会。**
61 |
62 |
63 |
64 | ## References
65 |
66 | * [马老师在香港大学的演讲](https://mp.weixin.qq.com/s/i3t18dVn_-ekwgte4sEiSA)
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/_posts/2018-04~06/2018-05-29-colorful-echo.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 五彩缤纷的终端输出,给终端填上有趣的色彩。
6 |
7 |
8 |
9 |
10 |
11 | ## ECHO
12 |
13 |
14 |
15 |
16 |
17 | ## References
18 |
19 | * [colors in terminal](http://jafrog.com/2013/11/23/colors-in-terminal.html)
20 | * [ANSI escape code](https://en.wikipedia.org/wiki/ANSI_escape_code)
21 | * [how-to-change-node-jss-console-font-color](https://stackoverflow.com/questions/9781218/how-to-change-node-jss-console-font-color)
22 | * [colors-in-javascript-console](https://stackoverflow.com/questions/7505623/colors-in-javascript-console)
23 | * Chalk - [https://github.com/chalk/**chalk**](https://github.com/chalk/chalk)
24 | * Colors - [https://www.npmjs.org/package/**colors**](https://www.npmjs.org/package/colors)
25 | * Cli-color - [https://www.npmjs.org/package/**cli-color
26 | * [signale](https://github.com/klauscfhq/signale) 👋 Hackable console logger
--------------------------------------------------------------------------------
/_posts/2018-04~06/2018-06-06-license.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "各种 License 区别"
4 | date: 2018-06-06
5 | tags: [notes]
6 | commentIssueId: 83
7 | ---
8 |
9 |
10 |
11 | 开源项目的各种协议一直傻傻分不清,有同学在群里分享了一张图片,还挺有意思,简单记一下。
12 |
13 |
14 |
15 | ### 阮老师翻译版本
16 |
17 | 
18 |
19 |
20 |
21 | ### 来源最新版
22 |
23 |
24 |
25 | 
26 |
27 |
28 |
29 | ## References
30 |
31 | * [Simple description of popular software licenses](https://paulmillr.com/posts/simple-description-of-popular-software-licenses/)
32 | * [如何选择开源许可证?](http://www.ruanyifeng.com/blog/2011/05/how_to_choose_free_software_licenses.html)
--------------------------------------------------------------------------------
/_posts/2018-04~06/2018-06-20-thinking.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "几个词汇的简单思考"
4 | date: 2018-06-20
5 | tags: [notes]
6 | commentIssueId: 86
7 | ---
8 |
9 |
10 |
11 | 阿里云、阿里巴巴中台战略、航母战斗群。
12 |
13 | 未来对高端人才的定义必然是特种兵型的、单兵作战能力极强、资源整合能力极强(能使用各式武器、各种平台并能进行整合)的。
14 |
15 |
16 |
17 |
18 |
19 | * 这背后是对提高整体社会资源效能的必要,阿里云如水电煤,创业、创新及竞争的核心将向创造力、想象力转移。
20 |
21 | * 大中台战略,完备好基础设施,能根据业务快速调整小前台,以适应新业务的发展。
22 |
23 | > 几个人依靠强大中台,几天就能出一款游戏,工作量可能需要传统模式几百人几个月的时间。— 引用自马老师
24 |
25 | * 美军战斗体系演变,美军二次世界大战以师为单位,步坦协同,越南战争,以营为单位,坦克直升机协同,沙漠战争,以十几个特种兵为作战单位,遇到大规模敌人的情况,直接用导弹。— 引用自马老师
26 |
27 | * 航母战斗群,背靠航母本身强大的中台体系、情报体系和护舰体系,快速精准打击目标。
28 |
29 |
30 |
31 | 单兵作战能力极强,在自我约束和自我管理足够强的情况下,小团体的管理会演变成怎样?
--------------------------------------------------------------------------------
/_posts/2018-07-09/2018-07-10-redux-design.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "不一样的 Redux"
4 | date: 2018-07-10
5 | tags: [js]
6 | commentIssueId: 89
7 | ---
8 |
9 |
10 |
11 | Redux 除了最平常的特性之外,解决了 React 中一些痛点,比如:
12 | * 集中化的数据管理,避免数据流的混乱
13 | * 解决数据流需要一层层通过 props 传递的问题
14 |
15 | 除了以上在我认知范围内的,我也一直在纠结,作者为什么通过这种设计来达到以上两点,因为仅仅以上两点需求,没必要这么“过度设计”。
16 |
17 |
18 |
19 | ## 不一样的 Redux
20 |
21 | 文章很好地阐述了 Redux 的强大之处
22 |
23 | * undo / redo, 因为 redux 需要每个 action 都有一个清晰的表述,使得 undo / redo 这种通常需要系统级支持的特性,较为完美地支持了
24 |
25 | * 在共享、在线协作平台这种场景下,只需要多用户之间相互传递 action 即能实现协作特性
26 |
27 | 
28 |
29 | * 乐观页面,同”乐观锁“一样乐观,在与用户的交互中,乐观看待与服务端的数据交互,比如在点赞这种情况下,由于大部分情况都是成功的,所以我们及时”同步“反馈用户操作,无需等待服务端的延时返回。为什么?因为我们有 undo 啊~
30 |
31 | 
32 |
33 | * 状态恢复,通过中心化的管理模式,我们很容易就能做到像 CPU 中断时的保存现场,以及中断后的恢复现场,Easy to understand, no more explanation.
34 |
35 | * ”修改封闭,扩展开放“,由于 redux 分层足够清晰,所以扩展也足够简单,hook dispatch 就行
36 |
37 | * ”时光机器式“的调试,还是由于 action 的特性,使得这种神奇的方式得以落地实现
38 |
39 | 
40 |
41 | * Bug Reporter,由于有用户所有的 action 记录,使得 bug 复现也容易多了。
42 |
43 | 
44 |
45 |
46 |
47 |
48 |
49 | ## References
50 |
51 | 1. [redux designer guide](https://www.smashingmagazine.com/2018/07/redux-designers-guide/)
--------------------------------------------------------------------------------
/_posts/2018-07-09/2018-08-07-kill-by-name.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | ## Kill Process
6 |
7 | ```sh
8 | $ ps -ej | grep " ping " | awk '{print $2}' | xargs kill -s SIGINT
9 | ```
10 |
11 |
12 |
13 | Add it to your `.bash_profile`
14 |
15 | ```bash
16 | function killname() {
17 | if [ "$1" = "" ]; then
18 | echo "Nothing to do"
19 | else
20 | ps -ej | grep "$1"
21 | ps -ej | grep "$1" | awk '{print $2}' | xargs kill -s SIGINT
22 | fi
23 | }
24 | ```
25 |
26 |
--------------------------------------------------------------------------------
/_posts/2018-07-09/2018-09-14-sync-mac.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Mac 同步简记"
4 | date: 2018-09-08
5 | tags: [js]
6 | commentIssueId: 94
7 | ---
8 |
9 | 同步mac 电脑 checklist
10 |
11 | * 重要文档资料直接放置在 iCloud
12 |
13 | * 软件配置同步
14 | * VSCode
15 |
16 |
17 |
18 | ### 软件 Checklist
19 |
20 | #### 常用级别
21 |
22 | 编程相关
23 |
24 | * VScode
25 | * Chrales
26 | * iTerm
27 | * xcode
28 | * node
29 |
30 | 设计相关
31 |
32 | * Photoshop
33 | * Sketch
34 | * Axure
35 |
36 | 效能
37 |
38 | * OmniGraffle
39 | * OmniPlan
40 | * Typora
41 | * wunderlist
42 | * xmind
43 | * kelir 取色工具
44 |
45 |
46 |
47 | searchall
48 |
49 | github tree
50 |
51 |
52 |
53 |
54 |
55 | ### 配置同步
56 |
57 | VSCode
58 |
59 | > https://github.com/zhoukekestar/vscode-settings
60 |
61 | Chrome 插件配置同步
62 |
63 | * Resource override
64 |
65 | > Options save rules & load rules
66 |
67 | * InjectCode
68 |
69 | > 在 background page 中,复制 localstorage 中的值
70 |
71 | * switchomega
72 |
73 | > 配置 shadowsocks 的 pac 文件为:https://raw.githubusercontent.com/breakwa11/gfw_whitelist/master/whitelist.pac
74 |
75 | * .bashrc .zshrc
76 |
77 | * ~/.ssh
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------
/_posts/2018-10~12/2018-10-17-alliren.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "关于抱怨谨记"
4 | date: 2018-10-17
5 | tags: [note]
6 | commentIssueId: 96
7 | ---
8 |
9 |
10 |
11 | 抱怨、批评,这件很正常的事,对它的态度,马老师有个观点,比较认同,特此记一下。
12 | > 能力强的人往往很少抱怨,抱怨都是能力渣的人
13 |
14 |
15 |
16 | ### 喜欢的人
17 |
18 | > 我们喜欢的人,是提意见、有建设性意见、并且有行动的人
19 | >
20 |
21 |
22 |
23 | > 我们讨厌那些天天抱怨的人,我们不喜欢这些人,无论在内网、在外网,我们最讨厌那些天天说公司不好,还留在公司里的人。
24 |
25 |
26 |
27 |
28 |
29 | ### 讨厌的人
30 |
31 | > 不断传播负能量、不停抱怨、浑身戾气的人。在他们眼中,社会是腐败的,努力是无用的,世界是黑暗的,自己是无辜的,总之,没什么是好的。眼高手低,这也看不惯,对那也不爽,这样的同事,在办公室里谁都不会喜欢,不知道大家发现没有,能力强的人往往很少抱怨,抱怨都是能力渣的人。
32 | >
33 | > 若没有建设,则批评无意义。抱怨谁都会,路边的大妈比你高到不知道哪里去了。只有建设才是KPI的第一生产力。
34 |
35 |
36 |
37 | ## References
38 |
39 | * http://baijiahao.baidu.com/s?id=1603220868552299257&wfr=spider&for=pc
--------------------------------------------------------------------------------
/_posts/2018-10~12/2018-11-06-ffmpeg.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "ffmpeg 使用笔记"
4 | date: 2018-11-06
5 | tags: [tool]
6 | commentIssueId: 97
7 | ---
8 |
9 | ffmpeg 简单的使用,将视频转换成 gif 文件。
10 |
11 |
12 |
13 |
14 | ## 下载安装 ffmpeg
15 |
16 | * 进入 [ffmpeg](https://evermeet.cx/ffmpeg/) 官网,下载 dmg 文件(如ffmpeg-4.1.7z 下方的 download as dmg)
17 |
18 |
19 |
20 | ## 视频转 Gif
21 |
22 | 例子:将dy.mp4文件的第5秒开始截取3秒制作成270x480大小帧率为10的gif
23 |
24 | `ffmpeg -ss 5 -t 3 -i dy.mp4 -s 270x480 -r 10 -f gif dy.gif`
25 |
26 | * `-ss` 从第几秒开始
27 | * `-t` 持续时间
28 | * `-r` 帧率
29 | * `-s` 大小
30 | * `-f` 格式
31 | * `-filter:v "setpts=0.25*PTS"` 4x 播放
32 |
33 | 参考:https://blog.csdn.net/ternence_hsu/article/details/85865718
34 |
35 |
--------------------------------------------------------------------------------
/_posts/2018-10~12/2018-11-19-data-science.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "数据科学"
4 | date: 2018-11-19
5 | tags: [note]
6 | commentIssueId: 97
7 | ---
8 |
9 |
10 |
11 | 数据科学技能 & 平台
12 |
13 |
14 |
15 |
16 | ## 技能
17 |
18 | 从行业角度来看,迈入数据科学领域还需要其它多种技能。下面来看其中的一些主要项目:
19 |
20 | 1. 对于统计及统计学技术几乎无可挑剔的认知与理解。
21 | 2. 你需要对推理统计数据拥有良好的控制能力。
22 | 3. 良好的 R 与 Python 编程能力。这两种是目前大家最需要了解的高人气数据科学语言。
23 | 4. 数据可视化技能,包括对 Tableau 以及 Qlikview 等工具的熟练掌握。
24 | 5. 预测建模能力,意味着你需要了解各类机器学习算法。
25 |
26 |
27 |
28 |
29 |
30 |
31 | ### 学习平台
32 |
33 | 目前存在众多面向数据科学方向的平台,你可以在其中学习数据科学领域的各类技能。Data camp、Data [Science.com](http://science.com/)、Coursera、edX 以及 Udemy 等都能够为你提供理想的技能积累环境。
34 |
35 | 除了上述平台之外,大家还应该尝试 Kaggle 以及 KDnuggets 等,这些是通过数据科学项目磨练水平的好去处。
36 |
37 |
38 |
39 | ## References
40 |
41 | * [数据科学如此火爆,为什么找个工作还那么难?](https://www.infoq.cn/article/10M75xAv4K_XWm25SRyp)
42 | * [If data science is in demand, why is it so hard to get a data scientist job?](https://www.quora.com/If-data-science-is-in-demand-why-is-it-so-hard-to-get-a-data-scientist-job)
43 | * [What will be the first step to be a data scientist?](https://www.quora.com/What-will-be-the-first-step-to-be-a-data-scientist)
--------------------------------------------------------------------------------
/_posts/2018-10~12/2018-11-24-linux-disk.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Linux Disk 日志清理"
4 | date: 2018-12-08
5 | tags: [note]
6 | commentIssueId: 97
7 | ---
8 |
9 |
10 |
11 | 查询磁盘使用率
12 |
13 | * `df -h` disk file system -- human readable
14 | * `du -sh /path/to/file` disk usage -- summary -- human readable
15 |
16 | * `sudo -u admin cat /dev/null > /home/admin/logs` 清理 log,避免无法释放文件句柄导致错误
17 |
18 | * 无权限的,使用 `sudo -u admin chmod 777 xxx.log` 予以解决
19 |
--------------------------------------------------------------------------------
/_posts/2018-10~12/2018-12-08-vision.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "使命 & 愿景"
4 | date: 2018-12-08
5 | tags: [note]
6 | commentIssueId: 97
7 | ---
8 |
9 |
10 |
11 | 愿景(Vision):内心的愿望,原生驱动力,有分阶段的愿景
12 |
13 | 使命(Mission):为什么存在,公司最大的目标
14 |
15 |
16 |
17 | 委员会的意义:
18 |
19 | 统一而非唯一;协同中竞争;简单务实
20 |
21 |
22 |
23 | https://www.sohu.com/a/155241700_759564
--------------------------------------------------------------------------------
/_posts/2018-10~12/2018-12-24-mid-platform.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "中台战略&特种兵作战"
4 | date: 2018-12-24
5 | tags: [note, feature]
6 | commentIssueId: 97
7 | ---
8 |
9 |
10 | 文中举到的海尔、华为包括阿里,都有类似的“中台战略”,后续,更多的是特种兵作战,需要自身聚合更多技能的同时,也能有 “让听得到炮声的人能呼唤到炮火” 的能力。
11 |
12 |
13 |
14 | 1. **以用户为中心的持续规模化创新,是中台建设的核心目标**。企业的业务响应能⼒和规模化创新能力,是互联⽹时代企业综合竞争⼒的核⼼体现。**平台化包括中台化只是帮助企业达到这个目标的⼿段,并不是⽬标本身**。
15 | 2. 中台 (⽆论是技术中台、业务中台还是组织中台) 的建设根本上是为了解决企业响应⼒困境, 弥补创新驱动快速变化的前台和稳定可靠驱动变化周期相对较慢的后台之间的⽭盾,提供⼀个中间层来适配前台与后台的配速问题,沉淀能⼒,打通并顺滑链接前台需求与后台资源,帮助企业不断提升用户响应⼒。
16 | 3. 所以,中台到底是什么根本不重要,如何想方设法持续提高企业对于⽤户的响应⼒才是最重要的。⽽平台化或是中台化,只是恰巧走在了了这条正确的⼤道上。
17 |
18 |
19 |
20 | ## 海尔
21 |
22 | 海尔也早在⼗年前就已经开始推进平台化组织的转型,提出了“平台⾃营体⽀撑⼀线⾃营体”的战略规划和转型⽬标。构建了“⼈单合一”、“⽤户付薪” 的创客文化,真正将平台化提⾼到了组织的⾼度。
23 |
24 |
25 |
26 | ## 华为
27 |
28 | 华为在几年前就提出了“⼤平台炮火支撑精兵作战”的企业战略,“让听得到炮声的人能呼唤到炮火” 这句话形象的诠释了大平台⽀撑下小前台的作战策略。这种极度灵活又威力巨⼤的战法,使之可以迅速响应瞬息万变的战场,一旦锁定目标,通过大平台的炮火群,迅速精准对于战场进行强大的火⼒支援。
29 |
30 |
31 |
32 | ## 阿里
33 |
34 | 中台战略
35 |
36 |
37 |
38 |
39 |
40 | ## References
41 |
42 | * [白话中台战略:中台是个什么鬼?](https://www.infoq.cn/article/cG-DHodbHjRcv92W6tYh)
--------------------------------------------------------------------------------
/_posts/2019-01~03/2019-01-02-flink.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Flink 概念简记"
4 | date: 2019-01-02
5 | tags: [note]
6 | commentIssueId: 98
7 | ---
8 |
9 |
10 |
11 | Flink 是流计算中用的较多的系统。
12 |
13 |
14 |
15 | ## Time Domain
16 |
17 | 参考:[Apache Flink:使用EventTime与WaterMark进行流数据处理](http://shiyanjun.cn/archives/1785.html)
18 |
19 | 
20 |
21 |
22 |
23 | ## Watermark
24 |
25 | 参考:[Flink事件时间处理和水印](https://blog.csdn.net/a6822342/article/details/78064815)
26 |
27 | 
28 |
29 |
30 |
31 | ## 阿里云文档
32 |
33 | [实时计算](https://help.aliyun.com/product/45029.html?spm=a2c0j.117599.1053885.btn4.36cc76feAFMJeA)
--------------------------------------------------------------------------------
/_posts/2019-01~03/2019-01-22-github-math.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "How to support Math in Jekyll"
4 | date: 2019-01-22
5 | tags: [Note]
6 | commentIssueId: 100
7 | use_math: true
8 | ---
9 |
10 | 通过一些简单的设置,让 Jekyll 支持 Math,以及几个表达式样例
11 |
12 | ## HOW
13 | Just see the References.
14 |
15 | ## Some Math Tips
16 | * inline math: $x$, $y$, $x_1$, $y_1$
17 | * example: $\frac{1}{2\pi}\int_{-\infty}^{\infty}e^{-\frac{x^2}{2}}dx$
18 | * matrix:
19 | $$
20 | \zeta(s) = \sum_{n=1}^\infty \frac{1}{n^s}
21 | \begin{pmatrix}
22 | a & b \\
23 | c & d
24 | \end{pmatrix}
25 | $$
26 |
27 | 除了使用 MathJax,还可以使用 [mathurl](http://mathurl.com/) 来内嵌,关于 mathjax 的总结: [mathjax](https://www.zybuluo.com/yangfch3/note/267947#21-%E7%9F%A9%E9%98%B5)
28 |
29 | ### References
30 | * [how-to-support-latex-in-github-pages](https://stackoverflow.com/questions/26275645/how-to-support-latex-in-github-pages)
31 | * [how-to-use-mathjax-in-jekyll-generated-github-pages](http://haixing-hu.github.io/programming/2013/09/20/how-to-use-mathjax-in-jekyll-generated-github-pages/)
32 |
--------------------------------------------------------------------------------
/_posts/2019-01~03/2019-01-26-google-ai.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Google AI 2018"
4 | date: 2019-01-26
5 | tags: [AI]
6 | commentIssueId: 101
7 | ---
8 |
9 |
10 |
11 | Google AI 好文收藏:[Jeff Dean 执笔:一文看尽 2018 谷歌 AI 重大突破](https://www.infoq.cn/article/EC_KML9NhfRYaAwEI2LE)
12 |
13 | Google AI Blog 源站:https://ai.googleblog.com/2019/01/looking-back-at-googles-research.html
14 |
15 |
16 |
17 | ## 非概念版 AR
18 |
19 | 一张比较让人兴奋和有趣的 Gif
20 |
21 | 
22 |
23 |
24 |
25 |
26 |
27 | ## 相关文章
28 |
29 | * [自己之前的 AR 导图笔记](https://zhoukekestar.github.io/notes/2018/02/23/ar.html)
30 | * [自己 AR AI 以及数据的观点小记](https://zhoukekestar.github.io/notes/2018/04/14/ar-ai.html)
--------------------------------------------------------------------------------
/_posts/2019-01~03/2019-02-17-edu.md:
--------------------------------------------------------------------------------
1 | ---
2 | 3layout: post
3 | title: "育儿教育"
4 | date: 2019-02-17
5 | tags: [child]
6 | commentIssueId: 103
7 | ---
8 |
9 |
10 |
11 | 育儿教育方式,管理小孩子的闹,教育学会控制,教育学会管理自私。
12 |
13 |
14 |
15 | ### 管理闹
16 |
17 | * 学会说不,教育他知道拒绝的道理
18 | * 一个人一个安全封闭环境(卧室),尽情闹
19 | * 不打不骂,看着闹,因为闹也需要被人关注
20 | * 闹后合理沟通,并适当满足,三次要求满足一次,或学习推理和说服
21 |
22 |
23 |
24 | ## 学会控制
25 |
26 | * 三天一糖果
27 | * 不吃多奖励
28 |
29 |
30 |
31 | ## 管理自私
32 |
33 | * 管理自己并管理他人
34 | * 吃饭的等待和管理,经历小痛苦(饥饿)
35 | * 学会分享小零食
36 | * 树立家庭意识
37 |
38 |
39 |
40 |
41 |
42 | ## References
43 |
44 | * [中国公安大学犯罪心理学教授李玫瑾的育儿之道:不打不骂,就让孩子服气,内附完整版视频](https://mp.weixin.qq.com/s/BSJ4qPEu3gDMYTktkK860Q)
--------------------------------------------------------------------------------
/_posts/2019-01~03/2019-02-17-matrix4.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "线性代数-A的LU分解"
4 | date: 2019-02-17
5 | tags: [math]
6 | commentIssueId: 100
7 | use_math: true
8 | ---
9 |
10 |
11 |
12 | * 乘法
13 | * 逆
14 |
15 |
16 |
17 | 4 7:41
18 |
19 |
20 |
21 | ## AB 逆矩阵
22 |
23 | 逆矩阵
24 |
25 |
26 |
27 | $$
28 | AA^{-1} = I = A^{-1}A \\
29 | (AB)(B^{-1}A^{-1}) = A(BB^{-1})A^{-1} = AIA^{-1} = I
30 | $$
31 |
32 |
33 |
34 | 转置的逆
35 | $$
36 | (AA^{-1})^T = (A^{-1})^T A^T = I^T = I \\
37 | A^T(A^T)^{-1} = \\
38 | Row1Col1^T = (ARow 1 \cdot BCol1)^T = (BCol1)^T \cdot (ARow1)^T \\
39 | \text 行列式相乘后的转置等于矩阵转置并调换顺序
40 | $$
41 |
--------------------------------------------------------------------------------
/_posts/2019-04~06/2019-04-01-elon-musk.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "《Elon Musk》读后简记"
4 | date: 2019-04-01
5 | tags: [book]
6 | commentIssueId: 104
7 | ---
8 |
9 |
10 | 本周看完了 《Elon Musk》,对 Musk 又有了更一步的了解,看完给人的感觉,和 Trump 有点类似(可能是刚看了 Trump 自传的影响吧),成功人都有相似的特征。不过书中更多地是和 Steve Jobs 做比较,也会拿 Bill Gates 开开玩笑。
11 |
12 |
13 |
14 | 几个点
15 |
16 | * Musk 和 Trump 都是积极主动之人,通俗地说,脸皮厚,比如给比自己强几倍的人发邀请,打电话,在他们眼中,似乎很习以为常。
17 | * Musk 和 Trump 也都是笼络人才的高手,特别是 Musk 在招募 SpaceX 的顶级人才的时候,积极主动去 Stanford 各种学会拉拢,这非常考验他们所谓"画大饼"的能力,以及出色的演讲能力。
18 | * 招最优秀的人,做最棒的事
19 | * 招到最优秀的人后,Musk 总能快速地自学,并能和最优秀的人进行平等的对话。这不仅仅体现在火箭工程中,还在 Tesla 的艺术美学设计中体现出来。
20 | * Musk 和 Trump 总能搞定一些在我看来不可思议的事情,在 Musk 的故事中,需要搞定的事有软件、硬件、管理、销售、公关、政务、人脉、融资。这跟个人能力有关,不过更和他招募的顶级人才有关。
21 | * 不管在 SpaceX,还是 Tesla,在对工程人员的要求会特别明显,他们需要要有横跨多个技术领域和专业的技能,比如:机械、电气、软件、化学等等,特别是对高精尖人才的要求。如果没有跨领域和学科的一体化工程能力,将无法最优化地将他们组合在一起。有时甚至对销售能力也有要求,在 Tesla 销售最困难的时候,全体员工必须都出去销售,几个主管因此而被 fired。
22 | * 书中会经常把 Musk 和 Steve Jobs 的脾气相比较,没有人情和及其苛刻的要求,完不成的任务只能从最基本的物理学角度出发。可能在他们眼中,人生短暂,任何阻碍他们发展和进步的人,都必须被解雇,然后由更优秀的人顶上,帮助他们尽快完成任务。
23 |
--------------------------------------------------------------------------------
/_posts/2019-04~06/2019-06-02-adv.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "用户增长 & 广告"
4 | date: 2019-06-02
5 | tags: [note]
6 | commentIssueId: 104
7 | ---
8 |
9 |
10 |
11 | 记一下移动端用户增长模型,已经如何系统化做移动端的用户增长。并记录一下目前中国广告生态大图。
12 |
13 |
14 |
15 | ## 用户增长大图
16 |
17 | 
18 |
19 |
20 |
21 |
22 |
23 | ## 广告大图
24 |
25 | 
26 |
27 |
28 |
29 |
30 |
31 | ## References
32 |
33 | * [RTBChina](https://www.rtbchina.com/china-programmatic-ad-tech-landscape)
34 |
35 | * [数字广告营销中的DSP、SSP、RTB是个什么概念](https://blog.csdn.net/glodon_mr_chen/article/details/78554002)
36 |
37 | * [Mobile Growth Stack](https://mobilegrowthstack.com/)
38 |
39 | * http://xuyushi.github.io/mobile_growth_stack_part_2.html
40 |
41 |
--------------------------------------------------------------------------------
/_posts/2019-04~06/2019-06-12-week-share.md:
--------------------------------------------------------------------------------
1 | ---
2 | 3layout: post
3 | title: "周分享"
4 | date: 2019-06-12
5 | tags: [weekshare]
6 | commentIssueId: 100
7 | ---
8 |
9 |
10 |
11 | * SQLFlow 开源
12 | * 腾讯产业互联网
13 | * PyTorch Hub 发布
14 |
15 |
16 |
17 | ## 分享&思考
18 |
19 | - [蚂蚁金服首席架构师何昌华:开源 SQLFlow 是牛刀初试,实时大数据系统才是未来基石](https://mp.weixin.qq.com/s/0McWvtrRARcWrQHJvxxrcw)
20 |
21 | > 5月6日,蚂蚁金服副 CTO 胡喜正式宣布开源机器学习工具 SQLFlow:“未来三年,AI 能力会成为每一位技术人员的基本能力。我们希望通过开源 SQLFlow,降低人工智能应用的技术门槛,让技术人员调用 AI 像 SQL 一样简单。”
22 |
23 | - [产业互联网起风了:这一次,腾讯又站上了风口](https://www.infoq.cn/article/JE*tihxmSZRElb29SgbL)
24 |
25 | > 第一次听到产业互联网的词还是马化腾的一次大会上,说信息科技已从消费互联网向产业互联网时代迈进,包括影响深刻地提到,腾讯将要做整个社会和世界的"连接器",以人为中心,连接人与万物。
26 |
27 | - [框架的游戏:2019 年 JavaScript 流行趋势](https://www.infoq.cn/article/ltm51Ju4z1-yw3cvZshx)
28 |
29 | > 还是最爱 WebComponents
30 |
31 | - [PyTorch Hub发布!一行代码调用最潮模型,图灵奖得主强推](https://mp.weixin.qq.com/s/lS3YiXzYyY6-XNTFyH_GHg)
32 |
33 | > 感受和 SQLFlow 一样,当 AI 使用的门槛越来越低,预训练模型变得越来越稳定和可被沉淀之后,AI 的普适性就越来越强,当越来越普适的时候,我们前端做好了使用它们的准备了吗?还是在这一尖端领域一无是处呢?
34 |
35 |
--------------------------------------------------------------------------------
/_posts/2019-07~09/2019-08-09-book-2.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "《结构思考力》笔记"
4 | date: 2019-08-09
5 | tags: [book]
6 | commentIssueId: 106
7 | ---
8 |
9 |
10 |
11 | 《结构思考力》笔记
12 |
13 |
14 |
15 | 作者最开始就提出本书最核心的观点,“先总后分”,全书按照下图展开:
16 |
17 | 
18 |
19 |
20 |
21 | ### 4个基本特点
22 |
23 | 1. 论:结论、主题、观点,WHAT,这里要力求简单、准确、利益(从对方考虑)
24 | * 序:S(情景)C(冲突)Q(疑问)A(回答),大背景下遇到什么问题,并提出如何解决并提出解决之道
25 | 2. 证:证明、支撑、以上统下,WHY
26 | 3. 类:分组归类、对分散信息组织
27 | * 自上而下 + 自下而上,横 + 纵
28 | * When, Where, Who, Why, What, How, How Much, 5W2H,
29 | * 助记:下午湖边,小明因为无聊去钓鱼了
30 | * 归纳分类
31 | * 时间顺序、结构顺序、重要程度
32 | * MECEP162
33 | * Mutually Exclusive Collectively Exhaustive, 相互独立,完全穷尽
34 | * 市场战略 3C、市场决策 4PP168
35 | * 3C Company, Customer, Competitor 公司、客户、竞对
36 | * 4P Price, Product, Place, Promotion 价格、产品、渠道、营销推广
37 | 4. 比:逻辑推理、层层递进
38 | * 演绎推理
39 | * 大前提 - 小前提 - 结论 (所有 M 都是 P - 所有 S都是 M - 所有 S 都是P)
40 | * What 现象 - Why 原因 - How 解决方案 2W1H
41 | * 归纳分类推理
42 | * 分类总结推理
43 |
44 | ### 3个接受信息的步骤
45 |
46 | 1. 分离客观事实和主观观点
47 | 2. 建立事实和观点的金字塔关系图
48 | 3. 一句话概括所有内容
49 |
50 |
--------------------------------------------------------------------------------
/_posts/2019-07~09/2019-08-11-book.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "《金字塔原理》笔记"
4 | date: 2019-08-09
5 | tags: [book]
6 | commentIssueId: 107
7 | ---
8 |
9 |
10 |
11 | 《金字塔原理》谢玉熊著,相关笔记,和结构化思考力类似。
12 |
13 |
14 |
15 | ### 金字塔原理
16 |
17 | 四要素P1 :结论先行,以上统下,归类分组,逻辑递进。
18 |
19 | 理论作用P2 :
20 |
21 | * 从外到内:如何从宽泛的话题中提取关键信息,并组织成思维逻辑中心,根据主题,抓住分论点然后层层逻辑分析
22 | * 从内到外:如何组织自己的观点,向外结构化透出自己的核心观点
23 |
24 | 优秀员工7要素P3 :分析并有效组织信息的能力、观点和信息的沟通能力、计划和组织人员的控制能力、团队协作的能力、方法论和概念的理解以及运用能力、解决问题的能力、掌握技术及运用的能力。
25 |
26 | 对思维的作用P14 : 让思维从隐形 - 显性 - 结构化 - 形象化
27 |
28 |
29 |
30 |
31 |
32 | ### 金字塔结构
33 |
34 | 结构P6
35 |
36 | * SCQA,背景 Situation、冲突 Conflict、疑问 Question,回答 Answer
37 | * 背景P32 :为了一个目标,找到一个解决方案
38 | * 如何发现问题P34 : 预期和现状的差距、现状是否有转折、不顺利的部分是、没有达到目标的是、没有达到预期的环节是、环节中的问题是否会成为隐患。
39 | * 冲突:目标或解决方案的阻碍,没有达到预期效果
40 | * 疑问:如何实现目标,方案可行性
41 | * 横向关系
42 | * 归纳法,抽取逻辑上的共同点,合并同类项
43 | * 演绎法,三段式论述,回答上一层问题
44 | * 切入点,MECE 原则:SWOT、PEST、五力模型、麦肯锡 7S 分析法
45 | * 纵向关系P21
46 | * 自上而下:疑问式
47 | * 自下而上:概括总结
48 |
49 |
50 |
51 | ### 汇报工作
52 |
53 | 汇报工作思维导图
54 |
55 |
--------------------------------------------------------------------------------
/_posts/2019-07~09/2019-08-19-daydayup.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "《好好学习》笔记(2)"
4 | date: 2019-08-18
5 | tags: [book]
6 | commentIssueId: 108
7 | ---
8 |
9 |
10 |
11 | 《好好学习》笔记
12 | * 能力圈
13 | * 系统思考
14 | * 二八和复利
15 | * 安全空间
16 | * 关于现实思维的现实思考?
17 |
18 |
19 |
20 | ### 能力圈 P161
21 |
22 | > 能力圈是由你真正擅长并懂得的知识组成的,而且在这些领域里,你要比 90% 的人都做得好。
23 |
24 | 跳出舒适圈是为了更好地扩展自己的能力圈P164 , 而重大的决策依旧需要在自己的能力圈做出。
25 |
26 | > 不能界定边界的能力,称不上真正的能力。查理·芒格
27 |
28 | 只有清晰地了解自己的优势和不足,才能更好发挥自己的能量,而这清晰认识的背后,就需要 “三省吾身” 了。而反省也是提高学习能力的底层方法 P47 : 反思、以教为学、刻意练习。
29 |
30 |
31 |
32 | ### 系统思考 P223
33 |
34 |
35 |
36 |
37 |
38 | * 从左侧黄金圈思维开始训练自己的思考的层次
39 | * 从事件本身出发,寻找背后的关系,而非 “人和事物”,进而构建自己的结构,从而加速对事物的理解
40 | * 有了上述的思考,就能做出更为客观和 “理性”(查理·芒格对自己最简单的描述) 的评价,进而预见发展,甚至设计未来。
41 |
42 | 有几本书待读:《系统思考》、《系统思考》、《影响力》
43 |
44 |
45 |
46 | ### 二八和复利P236
47 |
48 | 为什么好多事物规律都是 “二八” 分布,和国家贫富差距一样,一开始大家都差不多的情况下,从正态分布到幂律分布,背后都是由于 “复利” 的影响,刚开始的差异,到后来的差距,复利的深刻影响了生活的方方面面。
49 |
50 | 贫富差距大,存在是合理的。推翻旧体制,到和旧有体制类似,该有的问题都还是会有。存在即合理。
51 |
52 |
53 |
54 |
55 |
56 | ### 安全空间 P239
57 |
58 | > 为保证系统的正常运作,或在极端情况下,为了不造成无法挽回的结果所做的准备。
59 |
60 | 从以上对安全空间的定义中,我们提取关键词并分类归纳后,对如何构建安全空间有以下方式:
61 |
62 | * 准备,最明显的一个关键词
63 | * 做冗余备份,如资料做 U 盘、云端备份
64 | * 提高决策质量,在能力圈,做少数、高质量重大决策,而不去做一些能力圈外、低质量的决策。
65 | * 系统本身
66 | * 构建反脆弱系统,如构建分布式系统、分散风险。
67 |
68 |
69 |
70 | ### 关于现实思维的现实思考 P249
71 |
72 | https://www.jianshu.com/p/1f98731709c6
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/_posts/2019-07~09/2019-08-19-xindian.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "技术与商业"
4 | date: 2019-08-18
5 | tags: [book]
6 | commentIssueId: 108
7 | ---
8 |
9 |
10 |
11 | 技术与商业
12 | * 共识和商业模式先行
13 | * 技术与商业模式关系
14 | * 技术更重要的是背后的思想
15 | * 业务与数据
16 |
17 |
18 |
19 | ### 共识和商业模式先行
20 |
21 | 和国家之间的合作相似,总是先领导人达成几点共识,或签署谅解备忘录。然后再由底下的人去实施落实细节。从行癫聊技术和商业的关系中也可以看到,共识越往上越容易达成,越往下,越具体,共识和技术不那么重要,也不那么容易达成,很可能怎么做都可以。和结论先行一样,先规划好商业路径和客户价值,解决的痛点,再层层拆解,落实到技术。
22 |
23 |
24 |
25 | ### 技术与商业模式关系
26 |
27 | 现在往往很多人,有了 AI 技术后,到处找钉子业务,敲敲打打,而不是从客户本身的价值出发考虑。有了技术,可以从宽度和深度,两方面展开。宽度先发制人,行业宽度优势。深度切场景,平台是由深度场景孵化而成的,解决客户真正的问题,然后做成产品,进而平台化,最后甚至能定义这个行业(如视频行业做深之后,各种 feature 和解决方案)。技术 & 商业 - 产品 - 平台化 - 生态。技术和商业是相辅相成,用技术解决客户真正的痛点并商业化,商业模式孵化技术产品,技术再赋能商业,进而优化商业模式,再提出更高的技术要求,循环往复。
28 |
29 |
30 |
31 | ### 技术更重要的是背后的思想
32 |
33 | AI 是种思想,从感知到认知,区块链思想,和 TCP/IP 一样,分层的思想。是所有现代技术人都需要掌握的思维方式。
34 |
35 |
36 |
37 | ### 业务与数据
38 |
39 | 业务数据化 - 数据业务化,现在的业务脱离数据,会进展很慢,数据一旦脱离业务就是空中楼阁。而这一切的背后,需要围绕客户价值展开。
--------------------------------------------------------------------------------
/_posts/2019-07~09/2019-08-20-ps.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "PS 小技巧"
4 | date: 2019-08-24
5 | tags: [book]
6 | commentIssueId: 108
7 | ---
8 |
9 |
10 |
11 | * 添加透明色
12 | * 马赛克
13 | * 辅助线
14 | * 中心圆
15 |
16 |
17 |
18 | ## 如何添加透明色图层
19 |
20 | * 新建图层
21 | * 油漆桶
22 | * 设置图层透明度
23 |
24 | https://zhidao.baidu.com/question/364440334.html
25 |
26 |
27 |
28 |
29 |
30 | ### 如何进行马赛克处理
31 |
32 | * 选择
33 | * 过滤
34 | * 像素化
35 | * 马赛克
36 |
37 | https://zhidao.baidu.com/question/45112213.html
38 |
39 |
40 |
41 |
42 |
43 | ### 辅助线
44 |
45 | * 视图
46 | * 新建辅助线
47 |
48 | 标尺
49 |
50 | * 视图
51 | * 标尺
52 |
53 | https://jingyan.baidu.com/article/d5c4b52bab48a4da560dc5ce.html
54 |
55 |
56 |
57 |
58 |
59 | ### 画圆
60 |
61 | * 椭圆选框
62 | * 按住 option,以鼠标为中心画圆
63 | * 按住 shift,画正圆,而不是椭圆
64 |
65 |
66 |
67 | https://product.pconline.com.cn/itbk/software/ps/1704/9062357.html
68 |
--------------------------------------------------------------------------------
/_posts/2019-07~09/2019-08-31-data-insight.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "洞察技术趋势"
4 | date: 2019-08-31
5 | tags: [sql]
6 | commentIssueId: 108
7 | ---
8 |
9 |
10 |
11 | 如何洞察技术趋势
12 |
13 |
14 |
15 | ## 文章来源
16 |
17 | https://fauna.com/blog/how-to-spot-tech-trends-early
18 |
19 | * Stackoverflow Exchange: https://data.stackexchange.com/stackoverflow/query/1064625
20 | * Google BigQuery: [https://bigquery.cloud.google.com](https://bigquery.cloud.google.com/)
21 |
22 |
23 |
24 | ## 尝试
25 |
26 | 
27 |
28 |
29 |
30 | 
31 |
32 |
33 |
34 |
35 |
36 | ## References
37 |
38 | * Google BigQuery:[https://console.cloud.google.com/bigquery](https://console.cloud.google.com/bigquery)
39 | * Google DataStudio:[https://datastudio.google.com](https://datastudio.google.com/)
40 | * Stackxchange: [https://data.stackexchange.com/stackoverflow/query/1064625](https://data.stackexchange.com/stackoverflow/query/1064625)
--------------------------------------------------------------------------------
/_posts/2019-07~09/2019-09-14-think.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "诫子书与酒的思考"
4 | date: 2019-09-14
5 | tags: [life]
6 | commentIssueId: 108
7 | ---
8 |
9 |
10 |
11 | * 诫子书
12 | * 马老师的酒
13 |
14 |
15 |
16 | ## 诫子书
17 |
18 | ```
19 | 夫君子之行,静以修身,俭以养德。非淡泊无以明志,非宁静无以致远。夫学须静也,才须学也。非学无以广才,非志无以成学。淫慢则不能励精,险躁则不能治性。年与时驰,意与日去,遂成枯落,多不接世,悲守穷庐,将复何及!
20 | ```
21 |
22 | 译文:
23 |
24 | ```
25 | 有道德修养的人,依靠内心安静来修养身心,以俭朴节约财物来培养自己高尚的品德。不恬静寡欲无法明确志向,不排除外来干扰无法达到远大目标。学习必须静心专一,而才干来自勤奋学习。如果不学习就无法增长自己的才干,不明确志向就不能在学习上获得成就。纵欲放荡、消极怠慢就不能勉励心志使精神振作,冒险草率、急燥不安就不能陶冶性情。年华随时光而飞驰,意志随岁月逐渐消逝。最终枯败零落,大多不接触世事、不为社会所用,只能悲哀地困守在自己穷困的破舍里,到时悔恨又怎么来得及?
26 | ```
27 |
28 | 如今社会,淡泊、宁静还适用吗?在强调要性(工作上要求把某件事最好,拿到结果)、发声(不管搞得好的、不好的,多出去宣传)的时代,如何有机结合?
29 |
30 | ```
31 | 淡泊以明志,宁静以致远。 -- 大道
32 | 寡欲非散慢,沉默非无思。 -- 辩证
33 | 淡泊却勤奋可成欲且明志。 -- 融合
34 | 宁静却三省可酒香且致远。
35 | ```
36 |
37 | * 可以淡泊,但不可以懒散、傲慢(无欲而无所求的傲慢)
38 | * 可以很沉默(也有沉默是金的说法),但不可以没有自己的思考和观点,不是当个没有思想的透明人,这样不可能为“金“。
39 | * 为人处世,需要淡泊(其实也有舍与得的道理)来明确自己真正想要的,同时也不可以不勤奋上进,来达成阶段性的欲望(目标)
40 | * 排除外部干扰独立思考,却也能和外部结合经常自我反省,那么,就能如酒好不怕巷子深(也需要有招牌,时常多出去走走),并能达到更远大的理想。
41 |
42 |
43 |
44 |
45 |
46 | ## 马老师的酒
47 |
48 |
49 |
50 | ```
51 | 工作是水,生活是酒。水决定酒的品质,生活不可如水无味。
52 | ```
53 |
54 | 工作工资高低,决定生活品质,但生活还需要多酝酿,要有味。快乐工作,认真生活。工作时快乐,快乐源泉,然后认认真真经营自己的家庭,自己的生活,让生活变得有滋有味。
--------------------------------------------------------------------------------
/_posts/2019-10~12/2019-10-13-ss.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "一条命令安装 Shadowsocks"
4 | date: 2019-10-13
5 | tags: [note,insight]
6 | commentIssueId: 108
7 | ---
8 |
9 |
10 | 本文通过 阿里云 CentOS 一键安装 Shadowsocks,详细参考 [ss](https://github.com/zhoukekestar/drafts/tree/master/2019-08~12/2019-10-13-ss)
11 |
12 | ## 购买
13 |
14 | * 按量
15 | * 国外
16 | * 入门共享(最省钱)
17 |
18 | 
19 |
20 |
21 | ### 选择系统
22 | * cent_os
23 | * 7.6 64 位
24 | * 关闭安全加固
25 | * 云盘 20G (省钱)
26 |
27 | 
28 |
29 |
30 | ### 配置网络
31 | 因为默认网络配置,仅允许特定端口访问服务器,所以,需要将使用到的端口号(8383~8385)配置为网络允许。
32 |
33 | 
34 |
35 | 
36 |
37 |
38 |
39 | ## Feature
40 | * 卸载阿里云盾和安骑士
41 | * 安装 pip
42 | * 安装 shadowsocks
43 |
44 | ## 快速安装 Shadowsocks
45 |
46 | ```sh
47 | ssh root@xx.xx.xx.xx
48 | curl https://raw.githubusercontent.com/zhoukekestar/drafts/master/2019-08~12/2019-10-13-ss/ss.sh | bash
49 | ```
50 |
51 |
--------------------------------------------------------------------------------
/_posts/2019-10~12/2019-10-26-ppt.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "PPT 小技巧"
4 | date: 2019-10-26
5 | tags: [note]
6 | commentIssueId: 108
7 | ---
8 |
9 |
10 |
11 | PPT 技巧怎么学?借鉴、颜色搭配
12 |
13 |
14 |
15 | ## 借鉴
16 |
17 | 借鉴发布 PPT 和资讯报告 PPT,设置正确的图文比例和排版
18 |
19 | 比如:
20 |
21 | * apple 官网对产品的介绍,https://www.apple.com/mac/
22 | * 2019 工业市场研究报告,http://www.sohu.com/a/345967039_445326
23 | * TED 演讲是整合演讲的不错参考
24 |
25 | apple 官网对产品的介绍,https://www.apple.com/mac/
26 |
27 |
28 |
29 |
30 |
31 | ## 颜色搭配和选取
32 |
33 | * https://colorhunt.co/palettes/popular
34 | * https://coolors.co/browser/best/1
35 | * https://www.materialpalette.com/blue/blue
36 |
37 |
38 |
39 |
40 |
41 | ## 内容至上
42 |
43 | 平时看其他人演讲时,不乏对内容拿捏很好的。用简单的文字和表述,充分表达思考和想法的。
--------------------------------------------------------------------------------
/_posts/2019-10~12/2019-11-03-define-problem.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "如何定义问题 & How"
4 | date: 2019-11-03
5 | tags: [note]
6 | commentIssueId: 111
7 | ---
8 |
9 |
10 |
11 | 如何定义问题?从表面问题 - 问题本质 - 真正的问题,类似黄金圈的方式分析。
12 |
13 |
14 |
15 | ## 如何定义问题?
16 |
17 | 1. 表象问题【所声称的】:质疑与确认
18 | * 质疑问题本身
19 | * 此问题是否客观存在?问题本身是否就是伪问题?
20 | * 是否值得被解决?投入产出比怎么样?ROI
21 | * 确认表象问题
22 | * 背景 & 目的是什么? WHY & WHAT?
23 | * 问题、需求方式谁?相关利益方是谁?WHO?
24 | * 需要多少时间?什么时间点截止?HOW MUCH?WHEN?
25 | 2. 问题本质【为什么声称】:挖掘诉求
26 | * 5WHY 分析法,不断追问为什么?引出问题本质
27 | 3. 真正的问题【必须满足的】:判定优先级
28 | * 宏观:哪个更值得被解决?从紧急度和重要度两方面考虑。
29 | * 和之前的问题本身有点类似,整体 ROI ,是否值得?
30 | * 微观:解决问题的较优解?方案对比、或 AB Test
31 |
32 |
33 |
34 |
35 |
36 | # References
37 |
38 | * [正确定义问题,比解决问题重要一百倍](http://www.woshipm.com/pmd/1660198.html)
39 | * [解决问题的第一步:正确定义问题](https://zhuanlan.zhihu.com/p/26166552)
--------------------------------------------------------------------------------
/_posts/2019-10~12/2019-11-03-strategy.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "读《定战略》文章笔记"
4 | date: 2019-11-03
5 | tags: [note]
6 | commentIssueId: 110
7 | ---
8 |
9 |
10 |
11 | 定战略6字简概:“选择、聚焦、击穿”
12 |
13 |
14 |
15 | ## 选择
16 |
17 | 选择:定战略要懂得“出局看局”。
18 |
19 | * 做战略第一步是 **选择** ,选择某个业务形态之后,在此基础上才需要考虑 **取舍** 的问题。
20 | * 要懂得出局看局,以局外人的眼光去审视,才有可能把问题看得更透一些。**出局看局** 需要搞明白以下 3 点
21 | * 行业趋势、行业增速
22 | * 现状如何?未来增长速度怎样?背后的逻辑是什么?
23 | * 比如:养老行业,现在起步阶段,由于未来的人口老龄化,增长速度将进一步会被拉升。
24 | * 这个在行业报告中,会经常出现 **PEST** 分析法,从 P是政治(Politics),E是经济(Economy),S是社会(Society),T是技术(Technology)
25 | * 行业容量有多大
26 | * 整体的市场空间有多大
27 | * 如何做数据分析?这是比较关键的。
28 | * 服务的关键用户是谁
29 | * 核心客户是谁?核心流程是什么?核心痛点是什么?
30 | * 如何找到核心客户、痛点,需要 **大胆设想,小心求证** 。
31 |
32 |
33 |
34 | ## 聚焦
35 |
36 | 聚焦:找到指点,让他成为风暴中心。
37 |
38 | * 找到一个支点,让所有的资源都围绕这个 “风暴中心”。
39 | * 举到的全品类赶集网、早年阿里巴巴 B2B 的例子,都是在取舍、聚焦。赶集从全品类到以招聘为核心,阿里巴巴 B2B 全品类服务到以外贸为核心。
40 | * 做完战略聚焦之后,需要匹配相应的运营模型、组织架构。
41 |
42 |
43 |
44 | ## 击穿
45 |
46 | 击穿:找到支点扎进去,形成“强竞争壁垒”
47 |
48 | * 战略必须找到极细的针孔,使劲扎进去,直到扎透为止。这也是基于选择、聚焦的结果。这也是 **事前充分讨论、事后坚决执行** 的体现。
49 |
50 |
51 |
52 | ## 未来 30 ~ 40 年趋势
53 |
54 | 文中说到只有两个趋势,但也是基于当下的判断:
55 |
56 | * 智能化,比如AI、大数据等新技术。企业要结合自己公司的情况,想办法把智能化融入进去;
57 | * 物联网,也就是万物互联。
58 |
59 |
60 |
61 |
62 |
63 | ## References
64 |
65 | * 《定战略,就6个字》 陈国环 https://mp.weixin.qq.com/s/RxENBRgu3mA1LWE8KhvsyA
66 | * [曾鸣:踏实做10年](https://mp.weixin.qq.com/s/-3WWJynZEmMtIPouSu8Xeg?)
--------------------------------------------------------------------------------
/_posts/2019-10~12/2019-11-13-double-11.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "双11购物背后的思考"
4 | date: 2019-11-13
5 | tags: [note]
6 | commentIssueId: 110
7 | ---
8 |
9 |
10 |
11 | 在某店铺买了某商品背后的思考。
12 |
13 |
14 |
15 | 双 11 购物买某商品背后商业逻辑的思考:
16 |
17 | - 从用户增长第一步获客上,这家店铺就占据了优势:“口碑“,不得不说 “口碑” 是最好的营销手段,这家店铺同时有两个同事推荐,引起了我强烈的好奇心以及初步建立的信任和好感(这一步很不容易),包括很多商品请明星做代言,还有号称 19 年元年的 “直播” 电商元年的形式,相比传统图文结构,更能引起买家的信任和好感,背后的心理学营销,无不如此。
18 | - 在用户增长第二部激活上,店铺依旧下足了功夫。
19 | - 低价且可靠的用户心智
20 | - 说起低价,我首先想起了 PDD,也是十分佩服 PDD 深入人心的低价心智,而低价背后的商品模式更是令人佩服。但是,我在 PDD 买某商品的时候,总感觉不踏实,这其中的原因或许正是和低价有关,这也是低价所带来的负面影响。
21 | - 这家店铺怎么做?很有意思。TA 知道来店铺买商品的,一定是奔着低价来的,不然直接在官网买就行了,不用费这么大劲。那来这里的用户,核心痛点是什么?就是低价背后带来的可靠性的降低。
22 | - 解决来这家店铺买商品的核心痛点:低价背后靠不靠谱!怎么解?店家直接在淘宝商品首图放了如何鉴别商品真伪!!!(这么奇葩的商品展示方式,也是第一次见到)商品长什么不重要,重要的是教用户如何鉴别商品真伪,这恰好命中用户核心痛点。于是乎,用户在店铺的教育下,知道了如何鉴别商品真伪,这进一步增加了用户信任和好感。
23 | - 店铺专业度打磨
24 | - 首先是全品类,这个还是比较重要的,PDD 为什么那么低,是 PDD 只卖最低品质的那档商品,而该店铺,从最高档、中档、底档,用户都可以选,你选择最低价,你也知道店铺很明显透出的这种价格阶梯,只要自己接受对应的档位就行。
25 | - 第二是店铺起源,很少有店铺在商品详情页聊这个事,对外透出的,感觉这家店铺很有情怀,是希望持续地将店铺经营下去的。
26 | - 第三,描述中讲了低价背后的商业逻辑,包括代理商机制,如何运作等等。也是个奇葩,但很符合用户的胃口,不然,我怎么信你你有这样的低价而且没卖假货。
27 | - 用户留存上,目前还没接触到,但以 “口碑” 的形式做留存,想不好也很难,想想周边的同事,过了几年想买类似商品上,还是会推荐或想起去该店铺买商品,用户分享更是直接做完了 = =。
28 | - 总结:很是佩服这家店铺的套路,消费得明明白白,甚至还感觉比官网买的还靠谱。未来商业的竞争,很大部分还是在于客户的服务和体验上。
--------------------------------------------------------------------------------
/_posts/2020-01~03/2020-02-02-math-cal.md:
--------------------------------------------------------------------------------
1 | ---
2 | 3layout: post
3 | title: "微积分"
4 | date: 2020-02-02
5 | tags: [math]
6 | commentIssueId: 100
7 | use_math: true
8 | ---
9 |
10 |
11 |
12 |
13 |
14 |
15 | ## 导数
16 |
17 | https://www.shuxuele.com/calculus/derivatives-introduction.html
18 |
19 |
20 |
21 | #### 导数写法
22 |
23 | ##### 写法1
24 |
25 | $\frac{d}{dx}$ 念为 "的导数"
26 | $$
27 | \frac{d}{dx} x^2 = 2x
28 | $$
29 |
30 |
31 | 以上公式的意思是 $x^2$ 的导数等于 $2x$ ,或 $x^2$ 的 $d dx$ 等于 $2x$
32 |
33 | ##### 写法2
34 |
35 | $f'(x)$ 也是 "的导数" 的另外一种写法
36 |
37 | $f’(x) = 2x $ 念作:$f(x)$ 的导数等于 $2x$
38 |
39 |
40 |
41 | ##### 写法3
42 |
43 | 使用极限写法
44 | $$
45 | f'(x) = \lim_{\Delta x\to 0} \frac{f(x + \Delta x) - f(x)}{\Delta x}
46 | $$
47 | 读作:$f$ 的导数等于 当 $\Delta x$ 趋近零时,$f(x + \Delta x) - f(x)$ 除以 $\Delta x$ 的极限
48 |
49 |
50 |
51 | ##### 写法5
52 |
53 | $$
54 | \frac{dy}{dx} = \frac{f(x + dx) - f(x)}{dx}
55 | $$
56 |
57 | 参考:https://www.shuxuele.com/calculus/derivatives-dy-dx.html
58 |
59 | 从导数定义可知,求导为:
60 | $$
61 | \frac{\Delta y}{\Delta x} = \frac{f(x + \Delta x) - f(x)}{\Delta x}
62 | $$
63 | 因为我们求导需要将 $\Delta x$ 趋近为 0,但又不能写为 0,所以,当 $\Delta x$ 趋近为 0 时,就称为 $dx$ ,即 $dx$ 是无穷小的,所以,就有了写法 5 的表示形式。
64 |
65 |
66 |
67 | ### 隐微分法
68 |
69 | https://www.shuxuele.com/calculus/implicit-differentiation.html
70 |
71 |
72 |
73 | #### 相关笔记
74 |
75 | 
76 |
77 |
78 | 
79 |
80 |
81 |
82 | ## 参考
83 |
84 | * https://www.bilibili.com/video/av24325548
85 |
86 |
--------------------------------------------------------------------------------
/_posts/2020-01~03/2020-02-07-lit-element.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/_posts/2020-01~03/2020-02-07-lit-element.md
--------------------------------------------------------------------------------
/_posts/2020-01~03/2020-02-15-dbs.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "数据库对比"
4 | date: 2020-02-15
5 | tags: [db]
6 | ---
7 |
8 |
9 |
10 | 阅读文章笔记 https://geekflare.com/open-source-database/
11 |
12 |
13 |
14 | ## 数据库
15 |
16 | 
17 |
18 |
19 |
20 | ## 参考
21 |
22 | * https://geekflare.com/open-source-database/
--------------------------------------------------------------------------------
/_posts/2020-01~03/2020-03-14-maps.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "地图提供商列表"
4 | date: 2020-03-14
5 | tags: [map]
6 | commentIssueId: 114
7 |
8 | ---
9 |
10 |
11 |
12 | 偶然通过 Null Island 看到全球的在线地图服务提供商,记录一下:
13 |
14 | [https://tools.wmflabs.org/geohack/geohack.php?language=zh&pagename=%E7%A9%BA%E8%99%9B%E5%B3%B6¶ms=4_45_30_N_1_58_33_W_](https://tools.wmflabs.org/geohack/geohack.php?language=zh&pagename=空虛島¶ms=4_45_30_N_1_58_33_W_)
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/_posts/2020-01~03/2020-03-15-sql-null.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "SQL 的 Null 值"
4 | date: 2020-03-15
5 | tags: [sql]
6 | commentIssueId: 114
7 | ---
8 |
9 |
10 |
11 |
12 | SQL 中对 null 的处理,为什么需要使用 is 而不能使用等号。
13 |
14 | 因为 null 表示 unknown,任何值和 null 的等号对比,从设计上需要等于 null。这样的设计,导致等号运算法无法映射 bool 值,所以需要新增 is 函数,将 null 的对比,映射为 bool 值。
15 |
16 |
17 |
18 | 
19 |
20 |
21 |
22 | 参考:https://mitchum.blog/null-values-in-sql-queries/
--------------------------------------------------------------------------------
/_posts/2020-04~09/2020-07-29-review.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "简单 Review"
4 | date: 2020-07-29
5 | tags: [js]
6 | ---
7 |
8 |
9 |
10 | 随着高考结束,成绩也陆续公布之际。也简单 review 一下自己。看了 刘润 的两篇文章,也有些感触,简单记录吧。
11 |
12 |
13 |
14 | ## 大学教育
15 |
16 | 今年作为 4 个高中毕业生的亲戚,个人对大学教育的看法如下:
17 | 首先,大学的核心任务有两个,第一个是从主观上寻找自己真正热爱的兴趣。第二个是从客观上提升自学能力和锻炼批判思维。
18 | 第一点兴趣,是未来有别于他人的原始动力,引用 Steve Jobs 的话:If you haven't find what you love, Keep looking, Don's settle.
19 | 第二点,引用理查德·莱文曾的一句话:如果一个学生从耶鲁大学毕业后,居然拥有了某种很专业的知识和技能,这是耶鲁教育最大的失败。大学教育的核心是通识,是培养学生批判性独立思考的能力,并为终身学习打下基础。
20 |
21 |
22 |
23 | ## 优秀的人该是怎样?
24 |
25 | 看到 [能成大事儿的人,都具备这5个特质](https://mp.weixin.qq.com/s/9vGy6dc1vhBl58GA6F-ARw) 这篇文章,刘润老师把优秀归纳为 5 点:
26 |
27 | * **拥有强烈的好奇心**
28 |
29 | * **面对不确定性,选择拥抱而不是怀疑**
30 |
31 | * **相比赚钱,他们有更大的目标和想象力**
32 |
33 | * **延迟满足,极度自律**
34 |
35 | * **不怕犯错,善于自省**
36 |
37 |
38 |
39 | 由于罗列的点过多,也不方便记忆,又没有联系,所以,想了想,总体的逻辑可能如下:
40 |
41 |
42 |
43 | 
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | ## 管理
54 |
55 | 又看到 [为什么顶级的管理者,都能平衡好企业里这三种人?](https://mp.weixin.qq.com/s/iQ7TjHnnlqKx71dr0tegrw) ,刘润老师归纳为 3 类:
56 |
57 | * 混饭吃的
58 | * 追求价值实现
59 | * 追求梦想
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/_posts/2020-04~09/2020-08-02-open-in-terminal.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "如何快速打开 iTerm"
4 | date: 2020-08-02
5 | tags: [tools]
6 | ---
7 |
8 | * 新建 iTermHere.scpt 脚本
9 | * 导出为应用
10 | * 修改图标
11 | * 拖拽至 Toolbar 即可
12 |
13 | ## 步骤
14 |
15 | * 新建脚本文件 `iTermHere.scpt`,拷贝 [代码](http://hohonuuli.blogspot.com/2016/02/iterm2-version-3-open-iterm-here-script.html)
16 |
17 | 
18 |
19 |
20 |
21 | * 在 Finder 中使用 Script Editor 打开,并导出为应用
22 |
23 | 
24 |
25 |
26 |
27 | * 将其保存或拖拽到应用
28 |
29 | 
30 |
31 |
32 |
33 | * [修改 icon 图标](https://stackoverflow.com/questions/42815166/customize-applescript-app-icon),我们使用 iTerm 的图标来显示即可,参考文章内容:
34 | * 我们分别打开 iTerm 和 iTermHere 的包内容(右击显示包内容即可)
35 | * 将图表拖拽到目标文件夹,然后修改名称为 `droplet.icns` 即可
36 |
37 | 
38 |
39 |
40 |
41 | * 修改完图标之后,直接将 `iTermHere` 拖拽到 Toolbar 上即可
42 |
43 |
44 |
45 | 
46 |
47 |
48 |
49 |
50 |
51 | ## 参考
52 |
53 | * 脚本:http://hohonuuli.blogspot.com/2016/02/iterm2-version-3-open-iterm-here-script.html
54 | * 修改图标:https://stackoverflow.com/questions/42815166/customize-applescript-app-icon
55 |
56 |
--------------------------------------------------------------------------------
/_posts/2020-10~12/2020-12-15-k-means.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "K-Means Clustering"
4 | date: 2020-12-15
5 | tags: [python, dm]
6 | ---
7 |
8 | ## 初始化
9 | 高斯散点随机初始化,包括取值 3 个聚类(红色加号)
10 |
11 | 
12 |
13 | ## 过程
14 |
15 | 
16 |
17 | 
18 |
19 | 
20 |
21 | ## 最终分类结果
22 |
23 | 
24 |
--------------------------------------------------------------------------------
/_posts/2021-01~03/2021-03-28-imagination.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "想象力与创造力简记"
4 | date: 2021-03-28
5 | tags: [note]
6 | commentIssueId: 119
7 | ---
8 |
9 | 参考来自 波士顿咨询的 [规模化生产创新的关键:系统性提升想象力四步法](http://www.199it.com/archives/1221464.html),有些想法,遂记录一下。
10 |
11 | ## 想象与创造
12 |
13 | 学而不思则罔,思而不学则殆。
14 | 知行合一。
15 |
16 | 思考 - 学习 - 行动,古往今来都是个人成长的正向循环。
17 |
18 | 有足够的想象力、思考,有所惑,学习才会有所得。无意义的灌输,对成长是没有意义的。而学习之后,解答自己困惑的同时,有所行动,更会有所体会,促进自身成长,甚至是站在巨人肩膀上,做出有所创新的事物。
19 |
20 |
21 | ## 想象力的源泉
22 |
23 | 想象力本质上就是大脑的思考,趋势大脑思考一个重要的动力,就是好奇心。
24 |
25 | 好奇心本身是对事物本身的不同思考,比如儿时的发散思维、反权威、叛逆等等,这些都是好奇心的表现。对同一件事物,好奇心驱使我们更全面、客观地认识。
26 |
27 | 全面、客观的认识,是由我们的思辨能力创造的。
28 |
29 | 思辨能力背后,其实能上升到唯物辩证的哲学思维高度。
30 |
31 | 总结来说:唯物辩证,让我们通过更全面的视角,引导我们对事物的好奇,于是便能对事物做出更充分的想象、链接。
32 |
33 |
34 | ## 集体想象力
35 |
36 | ### 激发
37 |
38 | * 人:从人、组织的视角来看,需要更多元背景的人员构成。
39 | * 事:从事的角度看,可以多引入新事物、或轮流制。
40 |
41 | 通过上述人、事的安排,用于增加事物的偶然性,也便于建立更多的新链接(这点在想象力源泉上,小孩子的偶然和链接更强)。
42 |
43 | ### 规模化
44 |
45 | 有了集体的想象力,就能通过体制、机制来放大和规模化想象力。比如:
46 |
47 | * 集体沟通,促进集体想象力的形成。
48 | * 形成范式促进想象力高效扩散(有了想法之后,需要有足够的影响力和集团认同,才有可能更快速地落地,否则只是空中楼阁)
49 | * 比如:每年的创新想法大赛
50 | * 包容和高接受度的文化氛围
51 | * 奖励所有参与想象的集团,而非个人英雄。
52 | * 确保内外部信息的充分和透明流动
53 |
54 |
55 | ### 体系化
56 |
57 | 当从激发、行动、规模化之后,如何让这个循环更为持久地正向转动是体系化需要思考的内容。
58 |
59 | 让其三者,能相互补充和正向激励。
60 |
--------------------------------------------------------------------------------
/_posts/2021-01~03/2021-03-28-xwlb.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "新闻联播数据"
4 | date: 2021-03-28
5 | tags: [china-data]
6 | ---
7 |
8 | 灵感来自[《Fastdata极数:2020年央视《新闻联播》数据报告》](http://www.ifastdata.com/article/index/id/219/cid/2)。
9 | > 备份地址:https://github.com/china-data/xwlb/issues/1
10 |
11 | 看到这份报告还挺有趣的,所以也尝试抓取了一下数据,方便和报告的数据对照,或自己分析一些结论。
12 |
13 | 相关地址:https://github.com/china-data/xwlb
14 |
--------------------------------------------------------------------------------
/_posts/2021-01~03/2021-04-24-infomation.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "信息社会"
4 | date: 2021-04-24
5 | tags: [future]
6 | ---
7 |
8 | 看到[《大趋势》对信息社会](http://www.ruanyifeng.com/blog/2021/04/weekly-issue-154.html)的预言,结合之前看到的 [马斯洛需求层次](https://baike.baidu.com/item/%E9%A9%AC%E6%96%AF%E6%B4%9B%E9%9C%80%E6%B1%82%E5%B1%82%E6%AC%A1%E7%90%86%E8%AE%BA/11036498?fr=aladdin),有些想法记录一下。
9 |
10 | 首先按照需求社会演进,简单分层一下,不完全对,是一定视角的粗略解读:
11 |
12 | ### 农业社会
13 |
14 | 农业社会,人们是对安全、生理的需求,最直接的体现就是对食物的追求。也由此衍生出了封建制度,部落、地区、国家联合起来,一起抵御外敌、合作劳作。此制度下,权利来源对生产资料的占有。
15 |
16 | ### 工业社会
17 |
18 | 工业社会,人们是对尊重、社交的诉求,最直接的体现就是对消费的追求。由此衍生除了资本主义,无国界的资本,是对工业品生产效率的极致追求。此制度下,权利来源对资本的占有。
19 |
20 | ### 信息社会
21 |
22 | 信息社会,人们是对自我实现的追求,没有更高追求的人,可能在此社会下迷失自我。衍生出的制度暂不好说,但肯定的是,权利的来源是对信息的占有。
23 |
24 | 未来对信息的利用效率将决定一个人的 “成就”。主要的挑战,也将来自对信息的深度挖掘,以及对信息的真实度的辨别。
25 |
26 | ### 参考
27 |
28 | * [《大趋势》对信息社会](http://www.ruanyifeng.com/blog/2021/04/weekly-issue-154.html)
29 | * [马斯洛需求层次](https://baike.baidu.com/item/%E9%A9%AC%E6%96%AF%E6%B4%9B%E9%9C%80%E6%B1%82%E5%B1%82%E6%AC%A1%E7%90%86%E8%AE%BA/11036498?fr=aladdin)
30 |
--------------------------------------------------------------------------------
/_posts/2021-01~03/2021-04-24-succeed.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "读《成功,动机与目标》笔记"
4 | date: 2021-04-24
5 | tags: [reading, book]
6 | ---
7 |
8 | 读完 《成功,动机与目标》 有段时间了,一直拖着没整理成文档。
9 |
10 |
11 | ### 具备挑战的目标
12 |
13 | P7 更具体的且有挑战的目标,是实现目标的秘诀之一。这似乎也解释了:
14 | * 为什么公司设定 KPI 的时候,需要有 “跳一跳” 的这一个概念了。
15 | * 为什么公司设定 OKR 的时候,提到 Object 需要 Ambition。
16 |
17 | 由高目标牵引出的好表现,高实现是个高绩效的正向循环,当然,如果目标定得过高,也需要适当修改以确保正向循环的持续,而非转向负向的恶循环中。
18 |
19 | ### 潜意识的目标
20 |
21 | P44 这里有很多的心理研究和脑科学研究提供参考。之前也提到好多,比如:
22 | * [Learning how to learn (week 3)](https://zhoukekestar.github.io/notes/2017/08/05/learning-how-to-learn-3.html) 中的 "让潜意识去预执行这些任务"
23 | * [读《第五项修炼》笔记 (2)](https://zhoukekestar.github.io/notes/2020/10/13/the-fifth-descipline-2.html) 中 "潜意识在无形中帮我们完成了生活的大部分工作"
24 |
25 | ### 成长性目标
26 |
27 | P60 很多人在制定职场目标时i,都是 “表现型” 的,而非 “成长型” 的。前者是短期收益,后者是长期收益。短期目标可能是晋升?但这是否符合你的长期目标呢?或者,是否在为长期目标而准备些什么呢?
28 |
29 | ### 乐观与悲观
30 |
31 | P93 乐观和悲观的个人态度,是最能体现出唯物辩证哲学观的。
32 | 适度的乐观和防御性悲观是积极的。
33 | 盲目的乐观和过分的悲观是消极的。
34 | 物极必反,否极泰来,老祖宗已经总结很到位了。
35 |
36 | P194 战略上藐视对手,极度乐高主义(当然是表现出来的)。战术上敬畏对手,防御性悲观,做好充分的准备。
37 |
38 | ### 自己选的目标
39 |
40 | P111 自主权给人以更大的内在动力,以更大的创新力,但也可能随时消散。
41 | 适度的牵引,再加以内在的期望,这样制定出的目标,可能是符合管理层、员工双向的最优解。目标的完成速度和完成度也可能是更好的。
42 |
43 |
44 | ### 目标感染
45 |
46 | P149 之前提到的目标的个人化(也是管理层希望的、适当牵引后的) + 公开承若(这和《第五项修炼》中类似) + 榜样的力量。可以使目标更容易达成。
47 |
48 |
49 | ### 坏消息
50 |
51 | P212 告诉别人坏消息的时候,不要重复强调问题,而是给出解决方案。
52 |
53 | 在吐槽的时候,也是这样,提出问题也需要解决问题。
54 |
55 | ### 总结
56 |
57 | 看下来,也是平平无奇的道理吧,不过,也算是对之前读其他书的一些巩固和积累吧。
58 |
--------------------------------------------------------------------------------
/_posts/2021-01~03/2021-06-11-mom-okr.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "老妈也懂 OKR?"
4 | date: 2021-06-11
5 | tags: [thinking]
6 | ---
7 |
8 | 一直想简单复盘一下这几十年的变化原因,人产生变化的本质因素等等,或许是年近 30 打工人的焦虑感,亦或是未来孩子教育之考量。
9 |
10 | OKR 是近几年流行的管理手段,和 KPI 的区别也就不班门弄斧,最近想来,老妈对我的管理手段,神似 OKR。简单聊几点。
11 |
12 | 人生之目标莫非幸福感,幸福感之通道莫非目标感。且目标感还有虚实两类,前者用于牵引,后者用于实现。前者是 OKR 中 O,后者是在 KPI 里是跳一跳勾得着的 3.75 目标。
13 |
14 |
15 | 很小的时候,老妈就给我很多虚、实的目标。
16 | 虚的有:成为不被 “卡”(被人欺负、有求于之类),自立自强之人
17 | 实的有:造个新房子,走出农村
18 |
19 |
20 | 至此,从有意识开始,便被这些目标牵引着。虽然各阶段学习成绩不怎的,但目标始终在那,也影响至现在,甚至也会是余生。
21 |
22 | 比如:夏天炎热,想去小卖部买冰棍吃?老妈就会说:“你是想花钱买冰棍,还是想住新房子?”,那当然是后者,冰棍哪有新房子 “香” 啊,于是,会很自觉地存下买零食的钱。钱在小时候确实是个奢侈品,以至于现在都没有买零食吃的习惯。但说来奇怪,老妈对学校捐款的事又特别大方,5 角、1 元、5 元、10 元的,从来不会说什么,所以,这个问题在小时候也会困扰我很久。
23 |
24 | 比如:走出农村的这个目标,老妈向来看不惯村里干部私吞上级拨款的财务,觉得村里就是最 “内卷” 的地方,不去外面闯荡挣钱,在村的这个小饭碗里,挣个你死我活,老死不相往来的那种,确实很没必要。要 “破卷”,就出去,寻求新的增量发展空间。所以,在老家,老妈给我封死了后路,以至于到现在我都有 “毕业生为什么都要回老家发展” 的纠结,城市、农村都挺卷的。
25 |
26 |
27 | -- 未完待续,需要时间来慢慢写 --
28 | 目标、自学、幸福、自信
29 | 奋斗
30 | 思维和态度
31 |
--------------------------------------------------------------------------------
/_posts/2021-04~09/2021-08-10-web-components.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "WebComponents Libraries"
4 | date: 2021-08-10
5 | tags: [webcomponents]
6 | ---
7 |
8 | 用于梳理当下的 WebComponents UI 库。
9 |
10 | ## 列表
11 |
12 | 目前较好的 WebComponents UI Library
13 |
14 | * https://github.com/material-components/material-components-web-components 2.6k
15 | * https://github.com/yued-fe/lulu 2.1k
16 | * https://github.com/ing-bank/lion 1.1k
17 | * https://github.com/SAP/ui5-webcomponents 1k
18 | * https://github.com/adobe/spectrum-web-components adobe 400
19 |
20 | Tools:
21 |
22 | * https://lit-element.polymer-project.org
23 |
24 | ## Open Web Components
25 |
26 | * https://open-wc.org/guides/community/component-libraries/
27 |
--------------------------------------------------------------------------------
/_posts/2022-01~03/2022-01-04-santi.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "《三体》笔记"
4 | date: 2022-01-04
5 | tags: [note]
6 | ---
7 |
8 | 花了一个元旦把《三体》看完了,简单记录一下,怕是拖延症又犯了。
9 |
10 | ## 黑暗森林
11 |
12 | 先从最经典的黑暗森林推导开始,是两条公理:
13 |
14 | * 生存是文明的第一需要。
15 | * 文明不断增长和扩张,但宇宙中的物质总量保持不变。
16 |
17 | 其实之所以为 「公理」,来自百科的解释是:
18 |
19 | 指依据人类理性的不证自明的基本事实,经过人类长期反复实践的考验,不需要再加证明的基本命题。
20 |
21 | 这里的不证自明,应该来自《马斯洛人类需求五层次理论》,从下到上,依次是:生理、安全、社会、尊重、自我实现。
22 |
23 | 这次,作者将它放在宇宙社会学的角度来看,并做了一定的简化,描述为:生存。
24 |
25 | 通过它的启发,很能顺其自然地想,其实这个概念能无限扩展到“生命体及其衍生物”,比如:社会、国家、企业等等。
26 |
27 | 所以,在危及到“生存”时,其余的道德只是空中楼阁,比如:社会贫困、国家战争、企业裁员等等,甚至个体之间的 “人吃人” 事件,其实也无可厚非,毕竟这是底线,没必要用道德的眼光看待、捆绑和加以批判。
28 |
29 | 但同时我们也能看到,当生存远离我们时,道德也会随着越发光芒。那是否存在足够强大的文明,它们足够安全,以至于能将 《马斯洛需求》 呈倒金字塔型,生存不再需要,而仅追求文明的自我实现呢?
30 |
31 | 类比到国家、企业,还是能看到些影子的,比如:美国、央企。为追求自身更高的目标而活着。
32 |
33 | ## 三体文明
34 |
35 | 自我限制,是文明进步的最大阻碍,包容是进步的培养皿。
36 |
37 | 无数次地看到因技术的双面性导致的技术自我封锁,这无疑是在自我麻痹。最典型的就是 “曲率飞船“。文明的发展,需要 维德那么说的:前进!前进!不择手段地前进!
38 |
39 | 类比到国家、社会、企业,也是这样。其实身处人类社会的环境,“不择手段” 需要外加 “道德” 的约束。但从文明视角不知道是否是合适的。毕竟,宇宙是黑暗的,人类道德的光,不知在宇宙的黑暗中能否点亮。
--------------------------------------------------------------------------------
/_posts/2022-04~09/2022-06-15-fe-big-picture.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "2022年前端大方向"
4 | date: 2022-06-15
5 | tags: [note]
6 | ---
7 |
8 | 简述一下目前前端可能的各个领域方向。
9 |
10 | ## 前端大方向
11 |
12 | * Web体系:融合跨端以及标准化,在债务逐年积累之后,能看到标准化已日趋成为共识。
13 | * 中后台:成熟场景下,对效率的极致追求,包括低代码工具,上下游研发流程,以及框架的融合(跨框架)。
14 | * Serverless:前端向后的延展,NodeJS 的新代名词,处于基建发展阶段。
15 | * 体验系统:与业务最具结合性,前端角色最具优势的用户行为分析,以及切入数据最佳的角度。
16 | * 智能化:最具创新性的领域,但角色优势、业务落地场景待探索。
17 | * 多媒体 & 图形 & 互动:新体验、新交互。前端广度的探索。
18 | * 数据可视化:伪装成前端的专业领域。
--------------------------------------------------------------------------------
/_posts/2022-04~09/2022-06-20-fix-java-long.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Fix Java Long Number in Javascript"
4 | date: 2022-06-20
5 | tags: [note]
6 | ---
7 |
8 | Fix Java Long Number in Javascript. Just make it to STRING!
9 |
10 | # Short Answer
11 |
12 | Give a mock json that responsed by Java Server like:
13 |
14 | ```json
15 | {
16 | "note": "long json test",
17 | "number1": 123456789,
18 | "number2": 123456789123456789,
19 | "number3": 12345678912345678912345
20 | }
21 | ```
22 |
23 |
24 | ## The bug
25 |
26 | ```js
27 | const res = await fetch('https://systemjs.1688.com/krump/schema/1812.json').then(d => d.json())
28 | console.log(res)
29 | // {note: 'long json test', number1: 123456789, number2: 123456789123456780, number3: 1.234567891234568e+22}
30 | ```
31 |
32 | ## Fix bug
33 |
34 | ```js
35 | let res = await fetch('https://systemjs.1688.com/krump/schema/1812.json').then(d => d.text())
36 | res
37 | // Get all number by regexp
38 | .match(/(\d+)/g)
39 |
40 | // Filter all number that greater than Javascript MAX Number
41 | .filter(t => String(Number(t)) !== t)
42 |
43 | // Replace the Long Number by Javascript String
44 | .forEach(t => {
45 | res = res.replace(t, `"${t}"`);
46 | })
47 |
48 | console.log(res);
49 |
50 | /**
51 | {
52 | "note": "long json test",
53 | "number1": 123456789,
54 | "number2": "123456789123456789",
55 | "number3": "12345678912345678912345"
56 | }
57 | */
58 | ```
--------------------------------------------------------------------------------
/_posts/2022-04~09/2022-07-24-scholar.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "找论文资料"
4 | date: 2022-07-24
5 | tags: [note]
6 | ---
7 |
8 | # 论文列表
9 |
10 | ## 检索
11 |
12 | * https://ac.scmor.com/
13 |
14 | ## 下载
15 |
16 | * [国家哲学社会科学学术期刊](http://www.nssd.cn/)
17 | * 登录账号为邮箱名称
18 | * [汉斯](https://www.hanspub.org/)
19 | * [arxiv](https://arxiv.org/)
20 | * [https://sci-hub.ru/](https://sci-hub.ru/)
21 | * sci-hub.se
22 | * sci-hub.st
23 | * sci-hub.ru
--------------------------------------------------------------------------------
/_posts/2022-04~09/2022-08-21-smart-contract.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Hello Smart Contract"
4 | date: 2022-08-21
5 | tags: [note]
6 | ---
7 |
8 | Hello Smart Contract.
9 |
10 | # Steps
11 |
12 | * https://ethereum.org/en/developers/tutorials/hello-world-smart-contract/#step-4
13 | * We use https://goerlifaucet.com/ instead as Ropsten is deprecated.
14 | *
15 | *
16 |
17 |
18 | * Hello World Contract: https://goerli.etherscan.io/address/0xa30c9ec757022683e062e12abebbdea379f04849
19 |
20 | * Result:
21 | * https://dashboard.alchemyapi.io/explorer/k3njj23z1o4pikzn?time_min=1661071425857&time_range_preset=lastHour
22 | *
23 |
24 | # References
25 | * https://ethereum.org/en/developers/tutorials/hello-world-smart-contract/
--------------------------------------------------------------------------------
/_posts/2022-04~09/2022-08-29-rsa-math.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "RSA Math"
4 | date: 2022-08-29
5 | tags: [note]
6 | use_math: true
7 | ---
8 |
9 | 相关文章:
10 | * [相关链接&私钥格式](https://zhoukekestar.github.io/notes/rsa/note/2016/12/09/RSA-note.html)
11 | * [欧拉&模反](https://zhoukekestar.github.io/notes/2022/08/21/rsa.html)
12 |
13 |
14 |
15 | * [模运算 Wiki](https://zh.wikipedia.org/wiki/%E6%A8%A1%E7%AE%97%E6%95%B8)
16 | * [模运算 Baidu](https://baike.baidu.com/item/%E6%A8%A1%E8%BF%90%E7%AE%97/4376110?fr=aladdin)
17 |
18 | ## 模运算规则(加法)
19 | 证明: $(a_1 + a_2)\ mod\ b = (a_1\ mod\ b + a_2\ mod\ b)\ mod\ b$
20 |
21 | 这个好像没啥好证明的。。。
22 |
23 |
24 | ## 模运算规则(乘法)
25 |
26 | 证明: $(a_1 \times a_2)\ mod\ b = (a_1\ mod\ b \times a_2\ mod\ b) mod\ b$
27 |
28 | 设 $a_1 = k_1 b + c_1; a_2 = k_2 b + c_2, 其中\ {k_1, k_2} \in \mathbb{Z}$
29 |
30 | 代入公式可得,并通过加法规则可知:
31 |
32 | $$
33 | \begin{align*}
34 |
35 | \Rightarrow (a_1 \times a_2)\ mod\ b &= (k_1b + c_1) \times (k_2b + c_2)\ mod\ b
36 |
37 | \\
38 |
39 | &= (k_1b \times k_2b + k_1b \times c_2 + c_1 \times k_2b + c_1 \times c_2 )\ mod\ b
40 |
41 | \\
42 | &= ((k_1b \times k_2b)\ mod\ b + (k_1b \times c_2)\ mod\ b + (c_1 \times k_2b)\ mod\ b + (c_1 \times c_2 )\ mod\ b)\ mod\ b
43 |
44 | \end{align*}
45 | \\
46 | $$
47 |
48 | 其中如果是 $b$ 的倍数,则 $mod b$ 结果为0,包括
49 |
50 | $$
51 | \begin{align*}
52 | \because (k_1b \times k_2b )\ mod\ b &= 0
53 | \\ (k_1b \times c_2)\ mod\ b &= 0
54 | \\ (c_1 \times k_2b)\ mod\ b &= 0
55 | \end{align*}
56 | $$
57 |
58 | 所以,我们能得到如下公式:
59 |
60 | $$
61 | \begin{align*}
62 | \Rightarrow (a_1 \times a_2)\ mod\ b &= (c_1 \times c_2)\ mod\ b, (其中c_1 = a_1\ mod\ b; c_2 = a_2\ mod \ b )
63 | \\
64 | &= ((a_1 \ mod \ b) \times (a_2 \ mod\ b)) mod\ b
65 | \end{align*}
66 | $$
67 |
68 |
--------------------------------------------------------------------------------
/_posts/2022-10~12/2022-10-03-mac-applications.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Mac Applications"
4 | date: 2022-10-03
5 | tags: [note]
6 | ---
7 |
8 | Awesome Applications in the Mac.
9 |
10 | # Alfred
11 |
12 | @see my alfred article.
13 |
14 | Download: [https://xclient.info/s/alfred.html](https://xclient.info/s/alfred.html)
15 |
16 |
17 | # Dozer
18 |
19 | Hide your menu bar icons.
20 |
21 | Download: [https://github.com/Mortennn/Dozer/releases](https://github.com/Mortennn/Dozer/releases)
22 |
23 |
24 | # iRightMouse
25 |
26 | * new file
27 | * open terminal
28 |
29 | Download: [https://apps.apple.com/cn/app/irightmouse/id1497428978?l=en&mt=12](https://apps.apple.com/cn/app/irightmouse/id1497428978?l=en&mt=12)
30 |
31 |
32 | # Go2Shell
33 |
34 | Open terminal on your finder menu.
35 |
36 | Download: [https://zipzapmac.com/Go2Shell](https://zipzapmac.com/Go2Shell)
37 |
38 | # Switch Host
39 |
40 | Download: [https://swh.app/zh](https://swh.app/zh)
41 |
42 | # Screenshot
43 |
44 | * support screenshot with scroll.
45 | * 支持滚动截屏
46 |
47 | Download: [https://zh.xnipapp.com/](https://zh.xnipapp.com/)
48 |
49 |
50 | # Brew
51 |
52 | https://brew.sh/
53 |
54 | Install: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
55 |
56 | # ohmyzsh
57 |
58 | https://github.com/ohmyzsh/ohmyzsh
59 |
60 | Install: `sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"`
61 |
62 | After installing see [zsh](https://zhoukekestar.github.io/notes/2018/01/27/zsh-shell.html)
63 |
64 | add `source ~/.bash_profile` to `~/.zshrc`
65 |
--------------------------------------------------------------------------------
/_posts/2022-10~12/2022-10-11-transform-jspm.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "@jspm/core systemjs"
4 | date: 2022-10-11
5 | tags: [note]
6 | ---
7 |
8 | transfrom @jspm/core to systemjs and load it by `systemjs.1688.com`
9 |
10 | # rollup
11 |
12 | ```js
13 | import * as globby from 'globby';
14 |
15 | const configs = globby.globbySync('./nodelibs/**/*.js').map(inputFile => {
16 | console.log(inputFile);
17 | return {
18 | input: inputFile,
19 | plugins: [
20 | {
21 | name: 'extra',
22 | async resolveId(id, importer) {
23 | if (!importer) return null;
24 | return { id, external: true };
25 | }
26 | }
27 | ],
28 | output: {
29 | file: inputFile.replace('nodelibs', 'nodelibs2'),
30 | format: 'systemjs',
31 | },
32 | };
33 | });
34 |
35 | export default configs;
36 | ```
37 |
38 | # Upload nodelibs to CDN
39 |
40 | pick `nodelibs/browser` to upload.
41 |
42 | # CDN
43 |
44 | so you can load it by `systemjs.1688.com`
45 |
46 | ```js
47 | System.import('https://systemjs.1688.com/@jspm/core@2.0.0-beta.24/nodelibs/browser/querystring.js');
48 | ```
49 |
50 |
--------------------------------------------------------------------------------
/_posts/2022-10~12/2022-10-26-rust-webassembly.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Rust WebAssembly"
4 | date: 2022-10-26
5 | tags: [note]
6 | ---
7 |
8 | Rust WebAssembly Examples.
9 |
10 | # Prepares
11 |
12 | * `wasm-pack` [rustwasm.github.io](https://rustwasm.github.io/wasm-pack/installer/)
13 |
14 | ```sh
15 | $ curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
16 | ```
17 |
18 |
19 | # Steps
20 |
21 | ```sh
22 | $ cargo generate --git https://github.com/rustwasm/wasm-pack-template
23 | $ cd wasm-game-of-life
24 | $ wasm-pack build
25 |
26 | $ npm init wasm-app www
27 | $ cd www
28 | ```
29 |
30 | change package.json
31 |
32 | ```json
33 | {
34 | // ...
35 | "dependencies": { // Add this three lines block!
36 | "wasm-game-of-life": "file:../pkg"
37 | },
38 | "devDependencies": {
39 | //...
40 | }
41 | }
42 | ```
43 |
44 | continue
45 |
46 | ```sh
47 | # you need install again after modify the package json file
48 | $ npm install
49 |
50 | $ npm start
51 | ```
52 |
53 |
54 |
--------------------------------------------------------------------------------
/_posts/2022-10~12/2022-11-05-population.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "中国人口"
4 | date: 2022-11-05
5 | tags: [note]
6 | ---
7 |
8 | 中国人口结构金字塔数据
9 |
10 | # 年龄结构
11 |
12 | * https://worldpopulationreview.com/countries/china-population
13 | * https://population.un.org/wpp/Graphs/DemographicProfiles/Pyramid/156
14 |
15 |
16 | # 明细数据
17 |
18 | 数据下载可通过联合国的[可视化工具](https://population.un.org/dataportal/data/indicators/47/locations/156/start/1990/end/2030/pyramid/pyramidagesexplotsingle) 进行。
19 |
20 | # 在线明细查看
21 |
22 | [https://china-data.github.io/population/public/index.html](https://china-data.github.io/population/public/index.html)
--------------------------------------------------------------------------------
/_posts/2023-01~03/2023-01-08-mmx.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "MMX vs SSE"
4 | date: 2023-01-08
5 | tags: [note, system]
6 | ---
7 |
8 | 时间线为 MMX - 3DNow! - SSE,都是 SIMD 技术。
9 |
10 | # 简介
11 |
12 | MMX 可以认为是 `Matrix Math eXtension.` 的缩写,主要用于对多媒体数据的性能提升。
13 |
14 | MMX 仅支持整数运行,如果是浮点运算,需要传统的 x87 协处理器,但 MMX 和 x87 的寄存器相互重叠,所以 MMX 做大量的浮点运算时,需要频繁切换用户状态。
15 |
16 | 3DNow!的出现(AMD),就是为了解决 MMX 上浮点运算的问题,并通过向量寄存器支持浮点向量计算,将性能提升了 2 ~ 4 倍。
17 |
18 | > 3DNow! is a deprecated extension to the x86 instruction set developed by Advanced Micro Devices (AMD). It adds single instruction multiple data (SIMD) instructions to the base x86 instruction set, enabling it to perform vector processing of floating-point vector operations using vector registers, which improves the performance of many graphics-intensive applications.
19 |
20 | 随后,Intel 为了争夺此市场,推出了 SSE(Streaming SIMD Extensions) 技术。通过添加额外的 XMM 寄存器和浮点指令,来解决了原来的问题。
21 |
22 | > Intel's first IA-32 SIMD effort was the MMX instruction set. MMX had two main problems: it re-used existing x87 floating-point registers making the CPUs unable to work on both floating-point and SIMD data at the same time, and it only worked on integers. SSE floating-point instructions operate on a new independent register set, the XMM registers, and adds a few integer instructions that work on MMX registers.
23 |
24 | # References
25 |
26 | * [MMX](https://en.wikipedia.org/wiki/MMX_(instruction_set))
27 | * [3DNow!](https://en.wikipedia.org/wiki/3DNow!)
28 | * [什么是SSE MMX和SSE的区别](https://www.elecfans.com/d/1186107.html)
29 |
--------------------------------------------------------------------------------
/_posts/2023-01~03/2023-01-15-i386-3.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "80386 模拟器源码分析 (3)"
4 | date: 2023-01-15
5 | tags: [note, system]
6 | ---
7 |
8 | # NASM
9 |
10 | 参考 [NASM tutorial](https://www.tutorialspoint.com/assembly_programming/assembly_basic_syntax.htm),新建一个 `hello.asm` 文件
11 |
12 | ```asm
13 | section .text
14 | global _start ;must be declared for linker (ld)
15 |
16 | _start: ;tells linker entry point
17 | mov edx,len ;message length
18 | mov ecx,msg ;message to write
19 | mov ebx,1 ;file descriptor (stdout)
20 | mov eax,4 ;system call number (sys_write)
21 | int 0x80 ;call kernel
22 |
23 | mov eax,1 ;system call number (sys_exit)
24 | int 0x80 ;call kernel
25 |
26 | section .data
27 | msg db 'Hello, world!', 0xa ;string to be printed
28 | len equ $ - msg ;length of the string
29 | ```
30 |
31 | ```sh
32 | # 进入 docker i386
33 | $ docker exec -it xxx bash
34 |
35 | # 安装 nasm 和 llvm
36 | $ apt-get install nasm
37 | $ apt-get install llvm
38 |
39 | # 编译 & 测试
40 |
41 | $ nasm -f elf hello.asm
42 | $ ld -m elf_i386 -s -o hello hello.o
43 | $ ./hello
44 | Hello, world!
45 | ```
46 |
47 | 调试
48 |
49 | https://stackoverflow.com/questions/13506629/lldb-break-at-address
50 |
51 | ```sh
52 | $ nm ./hello
53 | nm: ./hello: no symbols
54 | $
55 | ```
56 |
57 | # References
58 | * [NASM vs GCC](https://www.quora.com/What-is-the-difference-between-NASM-and-GCC-assembly-programming)
59 | * [X86 assembly language](https://en.wikipedia.org/wiki/X86_assembly_language#Syntax)
60 | * [NASM](https://en.wikipedia.org/wiki/Netwide_Assembler)
61 | * [NASM tutorial](https://www.tutorialspoint.com/assembly_programming/assembly_basic_syntax.htm)
62 | * [x86 Assembly Language Programming](https://cs.lmu.edu/~ray/notes/x86assembly/)
63 |
--------------------------------------------------------------------------------
/_posts/2023-01~03/2023-02-03-feture.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "个人几个论断(讨论)"
4 | date: 2023-02-03
5 | tags: [note]
6 | commentIssueId: 125
7 | ---
8 |
9 | 简单记录一下个人现有前端职业的几个论断:
10 |
11 | # 描述
12 |
13 | * 目前有两条路:P & M(即技术路线与管理路线)
14 | * 中层管理不是个好方向
15 | * 未来的组织形态,更多的应该是以业务形态的小单元,而非 ”大管理“ 形态
16 | * 强调个性化、去中心化、自组织形态,海尔的[人单合一](https://finance.sina.cn/2017-10-31/detail-ifynfvar5390659.d.html)是不错的实践
17 | * 【批判】可以不走这个方向,但依旧需要了解管理相关内容
18 | * 技术路线更贴合性格、趋势
19 | * 性格:不适合管理、做生意等,更想安静地捣鼓些东西
20 | * 趋势:中美技术战,将国内技术往更底层的方向进发,有较大潜力与空间
21 | * 【批判】或许国内的基础研究需要非常长的时间才能形成相关环境
22 | * 核心竞争力
23 | * 延续前端,并贴合前端相关的技术栈,目前较好的方向是 rust,并由此衍生出的 vm、操作系统、cpu
24 | * 做差异化竞争,能提现出相关竞争力的
25 | * 方向,贴合 WebAssembly 与 Rust,可能的好的方向
26 | * Web3.0,包括 区块链、vm、去中心化社交等(元宇宙等重 3D 体验的,和游戏行业相比不具备竞争力)
27 | * 工业级软件,大型基础、工业级软件往 WebAssembly 的一次升格,窗口期可能是近 10 年
28 | * 【批判】从后端视角来看,node 是失败的,与 Java 相比,生态、稳定性目前暂比不了
29 | * 【疑问】Golang 是后端,为了差异化竞争,非选 Rust 不可吗?不过 Rust 和 WebAssembly 结合目前是最好的。
30 | * 其他路线(做生意、饭馆、奶茶)
31 | * 非性格所向
32 | * 不具备核心竞争力
33 |
34 |
35 | # 小结
36 |
37 | * 前端需往底层突破,且 WebAssembly 是极其重要的突破口
38 | * 以 WebAssembly 为基础,抓住 Rust 的机遇窗口期。
39 | * 以这个窗口期为基准
40 | * 一方面往 WebAssembly 往回走,走工业级软件的方向(和现有前端差异较小)
41 | * 另一方面继续往前,走 Web3.0 方向(和现有前端差异较大)
42 |
43 |
44 | 欢迎相关职能岗位留言讨论 ~
45 |
--------------------------------------------------------------------------------
/_posts/2023-01~03/2023-02-05-cpu-simulator.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "CPU 模拟器"
4 | date: 2023-02-05
5 | tags: [note]
6 | ---
7 |
8 | * https://github.com/pddring/cpu-simulator
9 | * https://github.com/Rajdeep-Das/CPU-Simulator
10 | * https://github.com/seliane/GCSx64
11 | * https://github.com/ShawnZhong/JsSpim
12 |
--------------------------------------------------------------------------------
/_posts/2023-01~03/2023-02-11-intel-4004.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Intel 4004"
4 | date: 2023-02-07
5 | tags: [note]
6 | ---
7 |
8 |
9 | # intel 4004
10 |
11 | http://www.e4004.szyc.org/emu/
12 | https://www.4004.com/
13 | https://github.com/zhoukekestar/intel-4004-emulator-rust
14 |
15 |
16 | # references
17 | * [4004_datasheet.pdf](https://web.archive.org/web/20110601032753/http://www.intel.com/Assets/PDF/DataSheet/4004_datasheet.pdf)
18 | * https://github.com/codeabbey/heavy-data-1/tree/gh-pages
19 |
--------------------------------------------------------------------------------
/_posts/2023-01~03/2023-03-17-product.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "产品与价值"
4 | date: 2023-03-17
5 | tags: [note]
6 | ---
7 |
8 | 之前有一篇关于 [产品与产品化](https://zhoukekestar.github.io/notes/2020/02/18/product.html) 的文章。在阿里重运营、轻产品的背景下,想了想产品价值的体现。
9 |
10 | 首先,阿里客户第一的价值观是没错的,因为所有的商业逻辑,都是围绕解决客户诉求出发的。所谓华尔街的股东第一和阿里客户第一的理念冲突,本质上是一样的,因为华尔街的客户就是股东。
11 |
12 | 而产品本身就是承接客户诉求的载体,之前聊到产品化也是定位人群、定位诉求的过程。
13 |
14 | 客户诉求的方式、方法有很多,所以可选的产品也很多,怎么选产品的过程,其实就是所谓产品心智。低价我去拼多多,旗舰店我去天猫等等。产品心智是客户解决自身诉求的决策依据。
15 |
16 | 有了特定的产品满足特定群体的特定诉求之后,才是商业化的问题。早些年,互联网的产品很多,但都是后来才探索出广告、订阅制等商业化模式。
17 |
18 | 有了商业模式后,产品本身才体现除了业务、商业价值,如果能与客户诉求持续联动,也就形成的所谓的商业闭环。
19 |
--------------------------------------------------------------------------------
/_posts/2023-01~03/2023-03-17-project-mange.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "项目管理"
4 | date: 2023-03-17
5 | tags: [note]
6 | ---
7 |
8 | 其实我一直挺不喜欢 “管理” 这个词,因为我觉得,大家都是高素质人才、自驱型的,管理的必要性其实已经下降很多了。
9 |
10 | 项目管理的本质,我认为是共识达成、信息沟通的过程。所谓的能力也就如此。
11 |
12 | 从错误的经验来看,如果更详细地描述问题。老板如果觉得项目管理乱,无非是两点:1、目标模糊,2、节奏不定。
13 |
14 | 解决方案也简单:和所有项目相关方,保持密切、频繁的沟通,保证信息差是在较低水位的。
15 |
--------------------------------------------------------------------------------
/_posts/2023-04~09/2023-05-02-search.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "国内搜索"
4 | date: 2023-05-02
5 | tags: [note]
6 | ---
7 |
8 |
9 | 由于国内搜索生态比较闭环,在搜索相关内容的时候,还是有些迷茫,所以简单列举一下搜索渠道
10 |
11 | * 能直接通过搜索引擎搜索出来的,比如:百度、bing、Google
12 | * 比如:知乎、微博
13 | * 闭环生态,微信公众号、抖音视频等
14 | * 很多 3、4 线城市的内容,都集中在抖音上
15 | * 间接搜索,比如装修用到,可以在 app store 搜索装修
16 | * 比如:万师傅、奇兵到家、鲁班到家,然后找关联 app
17 | * 学术内容:论文、期刊、报告
18 | * 公司内的有:语雀、ata、钉钉消息、钉钉文档、aone 等等。
19 |
--------------------------------------------------------------------------------
/_posts/2023-04~09/2023-05-29-postgresql.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "postgresql quick start"
4 | date: 2023-05-29
5 | tags: [note]
6 | ---
7 |
8 |
9 | # install psql
10 |
11 | ```sh
12 | $ brew install libpq
13 | ```
14 |
15 | # connect
16 |
17 | ```sh
18 | $ psql -h xxx.com -p 5432 -U lighthouse
19 |
20 | ```
21 |
22 | # create db
23 |
24 | ```sh
25 |
26 | lighthouse-> \l
27 | List of databases
28 | Name | Owner | Encoding | Collate | Ctype | ICU Locale | Locale Provider | Access privileges
29 | ------------+------------+----------+------------+------------+------------+-----------------+---------------------------
30 | adbpgadmin | adbpgadmin | UTF8 | en_US.utf8 | en_US.utf8 | | libc |
31 | (6 rows)
32 |
33 |
34 | CREATE TABLE pipe_test_table (
35 | first integer not null default 0,
36 | second text);
37 | ```
38 |
39 | # insert
40 |
41 | ```sh
42 | lighthouse=> INSERT INTO pipe_test_table VALUES (1,'content');
43 | lighthouse=> INSERT INTO pipe_test_table VALUES (2,'pipe_test');
44 | INSERT 0 1
45 | lighthouse=> select * from pipe_test_table;
46 | first | second
47 | -------+-----------
48 | 1 | content
49 | 2 | pipe_test
50 | (2 rows)
51 | ```
52 |
53 | # References
54 |
55 | * [https://www.postgresql.org/docs/current/app-psql.html](https://www.postgresql.org/docs/current/app-psql.html)
56 | * [https://www.tutorialspoint.com/postgresql/postgresql_java.htm](https://www.tutorialspoint.com/postgresql/postgresql_java.htm)
57 |
--------------------------------------------------------------------------------
/_posts/2023-04~09/2023-06-20-org.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "组织管理与意识"
4 | date: 2023-06-20
5 | tags: [note]
6 | ---
7 |
8 | 组织管理,以及管理本身,很大程度上是在管理思想、意识。
9 |
10 | # 意识管理的重要性
11 |
12 | 首先,对意识形态管理的重要性,对我冲击最大的是:
13 |
14 | * [喊口号就能让战士往上冲?解密战时政治动员有多复杂](https://www.bilibili.com/read/cv23386551/)
15 | * [从《长空之王》到《上甘岭》,人民军队为什么强?](https://baijiahao.baidu.com/s?id=1765604672916245818&wfr=spider&for=pc)
16 |
17 | > 为何我军能面对高伤亡而不溃败,并且保持强大的战斗力?秘密就在思想政治工作。
18 | > 战后,原南京陆军学校1981年出版的教材总结八连胜利的原因为”党支部坚强有力的领导和及时有力的思想政治工作,是在残酷情况下长期坚守坑道并取得 最后胜利的首要因素”
19 |
20 | 从党史和近代史上,其实能吸取非常多知识、经验、教训。
21 |
22 | 而落地执行这些思想管理的制度就是:支部建在连上,可见对思想工作的重视程度。
23 |
24 | # 意识与物质、实践
25 |
26 | 从马克思主义哲学的视角来解释意识:意识仅仅是对物质世界的反映。主观认识世界后,其意识的能动作用,最终是通过实践来改造世界,而从达到自身目的。
27 |
28 | 所以,从这个视角来看,很多意识形态、态度、想法,都是所谓的 “经验主义”。管理、统一组织的意识形态,通常来说是非常困难的,因为个体的经验都千差万别。当然,从较为自私的视角来做管理的话,是可以按 “乌合之众” 的思路来做较为有效的落地的。
29 |
30 | # 意识的统一管理
31 |
32 | 上面说到意识的统一管理通常是非常困难的,改变一个人的态度、思维也异常困难,所以,从上诉视角,可以从两个方面来做尝试做统一:
33 |
34 | * 意识改变:通过意识的本质,不难发现只需对物质世界的重新认识,就能达到此目的。
35 | * 目的改变:一般来讲,目的的变化有从小到大,从具体到抽象。将自身的具体目的,抽象为群体的抽象目的。
36 |
37 |
38 | # 补充
39 |
40 | * 信息帝国主义
41 | * 个人视角
42 |
43 | # 参考
44 |
45 | * [喊口号就能让战士往上冲?解密战时政治动员有多复杂](https://www.bilibili.com/read/cv23386551/)
46 | * [为什么管理者必须要大量阅读?](https://mp.weixin.qq.com/s/p4OUvyx8edUlc1JyUFQUTA)
47 | * [从《长空之王》到《上甘岭》,人民军队为什么强?](https://baijiahao.baidu.com/s?id=1765604672916245818&wfr=spider&for=pc)
48 |
--------------------------------------------------------------------------------
/_posts/2023-04~09/2023-09-12-economic.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "经济系统"
4 | date: 2023-09-12
5 | tags: [note]
6 | ---
7 |
8 | [经济系统](https://en.wikipedia.org/wiki/Economic_system) 目前分为资本主义、社会主义、共产主义。 对于这三者的关系,应从连续、变化、辩证的角度看,而非独立、绝对地看待。
9 |
10 | 社会主义从资本主义的视角看,是国家垄断资本主义。
11 |
12 | 而资本主义,从封建社会来看,是非常大的进步。
13 |
14 | 封建社会,对于原始的部落族群来看,对社会组织和分工也有质的提升。
15 |
16 | 原始部落,对于单个人来说,就如群狼一样,在原始环境中,占有竞争优势。
17 |
18 | 总的来看,社会组织形态都处于不断地上升过程中,都往向好的方向发展。
19 |
20 | 待续...
21 |
22 | # 对于明清为什么没有发展现代资本主义的摘录
23 |
24 | * 战争的好处:驱动着西方社会在科技、生产和组织方面的积累发展。
25 | * 儒家思想统治下长期稳定政治的坏处:商人无法利用财富获取政治、军事和意识形态的权利。
26 |
27 | # 参考
28 |
29 | * [赵鼎新:为什么“领先世界”的明清没有发展出现代资本主义?](https://mp.weixin.qq.com/s/H_2_AW5RUUM8dde_Tb6PrQ)
30 | * [经济系统](https://en.wikipedia.org/wiki/Economic_system)
31 |
--------------------------------------------------------------------------------
/_posts/2023-10~12/2023-10-12-autostart2.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Linux 自启动 2"
4 | date: 2023-10-11
5 | tags: [note]
6 | ---
7 |
8 | 由于部分 LLM 需要自启动执行,故简要记录一下。
9 |
10 | # 命令
11 |
12 | ```sh
13 | $ scp ./feedback-ai.tar.gz root@xx.xx.xx.xx:/root
14 | $ ssh root@xx.xx.xx.xx
15 |
16 | ```
17 |
18 | # remote
19 |
20 | ```sh
21 | $ cd /root
22 |
23 | # unzip archive
24 | $ tar -zxvf feedback-ai.tar.gz
25 | $ unzip -a Archive.zip
26 |
27 | $ cd feedback-ai
28 | $ pip3.11 install -r ./requirements.txt
29 | $ python3.11
30 | ```
31 |
32 | # Python Execute Path
33 |
34 | ```sh
35 | $ which python3.11
36 | $ where python3.11
37 | ```
38 |
39 | # AutoStart Scripts
40 |
41 | ```bash
42 | #!/bin/bash
43 |
44 | now=$(date +"%I:%M:%S")
45 | echo "autostart.sh at $now" >> /root/log
46 |
47 |
48 | nvidia-smi >> /root/log
49 |
50 | nohup /usr/local/bin/python3.11 /root/ai/index.py >> /root/ai/log &
51 |
52 | now=$(date +"%I:%M:%S")
53 | echo "autostart.sh end $now" >> /root/log
54 |
55 | ```
56 |
--------------------------------------------------------------------------------
/_posts/2023-10~12/2023-10-20-Thinking-in-AI.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "AI 小记"
4 | date: 2023-10-20
5 | tags: [note, AI]
6 | ---
7 |
8 | 本文简要记录一下关于 AI 的想法。
9 |
10 | # 引用
11 |
12 | 互联网本质上处理的是海量数据,它解决的是信息流转和匹配的效率,核心价值在于解决信息不对称的问题,让信息尽可能地流通匹配,减少信息不对称而带来各种各样的摩擦。
13 |
14 | AI时代,AI最本质解决的问题是处理海量知识,不再是数据,也不仅仅是信息,是通过对数据和信息的加工产生的知识,这个知识跟原有知识的结合去解决实际问题,所以AI解决的是决策的效率与成本。
15 |
16 | # 想法
17 |
18 | ## 目的与手段
19 |
20 | * AI 是手段
21 | * 目的是需求
22 | * 于公司是客户价值,于个人是马斯洛需求
23 |
24 | 于公司而已,还是需要紧紧围绕客户价值出发,从重要紧急的维度来实现公司存在的价值,切不可拿着 AI 的锤子到处找钉子。
25 |
26 | 围绕客户价值,解决之,始终是目的。能用 AI 则用 AI,不能用则放弃。
27 |
28 |
29 | ## 数据与知识
30 |
31 |
32 | 
33 |
34 | 如果说 AI 是处理海量知识,那数据与知识存在的鸿沟依旧客观存在。
35 |
36 | 如果 AI 是能较好解决总结知识、抽象知识的价值,那数据如何大规模转化为知识是一个重要课题。
37 |
38 |
39 | # References
40 |
41 | * [曾鸣最新演讲全文:下一个10年,商业的底层设施变了!](https://mp.weixin.qq.com/s/oFGXScZFVedB7YYraZTRxQ)
42 | * [【曾鸣演讲全文】看十年:智能商业大爆发](https://mp.weixin.qq.com/s/RjRZkTJkWJsXTxcgBhaaqQ)
43 | * [需求层次理论](https://zh.wikipedia.org/wiki/%E9%9C%80%E6%B1%82%E5%B1%82%E6%AC%A1%E7%90%86%E8%AE%BA)
44 |
--------------------------------------------------------------------------------
/_posts/2023-10~12/2023-10-30-talk.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "刘润《进化的力量》笔记概要"
4 | date: 2023-10-22
5 | tags: [note, proxy]
6 | ---
7 |
8 | 刘润《进化的力量》笔记概要
9 |
10 | # 笔记
11 |
12 | * 经济的复杂性
13 | * 举了典型的一个大众消费例子:圆明园的游园人员(在说明问题的时候,举典型例子比较有说服力)
14 | * 宏观的经济数据,人均消费减少
15 | * 举例天猫、京东双11
16 | * 上海南京的奢侈品店消费增长
17 | * 中国消费市场,一边的消费降级、一边的消费升级,显示出经济的复杂性
18 | * 全球经济
19 | * 消费降级、股市上涨、公司大规模裁员、历史性投资
20 | * 经济扑朔迷离、自相矛盾 =》 寒武纪大爆发
21 | * 寒武纪大爆发
22 | * 原因:雪球地球事件、氧气、捕食者
23 | * 现有经济的乱麻,也是多个原因:增长收敛,人口老化,情绪生长,智能涌现,服务崛起,和出海加速。(世界本身就具备多样的复杂性,
24 | * 增长收敛
25 | * 宏观 GDP 经济(必然的趋势)
26 | * 人口老化
27 | * 情绪生长
28 | * 智能涌现
29 | * 服务崛起
30 | * 出海加速
31 | * 逆风局
32 | * 正面案例
33 |
34 |
35 |
36 | # 参考文章
37 |
38 | * [进化的力量](https://mp.weixin.qq.com/s/oJ1n0lQwTJY81ZazrL4raA)
39 |
--------------------------------------------------------------------------------
/_posts/2023-10~12/2023-11-25-harmonyos.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "OS 小记"
4 | date: 2023-11-25
5 | tags: [note, cs]
6 | ---
7 |
8 |
9 | # OS
10 |
11 | 操作系统旨在管理计算机硬件(CPU、内存)和软件(进程、文件)资源,并为上层的应用程序提供公共服务的系统软件。Operating_system
12 |
13 |
14 | # RTOS vs GPOS
15 |
16 | 实时操作系统与通用操作系统的核心区别在于对任务的管理,实时操作系统能保证(排除 GPOS 的随机性)高优先级任务的执行。
17 |
18 | 在 RTOS 中涉及互斥资源时,会使用优先级倒置的方式,比如:低优先级的 Task2 控制资源的时候,优先等待资源执行并释放,随后才可接管并以高优先级执行直到结束RTOS 。
19 |
20 | 
21 |
22 | 和 GPOS 的区别如下所示RTOS vs GPOS :
23 |
24 | 
25 |
26 | * GPOS 中,高优先级执行并等待低优先级的资源解锁,随后在新的时间分片上获取资源并执行
27 | * RTOS 中,高优先级任务始终先执行,执行至需要资源时,倒置资源依赖,并等待解锁后立即接管,并执行至结束
28 |
29 | RTOS 的核心在于高优先级的任务始终是能最快速处理,是抢占式的,优先级是任务执行的主要因素,以此能够获取更为确定、可预期的执行顺序和结果。Summary of comparison
30 | 这在嵌入式系统的专有领域,有较为合适的场景,比如:火箭、医疗等领域。
31 |
32 |
33 |
34 | # LiteOS
35 |
36 | * [LiteOS](https://gitee.com/LiteOS/LiteOS/tree/master)
37 | * [LiteOS for OpenHarmony](https://gitee.com/openharmony/kernel_liteos_m)
38 |
39 |
40 |
41 |
42 | # References
43 |
44 | * [LiteOS](https://en.wikipedia.org/wiki/LiteOS)
45 | * [RTOS](https://predictabledesigns.com/introduction-to-real-time-operating-systems-rtos-for-use-in-embedded-systems/)
46 | * [RTOS vs GPOS](https://es.cs.rptu.de/publications/datarsg/Neuh22.pdf)
47 | * [Summary of comparison](https://www.slideshare.net/coolmirza143/introduction-to-realtime-operating-systems)
48 | * [Operating_system](https://en.wikipedia.org/wiki/Operating_system)
49 |
--------------------------------------------------------------------------------
/_posts/2023-10~12/2023-12-18-lit-flow.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Lit Flow"
4 | date: 2023-12-18
5 | tags: [note]
6 | ---
7 |
8 | lit execute flow
9 |
10 |
11 | # Lit Execute Flow
12 |
13 |
14 | 
15 |
--------------------------------------------------------------------------------
/_posts/2024-01~03/2023-12-30-jvm.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "JVM"
4 | date: 2024-01-05
5 | tags: [note]
6 | ---
7 |
8 | [mini-jvm](https://github.com/guxingke/mini-jvm)
9 |
10 |
11 | * [Toy JVM by Go](https://github.com/zserge/tojvm/blob/master/vm.go)
12 | * https://zserge.com/posts/jvm/
13 | * https://github.com/tdiant/TinyJVM
14 | * https://github.com/Anilople/javajvm
15 | * https://github.com/guxingke/mini-jvm
16 |
--------------------------------------------------------------------------------
/_posts/2024-01~03/2024-01-10-alfred.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Alfred"
4 | date: 2024-01-10
5 | tags: [note]
6 | ---
7 |
8 | Alfred Quick Script Demo
9 |
10 | # Shell
11 |
12 | Google Search Demo
13 |
14 | * new script filter
15 | * edit shell script likes below:
16 |
17 | ```sh
18 | cat << EOB
19 | {"items": [
20 | {
21 | "autocomplete": "google search",
22 | "title": "google search",
23 | "valid": true,
24 | "subtitle": "google search",
25 | "arg": "https://www.google.com.hk/search?q=$1"
26 | }
27 | ]}
28 | EOB
29 | ```
30 |
31 | * check argument required
32 | * uncheck Alfred filters results
33 | * with input as argv, and add `$1` to your arg
34 |
35 | 
36 |
37 | * add `{query}` to URL input
38 |
39 | 
40 |
41 |
42 | # NodeJS
43 |
44 | ```sh
45 | ~/bin/node-v18.9.1-darwin-arm64/bin/node index.mjs "{query}"
46 | ```
47 |
48 | Request with local Chrome cookies by [chrome-cookies-secure](https://anpm.alibaba-inc.com/package/chrome-cookies-secure#jar-used-with-request)
49 |
50 | # fzf search
51 |
52 | * https://github.com/yohasebe/fzf-alfred-workflow/tree/main
53 |
54 | # References
55 |
56 | * [https://zhoukekestar.github.io/notes/2022/09/28/alfred.html](https://zhoukekestar.github.io/notes/2022/09/28/alfred.html)
57 |
--------------------------------------------------------------------------------
/_posts/2024-01~03/2024-03-03-salary.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "2024 市场与薪酬小记"
4 | date: 2024-03-03
5 | tags: [life]
6 | ---
7 |
8 | 参阅:[Randstad:2024年中国市场展望与薪酬报告](https://www.199it.com/archives/1674084.html) 后的小记。
9 |
10 | ## 总览
11 |
12 |
13 | > 当前经济大环境下,加速转型是企业对抗风险、稳定经营、维持增长的必经之路。
14 | >
15 | > `数智化、国产化、出海、绿色转型`,这四股势不可挡的浪潮正深刻地塑造着中国经济格局
16 | >
17 | > 成为推动经济持续发展的强大引擎,也是引领人才市场变革的关键动力。
18 |
19 |
20 | 其中国产化、绿色转型更多是出于国际关系、社会责任的考量,偏务虚些。数字化、智能化、出海,是目前与自身关系比较紧密的几个大方向与趋势。后续相关动作为:
21 |
22 | * 数字化中,持续做好数据的新一代石油的发现(打点)、挖掘(分析),并结合前端与用户贴近的优势,做好用户体验、用户习惯的分析,和相关岗位(DA数据支持、BI市场分析、后端业务数据)做差异化竞争,紧紧抓住「用户」这个牛鼻子。
23 | * 智能化中,在用户数据基础之上,积极主动地、适时地借用 AI 的能力,将大规模的数据处理、洞察推向新的高度,并始终围绕「用户」,做出更大的用户价值创造。
24 | * 出海,在有相应机会的情况,应积极探索海外的用户价值挖掘,结合技术相关学习,往广度(海外部署)、深度(AI)等持续打造个人技术壁垒。
25 |
26 | 以上,都因顺势而为,极致优化 ROI。
27 |
28 | ## 明细
29 |
30 | 通过查询 `100,000` 薪资的岗位,将文中与技术关系较为接近的数据做了提取,并试图洞察在现有情况下,最具“钱景” 的岗位做筛选。
31 |
32 | 相关 [筛选后的表格](https://docs.google.com/spreadsheets/d/1z0gZzfxLHIUEi2dMuvMMcrEBX059IRLa3PiTwOO1O_M/edit#gid=299273085)
33 |
34 | 小结如下:
35 |
36 | * 高薪岗位集中在科技与数字化、芯片、汽车、金融科技等 4 大行业中,科技与数字化行业与个人技术结合比较紧密。如果做跨行业选择,可选的方向是芯片、汽车、金融科技
37 | * 从保底的底薪角度看,前端如果往上走,空间还很大。
38 | * 
39 | * 从高薪空间来看,岗位天花板已经显现。可以选择也很多。。。额,前端高薪到头 50k 差不多上限了。
40 | * 关键词有:渗透、数据、算法
41 | * 
42 |
43 |
--------------------------------------------------------------------------------
/_posts/2024-01~03/2024-03-05-positive.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "乐观总是更好的选择"
4 | date: 2024-03-10
5 | tags: [life]
6 | ---
7 |
8 | 乐观总是更好的选择,无论是从过去的历史、当下的意识、未来的目标来看,亦或是辩证的乐观、乐观的利益,都是更好的选择。
9 |
10 | ## 过去的历史
11 |
12 | 首先历史总是往「美好的方向」发展的。这种方向性,是人在社会活动的必然,是不以个人的意志为转移的社会力量所推动的,即恩格斯所说的“总的合力”。而其方向是美好的,则是以大多数人追求和所向往的目标所驱使,大体上看,所追求和向往的便是「人所谓的美好」,但并不带代表其对其他事物也是美好的。
13 |
14 | 这也是正义打败邪恶、廉洁打败腐败、好人打败坏人这种朴素思想的必然性,因为这不符合生产力与生产关系的发展规律,也不符合大多数的利益。
15 |
16 | ## 当下的意识
17 |
18 | 既然历史发展的方向是美好的,其历史存在,便可决定我们的意识可以是个乐观主义。乐观是种主观的态度,但对我们的行为指导、社会实践带来了更多的积极因素。其积极主观的能动作用,便可贯穿其整个生产劳动实践的过程,自然会产生更为积极乐观的劳动成果。
19 |
20 | 有些谚语也可一表其理:态度决定一切;梦想要有,万一实现了呢?
21 |
22 |
23 | ## 未来的目标
24 |
25 | 从对美好生活的追求来看,无非是安全的生存条件、富足的物质生活、积极的精神状态。当生存与物质需求得到满足的,其乐观、积极的精神状态本身,就是我们所追求的目标。那将乐观的态度作用于当下的实践过程,何乐而不为呢?因为乐观本身即是目的。
26 |
27 | ## 辩证的乐观
28 |
29 | 乐观相对悲观而存在,有人、有时悲观方显得乐观有意义。辩证的乐观相对盲目的乐观或悲观,更有其实践意义。辩证的乐观,要求我们看到实践过程的困难与挫折,并直面它、解决它,否则否极泰来、乐极生悲,便得不偿失。
30 |
31 | 真的勇士,正视鲜血、直面惨淡,看清生活本质之后,依旧乐观地热爱。
32 |
33 | ## 乐观的利益
34 |
35 | 天下熙熙皆为利来,天下攘攘皆为利往。社会中的人,本质上都为自身利益的最大化而努力。人性如此,但看的角度依旧可以乐观。
36 |
37 | 从谚语来讲:傻人总归是有傻福的。在不涉及自己核心利益的基础上,乐观的让利,会让自己成为最好的合作伙伴。从哲学意义的角度看,傻人天真的乐观,是历史的必然、当下积极实践的指导思想、是人所追求美好生活的理想精神状态。
38 |
39 |
40 | ## 其他
41 |
42 | > 补充:历史发展具有方向性,美好也可能代指更高级的社会形态,这也非不经挫折、自动实现的美好,是充满斗争和革命性的。
43 | >
44 | > 人们总是通过每一个人追求他自己的、自觉预期的目的来创造他们的历史,
45 | > 而这许多按不同方向活动的愿望及其对外部世界的各种各样作用的合力,就是历史。
46 | >
47 | > -- 恩格斯
48 |
--------------------------------------------------------------------------------
/_posts/2024-01~03/2024-03-28-gemini.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Gemini SDK"
4 | date: 2024-03-28
5 | tags: [note]
6 | ---
7 |
8 | Intergrate with [Gemini](https://gemini.circumlunar.space/) in nodejs.
9 |
10 | # Proxy
11 |
12 | `@google/generative-ai` is not support proxy now, but i found a solution in this [PR](https://github.com/google/generative-ai-js/pull/38/files)
13 |
14 | so we can use this [gist](https://gist.github.com/zhoukekestar/daec061180101892c3b0c239df2e051a)
15 |
16 | # Quick Start
17 |
18 | * `npm i node-fetch https-proxy-agent @google/generative-ai`
19 | * `export http_proxy=http://127.0.0.1:1087 https_proxy=http://127.0.0.1:1087` to set your proxy
20 | * `touch index.mjs`
21 |
22 | The code is fellowing:
23 |
24 | ```js
25 | import { GoogleGenerativeAI } from '@google/generative-ai'
26 | // const { GoogleGenerativeAI } = require("@google/generative-ai");
27 |
28 | // Access your API key as an environment variable (see "Set up your API key" above)
29 | const genAI = new GoogleGenerativeAI(process.env.API_KEY)
30 |
31 | // ...
32 |
33 | // For text-only input, use the gemini-pro model
34 | const model = genAI.getGenerativeModel({ model: 'gemini-pro' })
35 |
36 | // ...
37 |
38 | async function run () {
39 | const prompt = 'hi'
40 |
41 | const result = await model.generateContent(prompt)
42 | const response = await result.response
43 | const text = response.text()
44 | console.log(text)
45 | }
46 |
47 | run()
48 | ```
49 |
50 |
51 | # Run
52 |
53 | * `API_KEY=xxx node index.mjs`
54 |
--------------------------------------------------------------------------------
/_posts/2024-04~06/2024-04-20-manage.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "技术管理 36 讲笔记"
4 | date: 2024-04-20
5 | tags: [book]
6 | ---
7 |
8 | 记录一下技术管理的一些笔记。
9 |
10 | # 管理图谱
11 |
12 | 管理图谱中,从全局和公司视角看,个人认为最重要的是 “成事” (对于大部分中层管理者来说)。
13 | * 首先角色认知是自我意识和认知的事,对于个人来说,确实是第一位的,但对公司来说,一定是否定的。
14 | * 管理规划、团队建设、任务管理
15 | * 识方向,从业务视角看,更多是上层战略的拆解,从技术视角看,更多是对业务的适配及实现。
16 | * 带人方向,从公司视角看,管理成人人可替代才是重要的、才是成功的。
17 | * 管理沟通更多是润滑剂,是服务目标达成、服务于成事本身的,而非其他,或者其他的更多的是次要因素。
18 |
19 | 所以,从个人视角看,“任务管理” 这个词可能显得过于狭隘,“成事” 可能是中层管理最为核心的要素,是其中的主要矛盾,围绕 “成事” 这个核心,其余的工作内容都是服务于此。
20 |
21 | 当然,这是要考虑不同阶段的,辩证看待的。随着时间推移,“方向” 可能是最重要的,一定要结合具体情况来抓住主要矛盾。
22 |
23 | 
24 |
25 |
26 | # 沟通
27 |
28 | 3F(fact、feeling、focus)事实、感受、意图,以及最终的共识行动。和非暴力沟通类似。
29 |
30 | 从客观事实开始描述,并结合自身主管感受,最后提出诉求并达成共识。但个人认为此种沟通方式,更适合平级、或和下级沟通,而非和上级沟通。
31 |
32 | 和上级沟通,更多是服务上级的方向目标,围绕方向目标进行沟通,提出创新性想法、方案,以达成更好的 “成事”。基于想法、方案,再做具体的拆解、分析和事实困难陈述等等。
33 |
34 | 还需要集合 DISC 人格模型进行适配沟通。
35 |
36 | ### 沟通的术和势
37 |
38 | 沟通的术是技巧,但更为重要的是 “势”,文中解释为影响力、话语权等。第一次意识到影响力的重要性。
39 |
40 | 从马哲视角来看,看似虚的、主观的影响力,必定基于实的、客观的既定事实,而既定事实,本质上还是 “成事” 的范畴。
41 |
42 | 如果沟通仅仅是如何更好的说服对方的话,那么 “成事”,“成更多的事” 必定是更为重要的前提。
43 |
44 | # 参考
45 |
46 | * [技术管理实战 36 讲(刘建国)重点内容整理](https://blog.csdn.net/yijian0645/article/details/137227957)
47 | * [技术管理 36 讲](https://www.jianshu.com/p/03c5a49ea214)
48 | * [DISC](https://mbd.baidu.com/newspage/data/dtlandingsuper?nid=dt_4818594183314665251)
49 |
--------------------------------------------------------------------------------
/_posts/2024-04~06/2024-04-27-ocr.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "PDF OCR 识别"
4 | date: 2024-04-27
5 | tags: [book]
6 | commentIssueId: 128
7 | ---
8 |
9 | 最近在读《政治的人生》这本书,之前买的但现在没得卖了,甚是可惜。又想到很多情况下,还是需要对文中只言片语做些搜索的。所以想来用网上的 PDF 文件,并用 OCR 记录一下。
10 |
11 | # OCR
12 |
13 | * 参考 [paddlecor](https://github.com/PaddlePaddle/PaddleOCR/blob/main/doc/doc_ch/quickstart.md)
14 | * `python3 -m pip install paddlepaddle -i https://mirror.baidu.com/pypi/simple`
15 | * `pip3 install paddleocr`
16 | * 添加 `/Users/xxx/Library/Python/3.9/bin` 到你的 PATH
17 | * `paddleocr --image_dir ./xxx.png` 即可
18 |
19 |
20 | # 代码
21 |
22 | ```py
23 | from paddleocr import PaddleOCR, draw_ocr
24 |
25 | ocr = PaddleOCR(use_angle_cls=False, lang="ch", page_num=0)
26 | img_path = './bijiao.pdf'
27 |
28 |
29 | result = ocr.ocr(img_path, cls=False)
30 | textResult = []
31 | for idx in range(len(result)):
32 | res = result[idx]
33 |
34 | # 空判断
35 | if res == None:
36 | continue
37 | else:
38 | for line in res:
39 | # print(line)
40 | textResult.append(line[1][0])
41 |
42 | fo = open("bijiao.txt", "w")
43 | fo.write( '\n'.join(textResult))
44 |
45 | # 关闭打开的文件
46 | fo.close()
47 | ```
48 |
49 | # 政治的人生
50 |
51 | [全文 txt 版本](https://gist.github.com/zhoukekestar/290bbdc30fafe0a0777a56a1d574bb04)
52 | 方便检索
53 |
--------------------------------------------------------------------------------
/_posts/2024-04~06/2024-05-29-with.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "ESM 中的 with 转换"
4 | date: 2024-05-29
5 | tags: [js]
6 | ---
7 |
8 | 因为 ESM 模块规范中,对 with 语法是不支持的,所以,对老的模块中用到 with 的代码进行转换。
9 |
10 | 使用 `babel-plugin-transform-with` 插件进行转换,原理是对 with 代码块中的方法、变量进行检测,如果是局部变量(Scope.contextVariables),则跳过,如果不是,则有可能是 with 中的方法或变量,则进行转换。
11 |
12 | * `npm init -y` 初始化项目
13 | * `npm i babel-plugin-transform-with babel-cli -D` 安装依赖
14 | * `touch index.mjs` 新建文件
15 |
16 | ```js
17 | var a = {b: '1'}
18 | with(a) {
19 | var c = b;
20 | }
21 | ```
22 |
23 | * `npx babel index.mjs` 转换
24 |
25 | ```js
26 | var a = { b: '1' };
27 |
28 | (function (b) {
29 | var c = b;
30 | })('b' in a ? a.b : typeof b !== "undefined" ? b : undefined);
31 | ```
32 |
--------------------------------------------------------------------------------
/_posts/2024-04~06/2024-06-05-zindex.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "zindex 未生效"
4 | date: 2024-06-05
5 | tags: [js]
6 | ---
7 |
8 | 记一次 fix 的 z-index 未生效的情况。
9 |
10 | 在父容易设置了 postion 和 z-index 的情况下,子元素设置了 z-index 不会生效。
11 |
12 | demo 网页:https://systemjs.1688.com/krump/schema/2600.html
13 |
14 |
--------------------------------------------------------------------------------
/_posts/2024-07~09/2024-07-11-merge-videos.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "合并视频"
4 | date: 2024-07-11
5 | tags: [tool]
6 | commentIssueId: 129
7 | ---
8 |
9 | 使用 ffmpeg 合并视频
10 |
11 | # 使用 ffmpeg
12 |
13 | * 方法1: 本地安装
14 | ```sh
15 | $ brew install ffmpeg
16 | ```
17 |
18 | * 方法2:使用 wasm
19 |
20 | ```sh
21 | $ open https://ffmpegwasm.netlify.app/playground/
22 | ```
23 |
24 | # 合并
25 |
26 | 本地仅需一条命令即可:
27 |
28 | ```sh
29 | $ ffmpeg -i left.mp4 -i right.mp4 -filter_complex hstack output.mp4
30 | ```
31 |
32 | 或直接使用在线工具执行上述命令
33 |
34 | 
35 |
36 |
37 | # 效果
38 |
39 | [测试视频](https://github.com/zhoukekestar/notes/issues/129)
40 |
41 | # 参考
42 |
43 | * [ffmpeg-merge-two-videos-into-one-with-side-by-side-same-quality-output](https://stackoverflow.com/questions/42255139/ffmpeg-merge-two-videos-into-one-with-side-by-side-same-quality-output)
44 | * [ffmpeg-stitch-videos-horizontally](https://www.baeldung.com/linux/ffmpeg-stitch-videos-horizontally)
45 | * [https://ffmpegwasm.netlify.app/playground/](https://ffmpegwasm.netlify.app/playground/)
46 |
--------------------------------------------------------------------------------
/_posts/2024-07~09/2024-07-21-house.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "从买房过程中的相关思考"
4 | date: 2024-07-21
5 | tags: [note]
6 | ---
7 |
8 | 对买房过程中的相关事实记录,抽象并作相关总结。
9 |
10 | ### 事实
11 |
12 | * 对工作邮箱的已读忽略
13 | * 对公司发的邮件,有看到相关邮件,标题和房子售卖相关,并作了点击
14 | * 并感性得出结论:连公司都开始推销人才房,现有市场确实比较冷淡,市场价格预期确实是往下了。
15 | * 夫人补充:主观偏见,社会案例不好,公信力下降,原有的官方下场去库存,存在负面印象
16 | * 这种房子应该不会太好,直接予以忽略
17 | * 对保障&人才共有的风险评估
18 | * 有同事说过近些年可能的政策风险,并已决定买房(并不在意)
19 | * 近期其他同事近乎疯狂地摇号(并不在意)
20 | * 销售在群里说了(明年就没有人才房了)
21 | * 开始重视并确认,并决定上车
22 |
23 | ### 抽象
24 |
25 | * 对买房等重大决策,重视程度和意识没有到位,导致后续行为的敷衍。
26 | * 【辩方】 还没下较大决心买房,只是先随便看看,后续机会有的是,慢慢看吧,不着急。
27 | * 【辩方】或许后续的房价还是下跌,敷衍的态度对这件事本身,可能在未来是正向收益。
28 | * 对关键决策的信息收集、获取缺少必要的敏感度,导致重大决策的失败
29 | * 【辩方】如果太敏感,就和同事在 23 年低买在之江了,就没有现在的决策点了。
30 | * 【辩方】如何有效地建立、健全相关信息筛选机制,是个值得讨论的话题。
31 | * 缺少对关键信息的识别、提取、总结,缺少对关键信息的把握,且存在惯性思维,导致错误的印象、抽象,并最终走向失败
32 | * 【辩方】思维惯性是大脑对简单决策进化后的高效适应,潜意识原理。
33 | * 【辩方】后续觉得可行性后,对相关信息的重视和关注度有所提升,并抓住了后续重要的政策风险相关信息。
34 | * 对同事、其他同事、销售的三人成虎,对相关信息予以的确认,从开始的可以拖,变成了重视,并觉得需要化解相关风险。
35 | * 【辩方】明明在关注并需要买人才房,但对相关政策没有主动进行较为深入的调查、研究,这是相当不负责任的。
36 | * 【辩辩方】还是意识问题。
37 |
38 |
39 | ### 总结
40 |
41 | * 意识决定行为,判断重要的事,并给予相关重视程度。(可能买房并非重大决策),由此,对事情是否为重要事件本身,是更为重要的决策。
42 | * 对相关决策,要对重要矛盾和主要矛盾的主要方面,进行全面的认识。此过程中,有两个关键时间点:1 是邮件的已读忽略,2 是人才房政策的风险。对关键决策的关键信息(邮件内容、政策),要做到充分的收集、提取、和认识。
43 | * 对本次决策本身,从 5 年视角来看,决策大体正确,判断 OK。从 1 ~ 2 年的视角看未在2023年低入场,决策大体正确,但更多是运气。从 2 ~ 3 月的视角看,决策有失误,对关键信息判断失误。从换房户型等更为微观视角看,决策大体正确。
44 | * 最后,本次复盘本身具有较为积极的意义,深挖了一些底层逻辑,屏蔽一些细枝末节和相关感性的内容,从更为理性的视角看待。
45 |
--------------------------------------------------------------------------------
/_posts/2024-07~09/2024-07-28-ml.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "机器学习笔记"
4 | date: 2024-07-28
5 | tags: [AI]
6 | ---
7 |
8 | 再次看机器学习相关内容,之前有些疑惑的点,有更深的体会了,特此记录。
9 |
10 | # 小结
11 |
12 | * 假设函数的定义比我想的要重要,是用于的拟合的基础假设,直接决定模型的好坏
13 | * 比如:`y = a1 + a2*x1` 和 `y = a1 + a2 * x1 + a3 * x2^2` 的拟合能力差异
14 | * 多层神经网络,便是对模型的假设定义,用尽可能的高维空间来做后续目标测试集的拟合
15 | * 损失函数,取自假设模型,其过程是将假设函数尽可能地拟合到目标测试集
16 | * 所以,所谓 garbage in garbage out,用于拟合的数据或训练集都不是最优的需要拟合的模型,那么最终的拟合出来的模型,势必是无法使用的。
17 | * 线性回归本身已包含很多人工智能的思路和算法,比如模型假设、内部参数、损失函数、使用梯度下降最小化损失
18 | * 
19 |
20 | * 数学计算上的梯度下降,计算的是整体数据集的导数方向,但由于大规模数据,一般的 batch 就选择子集来近似获取相关向量
21 |
22 |
23 |
24 |
25 |
26 |
27 | # octave
28 |
29 | 参考:https://octave.org/
30 |
31 | ```sh
32 | $ brew install octave
33 | $ octave --gui
34 | ```
35 |
36 | # 参考
37 |
38 | * [吴恩达机器学习系列课程](https://www.bilibili.com/video/BV164411b7dx?p=11)
39 | * 目前看到 11 集,下次 12 集开始。
40 |
--------------------------------------------------------------------------------
/_posts/2024-07~09/2024-08-01-unicode.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Unicode"
4 | date: 2024-08-01
5 | tags: [note]
6 | ---
7 |
8 | 对于部分场景,JS 执行需要兼容 ISO-8859-1、GBK、UTF-8 等编码场景,对 JS 代码中文需要做 unicode 的 escape 处理
9 |
10 | # 参考 core-js
11 |
12 | [es.escape.js](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/es.escape.js)
13 |
14 | 对 127 下字符,直接返回,否则进行 unicode 转义。
15 |
16 | 0x80 即 1 字节最高位为 1 的,就需要编码
17 |
18 | # 错误 case
19 |
20 | ```js
21 | import iconv from 'iconv-lite';
22 |
23 | const string = `æ¤é鿬¾`;
24 | const stringBuffer = Buffer.from(string);
25 | console.log(iconv.decode(iconv.decode(Buffer.from(`æ¤é鿬¾`), 'utf-8'), 'utf-8'));
26 | ```
27 |
28 | # 工具类
29 |
30 | 参考 [unicode-escape](https://gist.github.com/zhoukekestar/d2908dbf909936f8f80978aafe48b195)
31 |
--------------------------------------------------------------------------------
/_posts/2024-07~09/2024-08-21-node-sass.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "node-sass 升级 sass"
4 | date: 2024-08-21
5 | tags: [js]
6 | ---
7 |
8 |
9 | # 安装依赖
10 |
11 | ## 方案一
12 |
13 | 1. `package` 依赖覆盖
14 |
15 | ```
16 | "overrides": {
17 | "node-sass": "npm:sass@^1.55.0"
18 | },
19 | "resolutions": {
20 | "node-sass": "npm:sass@^1.55.0"
21 | }
22 | ```
23 |
24 | 2. 创建软连接
25 |
26 | ```
27 | ln -s $PWD/node_modules/sass $PWD/node_modules/node-sass
28 | ```
29 |
30 | ## 方案二
31 |
32 | 未经验证,理论上可行。和方案一类似,但会更彻底一些。
33 |
34 | 1. 自行下载 node,强制降级版本
35 |
36 | 2. 安装依赖并忽略 `postinstall` 脚本 `--ignore-scripts`
37 |
38 | 3. 安装 `sass`,删除 `node-sass` 并软链到 `sass`
39 |
40 | ```bash
41 | #!/usr/bin/env bash
42 |
43 | echo "installing alinode..."
44 | if [ "$(uname)" == "Darwin" ]; then
45 | echo "download alinode for mac"
46 | curl -L https://registry.npmmirror.com/-/binary/alinode/v3.9.0/alinode-v3.9.0-darwin-x64.tar.gz > ./node.tar.gz
47 | else
48 | echo "download alinode for linux"
49 | curl -L https://registry.npmmirror.com/-/binary/alinode/v3.9.0/alinode-v3.9.0-linux-x64.tar.gz > ./node.tar.gz
50 | fi
51 |
52 | mkdir ./node_modules
53 | mkdir ./node_modules/node8
54 | tar xf ./node.tar.gz -C ./node_modules/node8 --strip-components=1
55 |
56 | echo "node version => "./node_modules/node8/bin/node -v
57 | echo "installed alinode"
58 |
59 | # 安装依赖
60 |
61 | ./node_modules/node8/bin/node ./node_modules/node8/bin/npm install --registry=https://registry.anpm.alibaba-inc.com --ignore-scripts
62 |
63 | ./node_modules/node8/bin/node ./node_modules/node8/bin/npm install sass --registry=https://registry.anpm.alibaba-inc.com --ignore-scripts
64 | ```
65 |
--------------------------------------------------------------------------------
/_posts/2024-07~09/2024-08-22-sqlite-vec.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "使用 sqlite-vec 做向量搜索"
4 | date: 2024-08-22
5 | tags: [js]
6 | ---
7 |
8 | 使用 sqlite-vec 做向量搜索,得益于 sqlite 的极致轻量,对小场景下,是有相当强的诱惑力的。
9 |
10 | # sqlite-vec
11 |
12 | * [sqlite-vec](https://github.com/asg017/sqlite-vec)
13 | * [JS 样例](https://github.com/asg017/sqlite-vec/blob/main/examples/simple-node/demo.mjs)
14 |
15 | # 依赖安装
16 |
17 | * `npm i sqlite-vec`
18 | * `npm i better-sqlite3`
19 |
20 | # better-sqlite3 依赖问题
21 |
22 | 安装 better-sqlite3 依赖的时候,可能会出现 [ModuleNotFoundError: No module named 'distutils'](https://github.com/WiseLibs/better-sqlite3/issues/1154) 的问题。
23 |
24 | 没有 [distutils](https://stackoverflow.com/questions/69919970/no-module-named-distutils-util-but-distutils-installed) 是因为 python3.12 已经移除了。
25 |
26 | 所以,需要在安装依赖的时候,指定 python 版本和 python 路径。且根据 `node-gyp` 的文档,python 版本需要[大于 3.6](https://unpkg.com/browse/node-gyp@9.4.0/lib/find-python.js),所以,当指定 python2 的时候,是无法生效的。
27 |
28 | 最终指定python版本的命令如下(自行指定大于`3.6`且小于`3.12`的python版本):
29 |
30 | ```
31 | npm i better-sqlite3 --python='/opt/homebrew/opt/python@3.11/bin/python3.11'
32 | ```
33 |
34 |
35 |
--------------------------------------------------------------------------------
/_posts/2024-07~09/2024-09-09-politics.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "政治与唯物的某一条线"
4 | date: 2024-09-09
5 | tags: [note]
6 | ---
7 |
8 | 尝试寻找政治与唯物的某一条线,简单串联起来。
9 |
10 | ### 政治
11 |
12 | 政治从来都是谈判的艺术,本质就是利益斗争,可总结为“who gets what, when, how”。
13 |
14 | — https://en.wikipedia.org/wiki/Politics
15 |
16 | — 马基雅维利
17 |
18 | ### 经济
19 |
20 | 经济基础决定政治上层建筑。政治是经济的集中表现。
21 |
22 | — 《政治的逻辑》
23 |
24 | — 列宁
25 |
26 | ### 阶级
27 |
28 | 阶级差异导致经济利益冲突。
29 |
30 | ### 生产关系
31 |
32 | 生产关系决定了阶级划分。
33 |
34 | ### 生产力
35 |
36 | 生产力决定生产关系。
37 |
38 | ### 科学技术
39 |
40 | 科学技术是第一生产力。
41 |
42 | ### 历史
43 |
44 | 科学技术本质上人类历史上最佳实践的积累。
45 |
46 | ### 实践
47 |
48 | 人类历史实践的目标的为了满足主体的意识诉求。实践受意识的指导,
49 |
50 | ### 意识
51 |
52 | 基本的意识形态源于对生存、物质、美好生活的追求。
53 |
54 | ### 物质
55 |
56 | 物质决定意识,通过自然法则的筛选,人类基因决定了生存、欲望等意识。
57 |
58 |
59 | ### 小结
60 |
61 | * 「物质」 决定 「意识」
62 | * 「意识」指导「实践」
63 | * 「实践」汇聚为「历史」
64 | * 「历史」积累为「科技」
65 | * 「科技」是第一「生产力」
66 | * 「生产力」决定「生产关系」
67 | * 「生产关系」分化为「阶级」
68 | * 「阶级」决定「经济」基础
69 | * 「经济」决定「政治」上层建筑。
70 |
--------------------------------------------------------------------------------
/_posts/2024-07~09/2024-09-11-extend2.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "如何做开放&扩展(2)"
4 | date: 2024-09-11
5 | tags: [framework]
6 | ---
7 |
8 | 关于如何做好业务代码开放、扩展的技术架构设计和相关想法。接上次 [如何做扩展](https://zhoukekestar.github.io/notes/2024/08/06/extend.html)
9 |
10 | # 相关机制总结
11 |
12 | * 发布订阅机制的扩展
13 | * 特点:
14 | * 简单明了,逻辑通过消息解耦,扩展方按需订阅,并做相关扩展
15 | * 一般用于非主体性修改,可有可无,扩展不影响主体逻辑(如:编辑体验)
16 | * 缺点:
17 | * 原有业务代码本身需要做「事件化」改造,成本较高
18 | * 基于生命周期的扩展
19 | * 特点:
20 | * 规定明确的扩展时机,对特定的生命周期,扩展方可直接做非常强的干预
21 | * 缺点:
22 | * 除固定的扩展时机外,无法对生命周期本身做灵活的扩展
23 | * 基于协议的扩展
24 | * 特点:
25 | * 约定协议,扩展方按协议来做相关实现,多用于继承实现、多环境的复用和扩展
26 | * 缺点
27 | * 扩展方和主体方需要约定协议,扩展方按协议规定做实现,对主体方本身的干预能力较差
28 | * 干预方的插件实现,一般仅有单个实现,较少出现多个实现或多个插件一起用的情况
29 |
30 |
31 | 从以上方案中,可以总结出相关特点:
32 |
33 | | 方案 | 改造成本 | 开放性(干预能力) | 扩展性(灵活性) |
34 | | ---- | ---- | ------- | --- |
35 | | 发布订阅 | 高 | 中 | 高 |
36 | | 生命周期扩展 | 中 | 高 | 低 |
37 | | 协议扩展 | 高 | 低 | 高 |
38 |
39 |
40 | # 开放&扩展的最佳实践
41 |
42 | 看到上述方案,看似干预能力和灵活性不可兼得,但其实是出于不同场景的目的考虑的。
43 |
44 | 如果从业务代码的技术架构出发,由于其快速迭代的特性,有着千奇百怪的开放、扩展需求,所以,对其都提出了较高的要求。
45 |
46 | 这里,都可以举一个业务实践中,对开放、扩展做得最好的一个设计,就是 servlet 的 filter 机制。
47 |
48 | 
49 |
50 | Filter 机制,是面向 http 协议的一套 request、response 的拦截机制:
51 |
52 | * 从扩展性出发:可以指定任意路径的 Filter,不同路径的 filter 的数量可以自由配置。
53 |
54 | * 从开放性出发:可以对 http 协议做拦截、修改、重定向、响应等等操作,有非常强的干预能力。
55 |
56 | * 从成本角度出发:目前是业内较为成熟的方案,基于 servlet api,能非常低成本的做扩展,且具备一定的可复用性。
57 |
58 |
59 | # 业务场景的本质诉求
60 |
61 | * 【接入】成本低,少改造、少侵入
62 | * 【主体】扩展性高,方便灵活
63 | * 【客体】开放性高,干预能力强
64 |
65 |
66 | # 其他需考虑的点
67 |
68 | * 插件执行顺序,插件谁先执行,谁后执行
69 | * 插件执行机制,同步、异步(如果是异步,如何重新执行)
70 | * 插件加载机制,预加载、按需加载等
71 |
72 |
--------------------------------------------------------------------------------
/_posts/2024-10~12/2024-10-04-docker.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Docker 镜像加速"
4 | date: 2024-10-04
5 | tags: [system]
6 | ---
7 |
8 | 此方法仅使用 Github 能正常访问,但 Docker 无法正常拉取的情况下适用。使用 Github Actions 拉取 Docker 镜像,并通过下载压缩包,本地离线使用镜像。
9 |
10 | # 步骤
11 |
12 | ### Fork 仓库
13 |
14 | 在 Github 操作,Fork 以下仓库 https://github.com/zhoukekestar/DockerTarBuilder
15 |
16 | ### 进入 Actions
17 |
18 | 点击 [Actions](https://github.com/zhoukekestar/DockerTarBuilder/actions/workflows/amd64.yml)
19 |
20 | ### 输入镜像并运行
21 |
22 | * 选择 CPU (AMD64,ARM64,ARM32)
23 | * 输入镜像并运行
24 |
25 |
26 |
27 |
28 | ### 下载文件包
29 |
30 | 点击进入刚刚所运行的 action 详情,点击下载 tar 包
31 |
32 |
33 |
34 |
35 | ### 本地安装
36 |
37 |
38 | ```sh
39 | $ unzip docker-images-tar.zip
40 | $ tar -zxvf ./x86-64-images.tar.gz
41 | $ docker load -i amd64_gcc-amd64.tar
42 | ```
43 |
44 | 参考:
45 | * [Chrome VNC](https://zhoukekestar.github.io/notes/2024/07/14/chrome-vnc.html)
46 | * [load a docker image form a tar file](https://stackoverflow.com/questions/40582300/how-to-load-a-docker-image-from-a-tar-file)
47 |
48 | ### 启动
49 |
50 | ```sh
51 | $ docker run -it amd64/gcc
52 | #root@xx gcc --version
53 | ```
54 |
55 | # 参考
56 |
57 | * [使用Github Action 构建docker镜像](https://wkdaily.cpolar.cn/archives/gc)
58 |
--------------------------------------------------------------------------------
/_posts/2024-10~12/2024-10-04-gcc.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "gcc"
4 | date: 2024-10-04
5 | tags: [book]
6 | ---
7 |
8 | # Qemu vs VirtualBox
9 |
10 | 参考 [Qemu vs VirtualBox](https://linuxconfig.org/qemu-vs-virtualbox-whats-the-difference),VirtualBox 只有虚拟机的功能,即一个系统中,安装多个其他系统,如 windows 中安装 ubuntu、macos 等等。
11 |
12 | Qemu 除了虚拟机功能,还有模拟器仿真的能力,即在一个系统,模拟 ARM、X86 不同芯片的能力。
13 |
14 | 因为需要测试不同 CPU 的 GCC 编译,所以,需选用 Qemu 来进行测试。
15 |
16 | ### docker ?
17 |
18 | Docker 是一种基于现有系统下,对进程和资源做隔离的环境工具,有不同的 CPU 架构、不同操作系统的景象。参考 [gcc 不同 CPU 版本](https://github.com/docker-library/docs/tree/master/gcc)
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/_posts/2024-10~12/2024-10-13-ipv6.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "IPv6"
4 | date: 2024-10-13
5 | tags: [system]
6 | ---
7 |
8 | # DNS 域名
9 |
10 | https://dns.icoa.cn/ipv6/
11 |
12 | * Google Public DNS:2001:4860:4860::8888
13 | * Cloudflare 2606:4700:4700::1111
14 | * 浙江移动 2049:8028:2000::1111
15 | * 浙江移动 2049:8028:2000::2222
16 |
17 | # ping6
18 |
19 | ping6 ipv6-test.com
20 | nslookup -query=AAAA ipv6-test.com
21 |
22 | # 参考
23 |
24 | * https://www.test-ipv6.com/
25 | * https://m.lzu.edu.cn/v6/
26 |
--------------------------------------------------------------------------------
/_posts/2024-10~12/2024-10-17-lfs.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Linux from Scratch"
4 | date: 2024-10-15
5 | tags: [system]
6 | ---
7 |
8 | 编译 Linux
9 |
10 | # Quick Start
11 |
12 | 从 [release](https://github.com/reinterpretcat/lfs/releases/tag/v8.1.0) 下载 lfs.iso.tar.gz
13 |
14 | ```sh
15 | $ brew install qemu
16 | $ qemu-system-x86_64 -boot d -cdrom ./lfs.iso -m 2G
17 |
18 | # 在 qemu 中
19 | # 用户名 root,无秘密
20 | $ root
21 | ```
22 |
23 | # Cross-Linux from scratch
24 |
25 | * https://github.com/reinterpretcat/lfs
26 | * https://github.com/bajorekp/lfs-docker/blob/main/README.md
27 | * https://github.com/cross-lfs/cross-lfs
28 | * https://github.com/xiez/lfs
29 |
30 | * docker 配置
31 | * https://github.com/bajorekp/lfs-docker/blob/main/README.md
32 |
--------------------------------------------------------------------------------
/_posts/2024-10~12/2024-11-07-j2wasm.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Java to WASM Compiler"
4 | date: 2024-11-07
5 | tags: [system]
6 | ---
7 |
8 | 现有 Java to WASM 的编译器。
9 |
10 | # 列表
11 |
12 | * [teavm](https://github.com/konsoletyper/teavm)
13 | * [google/j2cl](https://github.com/google/j2cl/blob/master/docs/getting-started-j2wasm.md)
14 | * [JWebAssembly](https://github.com/i-net-software/JWebAssembly)
15 | * [cheerpj](https://www.leaningtech.com/pages/cheerpj.html)
16 | * [bytecoder](https://github.com/mirkosertic/Bytecoder)
17 |
18 |
19 | # 其他
20 |
21 | The biggest issue that WASM solves is that it is suitable for low-level languages such as Rust and C++, while the JVM is not.
22 |
23 | https://www.quora.com/What-issues-of-Java-JVM-does-WASI-WASM-fix
24 |
25 | # 参考
26 |
27 | * https://github.com/topics/webassembly?l=java
28 | * https://github.com/topics/wasm?l=java
29 | * [hacker news](https://news.ycombinator.com/item?id=35873552)
30 |
--------------------------------------------------------------------------------
/_posts/2024-10~12/2025-10-21-boot.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | 计算机启动过程:bios -> grub -> kernel
4 |
5 | # bios
6 |
7 | 固件 ROM
8 |
9 | https://github.com/coreboot/seabios
10 |
11 | * /opt/homebrew/Cellar/qemu/9.1.0/share/qemu/bios-256k.bin
12 |
13 | 进入 bios, 参考 https://www.qemu.org/docs/master/system/qemu-manpage.html
14 | `qemu-system-x86_64 -boot menu=on,splash-time=5000`
15 |
16 | # bootloader - grub
17 |
18 | find / | grep "boot.img"
19 | /usr/lib/grub/i386-pc/pxeboot.img
20 | /usr/lib/grub/i386-pc/diskboot.img
21 | /usr/lib/grub/i386-pc/boot.img
22 | /usr/lib/grub/i386-pc/lnxboot.img
23 | /usr/lib/grub/i386-pc/cdboot.img
24 |
25 |
26 | # kernel
27 |
28 |
29 | vga
30 | https://people.cs.umass.edu/~verts/cmpsci201/Mode_13_draft2.pdf
31 |
32 | [VGA programming lessons](https://joco.homeserver.hu/vgalessons/)
33 | https://en.wikipedia.org/wiki/Mode_13h
34 |
35 | https://asm.inightmare.org/index.php?tutorial=1&location=11
36 |
37 |
38 | # References
39 |
40 | * https://github.com/dibingfa/flash-linux0.11-talk
41 |
--------------------------------------------------------------------------------
/_posts/2024-10~12/2025-10-22-gcc.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | GCC (GNU Compiler Collection)
5 |
6 | # Install
7 |
8 | * gcc
9 |
10 | ```sh
11 | $ brew install gcc
12 | ```
13 |
14 | * [binutils](https://en.wikipedia.org/wiki/GNU_Binutils),包含常见的
15 | * as 汇编
16 | * nm 列出导出符号
17 | * ld 连接
18 | * objdump 转储目标文件信息
19 |
20 | ```sh
21 | $ brew install binutils
22 | ```
23 |
24 | # References
25 |
26 | * [Wiki: GNU Compiler Collection](https://en.wikipedia.org/wiki/GNU_Compiler_Collection)
27 | * [Wiki: GNU Binutils](https://en.wikipedia.org/wiki/GNU_Binutils)
28 | * [Wiki: Core Utilities Commands](https://en.wikipedia.org/wiki/List_of_GNU_Core_Utilities_commands)
29 | * [GNU 软件列表](https://www.gnu.org/software/software.html)
30 | * https://www3.ntu.edu.sg/home/ehchua/programming/cpp/gcc_make.html
31 | * https://www.seas.upenn.edu/~ese5320/fall2022/handouts/_downloads/788d972ffe62083c2f1e3f86b7c03f5d/gccintro.pdf
32 |
--------------------------------------------------------------------------------
/_posts/2025-01~03/2025-02-09-lambda.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "使用 Lambda 代理页面"
4 | date: 2025-02-09
5 | tags: [proxy]
6 | ---
7 |
8 | 由于 Cloudflare worker 的 vless 存在无法访问 cloudflare 托管页面的缺陷,于是找了另外一种代理方式。
9 |
10 | # 基本思路
11 |
12 |
13 | 本地使用中间人攻击的思路,将 HTTPS 代理到自己的服务器上,然后通过 Lambda 代理请求并返回。
14 |
15 | 为什么这么复杂?
16 |
17 | * 单纯的 HTTP 代理,即 Connect Tunnel 方案,无法做协议转换,比如:Lambda 的 API Gateway 不支持 Connect 请求。
18 | * Connect Tunnel 无法解密相关具体流量,且有诸多限制,比如:只能 IP(域名) + Port,API Gateway 无法指定到根路径。
19 |
20 | 为什么用 AWS 的 Lambda ?
21 |
22 | * 有免费额度
23 | * 大厂产品,较为稳定(尽可能采用大厂,小厂的免费产品也很多,但很容易倒闭,封锁什么的)
24 | * AWS 的 lambda 能直接访问,Google Cluod 和 Cloudflare worker 无法直接访问
25 |
26 |
27 |
28 | # 实现方案
29 |
30 | * HTTPS 代理使用现成的代理工具,whistle
31 | * 通过安装本地 CA 证书,whistle 可以将浏览器代理的 HTTPS 流量,解密转成本地服务的可以识别的流量请求
32 | * 此处为本地中间人代理,无相关安全问题
33 | * 需要用到 whistle 脚本,参考 [代码](https://github.com/zhoukekestar/http-proxy-server/blob/b712573d0b21608eedb53124b8e7aecd31671ce9/reqScript.js)
34 | * 本地服务器,将相关请求,包装为与 Lambda 可以是被的协议 JSON,然后 HTTPS 请求给 Lambda
35 | * 即把 headers、method、body 封装为 json,参考 [代码](https://github.com/zhoukekestar/http-proxy-server/blob/b712573d0b21608eedb53124b8e7aecd31671ce9/index.mjs#L28)
36 | * Lambda 函数,获取请求 JSON,发起请求,然后返回相关数据即可。
37 | * Lambda 获取 json 中的相关参数,发起请求并发挥,参考 [代码](https://github.com/zhoukekestar/http-proxy-server/blob/b712573d0b21608eedb53124b8e7aecd31671ce9/aws-lambda/index.mjs#L6)
38 |
39 | 
40 |
41 |
42 | # References
43 |
44 | * [相关仓库](https://github.com/zhoukekestar/http-proxy-server)
45 |
--------------------------------------------------------------------------------
/_posts/2025-01~03/2025-03-03-lima.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Use lima instead of Docker Desktop"
4 | date: 2025-03-03
5 | tags: [tool]
6 | ---
7 |
8 | Use lima instead of Docker Desktop
9 |
10 | # shell
11 |
12 | ```sh
13 |
14 | # install
15 | $ brew install lima
16 | # https://github.com/lima-vm/lima/blob/bfac818e090fd18b69a9c47036bb4f6e4855f694/templates/docker.yaml
17 | $ curl https://raw.githubusercontent.com/lima-vm/lima/bfac818e090fd18b69a9c47036bb4f6e4855f694/templates/docker.yaml > docker.yaml
18 |
19 |
20 | # host operations
21 | $ limactl start ./docker.yaml
22 | $ limactl shell docker
23 | # limactl stop docker
24 |
25 | # guest
26 | $ sudo apt install docker.io
27 | $ sudo docker run mirror.gcr.io/hello-world
28 | ```
29 |
30 | # Second Time
31 |
32 | ```sh
33 | $ limactl start docker
34 | $ limactl shell docker
35 | ```
36 |
37 |
38 | # For Local Image
39 |
40 | docker.yaml
41 |
42 | ```yaml
43 | # load from local file
44 | images:
45 | - location: ~/Downloads/ubuntu-24.04-server-cloudimg-arm64.img
46 |
47 | # writable for all dirs or you can wirte file to /tmp/lima
48 | mounts:
49 | - location: "~"
50 | writable: true
51 | - location: "/tmp/lima"
52 | writable: true
53 | ```
54 |
--------------------------------------------------------------------------------
/_posts/2025-01~03/2025-03-29-selenium.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "selenium QuickStart"
4 | date: 2025-03-29
5 | tags: [tool]
6 | ---
7 |
8 | 使用 selenium 进行测试,novnc + chrome + webdriver 的方案,可用于集成测试,也可用于之前老版本的 chrome 兼容测试的替代方案:[VNC 控制 Docker Chrome](https://zhoukekestar.github.io/notes/2024/07/14/chrome-vnc.html)
9 |
10 | # docker
11 |
12 | ```sh
13 | # 启动最新版本的 selenium
14 | # 7900 为 novnc 端口,4444 为 selenium 端口
15 | $ docker run -it --rm -p 7900:7900 -p 4444:4444 --name chrome selenium/standalone-chrome
16 |
17 |
18 | # novnc 查看
19 | $ open http://localhost:7900/?autoconnect=1&resize=scale&password=secret
20 | ```
21 |
22 | # 脚本
23 |
24 | 新建 index.mjs 如下:
25 |
26 | ```js
27 | import webdriver from 'selenium-webdriver';
28 |
29 | const { By, Key } = webdriver;
30 | !(async () => {
31 | let driver = await new webdriver.Builder();
32 | driver.forBrowser(webdriver.Browser.CHROME);
33 | driver.usingServer('http://localhost:4444');
34 | driver = driver.build();
35 |
36 | try {
37 | await driver.get('https://www.baidu.com');
38 |
39 | await driver
40 | .findElement(By.id('kw'))
41 | .sendKeys('webdriver 你好', Key.RETURN);
42 |
43 | let title = await driver.getTitle();
44 | console.log(title);
45 | } catch (err) {
46 | console.error(err);
47 | } finally {
48 | await driver.quit();
49 | }
50 | })();
51 | ```
52 |
53 | # 手动启动
54 |
55 | ```sh
56 | # host
57 | $ docker exec -it xxx-container-id bash
58 |
59 | # docker
60 | $ cd /usr/bin
61 | $ ./google-chrome-stable
62 | ```
63 |
64 | # 后续
65 |
66 | * novnc 对中文输入法支持不够,可能的解法有:
67 | * 1、可能需要安装 linux 特定输入法
68 | * 2、剪贴板支持中文
69 | * 3、通过外部类似 puppeteer 来控制输入
70 | * 4、最快速的方式,目前是通过 base64 来传递:https://base64.us/
71 | * selenium 的 chrome 版本貌似不怎么全
72 |
73 |
--------------------------------------------------------------------------------
/_posts/2025-04~06/2025-06-05-browser.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "浏览器代码熟悉链路"
4 | date: 2025-06-05
5 | tags: [browser]
6 | ---
7 |
8 | 简单梳理了一些浏览器的项目,从简单到复杂。
9 |
10 | # 入门
11 |
12 | * [robinson](https://github.com/mbrubeck/robinson)
13 |
14 |
15 | # 基础尝试
16 |
17 | * [naglfar](https://github.com/maekawatoshiki/naglfar)
18 | * [puppy-browser](https://github.com/lmt-swallow/puppy-browser)
19 |
20 | # 嵌入式浏览器
21 |
22 | * [servo](https://github.com/servo/servo)
23 | * [gosub-engine](https://github.com/gosub-io/gosub-engine)
24 |
25 | # 完整浏览器
26 |
27 | * [verso](https://github.com/versotile-org/verso)
28 | * [ladybird](https://github.com/LadybirdBrowser/ladybird)
29 |
30 | # 高阶浏览器
31 |
32 | * blink
33 | * webkit
34 |
35 |
--------------------------------------------------------------------------------
/_posts/2025-07~09/2025-07-16-fe.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "前端何去何从?"
4 | date: 2025-07-16
5 | tags: [fe, thinking]
6 | ---
7 |
8 | 【待总结】前端职业生涯随着 AI 浪潮,整体就业市场规模不可避免地萎缩,这种感觉和十年前云计算浪潮下的运维岗位,是极其类似的。
9 |
10 | * 前端的历史,从页面美化、切图仔到前后端分离、前端工程
11 | * 未来的方向,从运维的角度看,有哪些可借鉴的思路?
12 | * 职业、岗位的定义和变迁,背后不变的本质是什么?
13 | * 如何从生产关系,及人的诉求本质出发,来思考职业?
14 | * 业务、管理、技术之争,什么情况下,那个是主要的、核心的生产力?
15 | * 业务、管理、技术的辩证、统一?
16 |
17 |
--------------------------------------------------------------------------------
/_posts/2025-07~09/2025-09-16-jupyter.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: post
3 | title: "Python Jupyter Notebook"
4 | date: 2025-09-16
5 | tags: [python, AI]
6 | ---
7 |
8 |
9 | 安装 Jupyter Notebook,方便 python 相关 Demo 开发。
10 |
11 | # 安装 UV
12 |
13 | 参考 [astral-sh/uv](https://github.com/astral-sh/uv)
14 |
15 | ```sh
16 | # On macOS and Linux.
17 | $ curl -LsSf https://astral.sh/uv/install.sh | sh
18 | ```
19 |
20 | # 指定 Python 版本
21 |
22 | ```sh
23 | # 创建目录
24 | $ mkdir ipynb-space
25 | $ cd ipynb-space
26 |
27 | # 创建虚拟环境
28 | $ uv venv --python 3.12
29 | $ uv pip install pip
30 |
31 | # 激活虚拟环境
32 | $ source .venv/bin/activate
33 |
34 | # check python 和 pip 路径
35 | $ which python
36 | /ipynb-space/.venv/bin/python
37 | $ which pip
38 | /ipynb-space/.venv/bin/pip
39 | ```
40 |
41 | # Jupyter
42 |
43 | 参考 [jupyter notebook](https://jupyter.org/install)
44 |
45 | ```sh
46 | $ pip install notebook
47 | $ jupyter notebook
48 | ```
49 |
--------------------------------------------------------------------------------
/_sass/minima.scss:
--------------------------------------------------------------------------------
1 | // Define defaults for each variable.
2 |
3 | $base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !default;
4 | $base-font-size: 16px !default;
5 | $base-font-weight: 400 !default;
6 | $small-font-size: $base-font-size * 0.875 !default;
7 | $base-line-height: 1.5 !default;
8 |
9 | $spacing-unit: 30px !default;
10 |
11 | $text-color: #111 !default;
12 | $background-color: #fdfdfd !default;
13 | $brand-color: #2a7ae2 !default;
14 |
15 | $grey-color: #828282 !default;
16 | $grey-color-light: lighten($grey-color, 40%) !default;
17 | $grey-color-dark: darken($grey-color, 25%) !default;
18 |
19 | // Width of the content area
20 | $content-width: 800px !default;
21 |
22 | $on-palm: 600px !default;
23 | $on-laptop: 800px !default;
24 |
25 | // Use media queries like this:
26 | // @include media-query($on-palm) {
27 | // .wrapper {
28 | // padding-right: $spacing-unit / 2;
29 | // padding-left: $spacing-unit / 2;
30 | // }
31 | // }
32 | @mixin media-query($device) {
33 | @media screen and (max-width: $device) {
34 | @content;
35 | }
36 | }
37 |
38 | // Import partials.
39 | @import
40 | "minima/base",
41 | "minima/layout",
42 | "minima/syntax-highlighting"
43 | ;
44 |
--------------------------------------------------------------------------------
/about.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: About Me
4 | permalink: /about/
5 | ---
6 |
7 | Resume: [My Resume](https://zhoukekestar.github.io/resume.html)
8 |
9 | Profile: [zhoukekestar.github.io](http://zhoukekestar.github.io/)
10 |
--------------------------------------------------------------------------------
/assets/2016/2016-01-01/search.js:
--------------------------------------------------------------------------------
1 | (function () {
2 | var link = document.createElement("a");
3 | link.target = "_blank";
4 |
5 | var searchBox = document.getElementById("search-box");
6 | searchBox.addEventListener("keypress", function (e) {
7 | // searchByKeyword(this.value);
8 |
9 | if (e.keyCode === 13 || e.which === 13 || e.key === "Enter") {
10 | console.log("That's all.");
11 | link.href =
12 | "https://www.google.com/search?q=" +
13 | encodeURIComponent("site:zhoukekestar.github.io " + searchBox.value);
14 | link.click();
15 | }
16 | });
17 |
18 | document.querySelector("button[github]").onclick = function () {
19 | link.href =
20 | "https://github.com/search?type=code&q=" +
21 | encodeURIComponent("repo:zhoukekestar/notes " + searchBox.value);
22 | link.click();
23 | };
24 |
25 | document.querySelector("button[google]").onclick = function () {
26 | link.href =
27 | "https://www.google.com/search?q=" +
28 | encodeURIComponent("site:zhoukekestar.github.io " + searchBox.value);
29 | link.click();
30 | };
31 | document.querySelector("button[bing]").onclick = function () {
32 | link.href =
33 | "https://www.bing.com/search?q=" +
34 | encodeURIComponent("site:zhoukekestar.github.io " + searchBox.value);
35 | link.click();
36 | };
37 | })();
38 |
--------------------------------------------------------------------------------
/assets/2016/2016-04-28-phaser/assets/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2016/2016-04-28-phaser/assets/background.png
--------------------------------------------------------------------------------
/assets/2016/2016-04-28-phaser/assets/bear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2016/2016-04-28-phaser/assets/bear.png
--------------------------------------------------------------------------------
/assets/2016/2016-04-28-phaser/assets/bird.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2016/2016-04-28-phaser/assets/bird.png
--------------------------------------------------------------------------------
/assets/2016/2016-04-28-phaser/assets/block.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2016/2016-04-28-phaser/assets/block.png
--------------------------------------------------------------------------------
/assets/2016/2016-04-28-phaser/assets/jump.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2016/2016-04-28-phaser/assets/jump.wav
--------------------------------------------------------------------------------
/assets/2017/07-04-eyes/eyes.aac:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2017/07-04-eyes/eyes.aac
--------------------------------------------------------------------------------
/assets/2017/08-15-7000words/100句背7000个单词.txt.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2017/08-15-7000words/100句背7000个单词.txt.txt
--------------------------------------------------------------------------------
/assets/2017/08-15-7000words/11到20.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2017/08-15-7000words/11到20.mp3
--------------------------------------------------------------------------------
/assets/2017/08-15-7000words/1到10.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2017/08-15-7000words/1到10.mp3
--------------------------------------------------------------------------------
/assets/2017/08-15-7000words/21到30.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2017/08-15-7000words/21到30.mp3
--------------------------------------------------------------------------------
/assets/2017/08-15-7000words/31到40.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2017/08-15-7000words/31到40.mp3
--------------------------------------------------------------------------------
/assets/2017/08-15-7000words/41到50.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2017/08-15-7000words/41到50.mp3
--------------------------------------------------------------------------------
/assets/2017/08-15-7000words/51到60.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2017/08-15-7000words/51到60.mp3
--------------------------------------------------------------------------------
/assets/2017/08-15-7000words/61到70.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2017/08-15-7000words/61到70.mp3
--------------------------------------------------------------------------------
/assets/2017/08-15-7000words/71到80.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2017/08-15-7000words/71到80.mp3
--------------------------------------------------------------------------------
/assets/2017/08-15-7000words/81到90.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2017/08-15-7000words/81到90.mp3
--------------------------------------------------------------------------------
/assets/2017/08-15-7000words/91到100.mp3:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2017/08-15-7000words/91到100.mp3
--------------------------------------------------------------------------------
/assets/2017/08-24-360-image/360.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zhoukekestar/notes/cf6a861827e8fdc441a9a33f6f8e990ac933705a/assets/2017/08-24-360-image/360.jpg
--------------------------------------------------------------------------------
/feed.xml:
--------------------------------------------------------------------------------
1 | ---
2 | layout: null
3 | ---
4 |
5 |
6 |
7 | {{ site.title | xml_escape }}
8 | {{ site.description | xml_escape }}
9 | {{ site.url }}{{ site.baseurl }}/
10 |
11 | {{ site.time | date_to_rfc822 }}
12 | {{ site.time | date_to_rfc822 }}
13 | Jekyll v{{ jekyll.version }}
14 | {% for post in site.posts limit:10 %}
15 | -
16 |
{{ post.title | xml_escape }}
17 | {{ post.content | xml_escape }}
18 | {{ post.date | date_to_rfc822 }}
19 | {{ post.url | prepend: site.baseurl | prepend: site.url }}
20 | {{ post.url | prepend: site.baseurl | prepend: site.url }}
21 | {% for tag in post.tags %}
22 | {{ tag | xml_escape }}
23 | {% endfor %}
24 | {% for cat in post.categories %}
25 | {{ cat | xml_escape }}
26 | {% endfor %}
27 |
28 | {% endfor %}
29 |
30 |
31 |
--------------------------------------------------------------------------------
/tags.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: page
3 | title: Tags
4 | ---
5 |
6 |
51 |
--------------------------------------------------------------------------------