Skip to content

Instantly share code, notes, and snippets.

View njleonzhang's full-sized avatar
💭
I may be slow to respond.

Leon Zhang njleonzhang

💭
I may be slow to respond.
View GitHub Profile
https://github.com/FiloSottile/mkcert
@njleonzhang
njleonzhang / gist:3227698cd0801d456a7133de9f974b66
Created October 13, 2022 13:31
upgrade gcc/g++ on centos 7.6
refer: https://blog.csdn.net/chen134225/article/details/109856696
yum install centos-release-scl
yum list dev\*gcc
yum install devtoolset-8-gcc devtoolset-8-gcc-c++
echo "source /opt/rh/devtoolset-8/enable" >> ~/.zshrc
. ~/bashrc
@njleonzhang
njleonzhang / gist:4067e0867de01a08767ffdcf7d34510b
Last active October 13, 2022 13:14
instal python3.7 on centos 7.6
ref:
https://github.com/pyenv/pyenv-installer
https://github.com/pyenv/pyenv#getting-pyenv
1. install pyenv
```
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
```
@njleonzhang
njleonzhang / compose1.js
Last active August 23, 2020 17:01
compose
function fn1(num) {
console.log('fn1', num)
return num
}
function fn2(num) {
console.log('fn2', num)
return num
}
试试:
1. line-height 设置为 normal
2. inline 元素,底部距离 (将其父元素的 font-size 设置为 0)
3. 字 + iconfont 的场景,不设置父元素高度由子元素撑开的时候,图标可能会有明显的偏差。
```
.mp-article-content-more-text {
position: absolute;
bottom: 50px;
left: 0;
import Vue from 'vue'
// 传入一个组件配置
// 创建它的实例,并且将它挂载到body上
// 返回组件实例
// export default function create(Component, props) {
// // 实例创建
// // 作业:使用extend方式创建组件实例并挂载
// // extend方法返回的组件构造函数
@njleonzhang
njleonzhang / gist:dbf6051b8f42d8ed68c8ededf9fdf150
Last active October 29, 2018 02:10
服务器地址变化后,需要修改各个服务
@njleonzhang
njleonzhang / index.md
Last active November 8, 2018 02:58
华为 AR 路由器配置静态 dns 解析

登录华为路由器

telnet 192.168.20.1

进入system view

system-view
@njleonzhang
njleonzhang / gist:33f3a5ae9eb5ebedc6145568c19b0a1b
Created October 16, 2018 11:10
autoimport should care about semicolons #37991
https://github.com/Microsoft/vscode/blob/master/extensions/typescript-language-features/src/features/fileConfigurationManager.ts
https://github.com/Microsoft/vscode/issues/37991
@njleonzhang
njleonzhang / index.js
Last active August 21, 2018 02:02
Vue jsx transform sample
const Babel = require('babel-core')
const vueJsx = require('babel-plugin-transform-vue-jsx')
let code = `
function render() {
return (
<div>
<div leon={a} onClick={this.click()}
{...{
props: {