Skip to content

Instantly share code, notes, and snippets.

View vimcaw's full-sized avatar

Changsheng Zhu vimcaw

  • Shenzhen, China
  • 15:25 (UTC +08:00)
View GitHub Profile
@vimcaw
vimcaw / index.html
Created September 4, 2022 06:14
让网页在双核浏览器中使用 Chromium 内核
<!-- 使用 Chromium 内核,作用于 360 浏览器、QQ 浏览器等国产双核浏览器 -->
<meta name="renderer" content="webkit" />
<!-- 使用 Chromium 内核,作用于其他双核浏览器 -->
<meta name="force-rendering" content="webkit" />
<!-- 如果有安装 Google Chrome Frame 插件则使用 Chromium 内核,否则使用本机支持的最高版本 IE 内核,作用于 IE 浏览器 -->
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
@vimcaw
vimcaw / AsyncButton.tsx
Last active September 20, 2022 07:48
Automatically switch button loading state when onClick passes an asynchronous function or return a Promise on Ant Design
import React, { useState } from 'react';
import { Button } from 'antd';
import { ButtonProps } from 'antd/lib/button';
function isPromise(value: unknown): value is Promise<unknown> {
// ref: https://stackoverflow.com/questions/27746304/how-do-i-tell-if-an-object-is-a-promise
return (
typeof value === 'object' &&
value !== null &&
@vimcaw
vimcaw / Intsall Wireless USB Adapter Clover on OpenCore Bootloader.md
Created June 3, 2020 06:08
Intsall Wireless USB Adapter Clover on OpenCore Bootloader
  1. Unarchiver Wireless USB Adapter Clover-V15.pkg.
  2. Right Click on drivers.pkg, click Show Package Contents.
  3. Unarchiver Payload, you will get a Payload-1.
  4. Unarchiver Payload-1, you will get the EFI folder, kext files are here.
@vimcaw
vimcaw / craco.config.js
Created May 16, 2020 02:59
Using craco to override creat-react-app htmlWebpackPlugin options
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = () => {
return {
webpack: {
configure: (webpackConfig, { env }) => {
if (env !== 'development') {
const htmlWebpackPluginInstance = webpackConfig.plugins.find(
webpackPlugin => webpackPlugin instanceof HtmlWebpackPlugin
);