Skip to content

Instantly share code, notes, and snippets.

View phantomk's full-sized avatar
🎯
Focusing

0xbc phantomk

🎯
Focusing
View GitHub Profile
@phantomk
phantomk / Middleware.js
Created May 27, 2022 06:14 — forked from unbug/Middleware.js
Powerful Javascript Middleware Pattern Implementation, apply middleweares to any object. https://unbug.github.io/js-middleware/
'use strict';
/* eslint-disable consistent-this */
let middlewareManagerHash = [];
/**
* Composes single-argument functions from right to left. The rightmost
* function can take multiple arguments as it provides the signature for
* the resulting composite function.
*
! Put user rules line by line in this file.
! See https://adblockplus.org/en/filter-cheatsheet
*.githubusercontent.com/*
##
## HTTP Router benchmarks -- Jan 9, 2019 with Go 1.11.4 on Linux X1 Carbon laptop
##
## This benchmark suite is based on https://github.com/julienschmidt/go-http-routing-benchmark
## using the most up-to-date version of each pkg as of today. Each router has their own
## pros and cons, so consider the designs of each router to suit your application.
##
## We use the most up-to-date version of each router available in the tests below.
##
@phantomk
phantomk / Clear-unwanted-URL-on-Chrome-address-bar.md
Created August 21, 2019 23:58 — forked from muink/Clear-unwanted-URL-on-Chrome-address-bar.md
删除Chrome地址栏记录中不需要的网址

删除Chrome地址栏记录中不需要的网址(访问历史)

Chrome的地址栏自动补齐功能提供了非常方便的地址预测功能 浏览器可以通过用户当前输入的字符来与用户的访问历史与书签匹配 然后在下拉栏中为用提供准确的补齐方案排名, 提高用户访问效率

在大部分情况下, 这个功能是非常好用的 但是有时, 出于某些原因, 用户需要移除某个记录(网址无法访问,网址更换域名等) Chrome提供了组合键Shift+Delete来删除地址栏下拉记录中的某个网址

.card {
font-family: PingFang SC;
font-size: 1em;
}
.Back {
font-family: arial;
font-size: 1em;
border-radius: 1.2em 0.3em;
{
"window.openFilesInNewWindow": "on",
"window.restoreWindows": "all",
"window.openFoldersInNewWindow": "on",
"editor.snippetSuggestions": "top",
"editor.cursorStyle": "block",
"editor.lineHeight": 30,
"debug.allowBreakpointsEverywhere": true,
"editor.fontFamily": " 'M+ 1mn', 'Operator Mono', 'Fantasque Sans Mono', 'SFMono-Regular', 'Fira Code', 'Ubuntu Mono', 'iosevka', 'inconsolata'",
// Enables font ligatures
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phantomk
phantomk / README.md
Last active February 3, 2019 06:26
Makedown here theme

markdown here 的主题,参考了李笑来的主题

优化:

  • 3 级标题起移除居中顶格
  • 列表样式为小黑点
  • 链接添加下划线以便识别

主题:

  • 清新绿
  • 活力橙
echo "CPU型号: "
sysctl -n machdep.cpu.brand_string
echo "CPU核心数: "
sysctl -n machdep.cpu.core_count
echo "CPU线程数: "
sysctl -n machdep.cpu.thread_count
echo "其它信息:"
@phantomk
phantomk / readme.md
Created December 10, 2018 12:02 — forked from iest/readme.md
Moving from lodash/fp to ramda

Moving from lodash/fp to ramda

How

Good news is we're only using lodash/fp, which makes it easier to match function signatures.

  1. Find most-used lodash methods, we'll convert these first maybe?
  2. Go through each lodash method, find the ramda equivalent where possible
  3. Write a codemod to rewrite those usages
  4. Who the fuck thought function aliases were a good idea