楓

—— 风落花语风落天,花落风雨花落田.

  • 代码人生
    • 分享世界
    • 你不懂我
    • 我不怪你
  • 字符艺术
  • 人生苦短
  • 极客安全
  • 文章归档
    • 标签
    • 分类
    • 作者
  • 关于
  • 公共DNS

    三 14 四月 2021 | By honmaple | In Life | 0f dns

    Table of Contents

    • 百度DNS
      • IPv4
      • IPv6
    • 阿里DNS
      • IPv4
      • IPv6
      • DoH/DoT地址
    • 谷歌DNS
      • IPv4
      • IPv6

    百度DNS

    IPv4

    • 180.76.76.76

    IPv6

    • 2400:da00::6666

    阿里DNS

    IPv4

    • 223.5.5.5

    • 223.6.6.6

    IPv6

    • 2400:3200::1

    • 2400:3200:baba::1

    DoH/DoT地址

    • dns.alidns.com

    谷歌DNS

    IPv4 …

    阅读全文 »
  • 时代

    三 07 四月 2021 | By honmaple | In Life | 0f life

    有时候总是忍不住思考
    我是不是把自己隐私保护的太好
    以至于在这个时代
    一个最好也是最坏的时代
    感到那么的不适应
    ...

    阅读全文 »
  • python2升级至python3

    一 22 三月 2021 | By honmaple | In Python | 0f python

    Table of Contents

    • print
    • string
    • 比值问题
    • 编码问题
      • sys.setdefaultencoding('utf-8')
      • encode、decode
      • 编码转换
    • cmp
    • sorted
    • Exception
    • SSL
    • file.read
    • redis
    • requests
      • 自定义编码请求
        • post json
        • post form
      • 响应编码
      • 请求headers顺序
    • django

    首先使用工具 2to3 转换

    2to3 目录名 -w -n
    

    print

    https://stackoverflow.com/questions/55559825/how-to-fix-print-double-parentheses-after-2to3-conversion

    • 问题: 如果在python2项目里使用了python3的写法,比如在 python2 里的 print …

    阅读全文 »
  • pyenv笔记

    四 18 三月 2021 | By honmaple | In Linux | 0f linux

    Table of Contents

    • 常见问题
      • pyenv install 3.6.7 失败
        • 相关日志
        • 解决方式
        • 参考文档

    常见问题

    pyenv install 3.6.7 失败

    • 环境: macOs big Sur 11.2.2

    • pyenv: 1.2.23

    相关日志

    ┌─[jianglin]─[~/repo/golang/src/alarm](master)
    └──╼ pyenv install 3.6.7
    python-build: use openssl@1.1 …
    阅读全文 »
  • golang笔记之struct转map性能比较

    一 21 九月 2020 | By honmaple | In Linux | 0f linux golang

    package main
    
    import (
        "encoding/json"
        "reflect"
        "testing"
    )
    
    type A struct {
        A string   `json:"a"`
        B string   `json:"b"`
        C int      `json:"c"`
        D int      `json:"d"`
        E []string `json:"e"`
        F []int    `json:"f"`
    }
    
    var a = &A{
        "string",
        "test",
        15,
        1024,
        []string{"vvv", "ssss", "44444"},
        []int{100, 4012},
    }
    
    func …
    阅读全文 »
  • rust笔记

    二 08 九月 2020 | By honmaple | In Linux | 0f linux rust

    Table of Contents

    • 安装
    • 更新
    • 交叉编译

    安装

    • 安装

      └──╼ brew install rustup
      └──╼ rustup-init
      ......
      1) Proceed with installation (default)
      2) Customize installation
      3) Cancel installation
      >1
      
    • 配置 rust 目录

      └──╼ mkdir $HOME/repo/rust
      └──╼ mv $HOME/.rustup $HOME/repo/rust/rustup
      └──╼ mv $HOME/.cargo $HOME/repo/rust/cargo
      

      写入 .bashrc 文件

      export …
    阅读全文 »
  • golang笔记之interface类型判断性能

    五 21 八月 2020 | By honmaple | In Linux | 0f linux golang

    package main
    
    import "testing"
    
    type InterfaceA interface {
        AA()
    }
    
    type InterfaceB interface {
        BB()
    }
    
    type A struct {
        v int
    }
    
    func (a *A) AA() {
        a.v += 1
    }
    
    func BenchmarkTypeSwitch(b *testing.B) {
        var a = new(A)
    
        switchFunc := func(v interface{}) {
            switch v.(type) {
            case InterfaceA:
                v.(InterfaceA).AA()
            case InterfaceB:
                v.(InterfaceB …
    阅读全文 »
  • K8S笔记之私有仓库搭建

    四 20 二月 2020 | By honmaple | In Linux | 0f linux k8s

    Table of Contents

    • 创建PV
    • 搭建仓库
      • 命名空间
      • https验证
      • 用户名密码验证
    • 创建service
    • 创建ingress
    • 测试Docker仓库
      • 修改host
      • 更新Docker证书
      • 登陆仓库
      • 测试上传与下载
    • FAQ
      • x509: certificate is valid for ingress.local, not registry.k8s.cloud
      • x509: certificate signed by unknown authority
      • 413 Request Entity Too Large
    • 参考资料

    创建PV

    关于PV的创建参考 《K8S笔记之持久化存储》

    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      name: docker-claim …
    阅读全文 »
  • KVM笔记之磁盘扩容

    四 09 一月 2020 | By honmaple | In Linux | 0f linux kvm

    Table of Contents

    • 磁盘扩容
      • 关闭KVM虚拟机
      • 扩容磁盘
        • 查看磁盘位置
        • 查看磁盘信息
        • 扩容磁盘大小
      • 扩容虚拟机分区
        • 启动虚拟机
        • 查看磁盘大小和格式
        • 扩容磁盘
        • DONELVM磁盘扩容
    • 磁盘挂载
      • 创建磁盘
      • 挂载磁盘
        • 挂载命令
        • 卸载命令
      • 格式化磁盘
        • 格式化分区
        • 格式化文件系统
        • 挂载磁盘
    • FAQ
      • unexpected output in sfdisk --version
      • DOS partition table format cannot be used on drives for volumes larger than 2T
    • 参考链接

    磁盘扩容

    关闭KVM虚拟机

    virsh shutdown …
    阅读全文 »
    • «
    • 1
    • 2
    • 3
    • ......
    • 20
    • 21
    • 22
    • »
  • © 2015-2023 honmaple
  • ·
  • 友链 | 联系 | 项目 | 时间轴