愿星光伴随你左右


  • 首页

  • todo

  • 思考

  • life

  • food

  • OS

  • lua

  • redis

  • Golang

  • C

  • TCP/IP

  • ebpf

  • p4

  • OpenVPN

  • IPSec

  • L2TP

  • DNS

  • distributed

  • web

  • OpenWRT

  • 运维

  • Git

  • 鸟哥的私房菜

  • IT杂谈

  • 投资

  • About Me

  • 友情链接

  • FTP

  • 搜索
close

golang 中 channel 的详细使用、使用注意事项及死锁分析

时间: 2022-09-29   |   分类: go     |   阅读: 4639 字 ~10分钟

golang 中 channel 的详细使用、使用注意事项及死锁分析

什么是 channel 管道#

它是一个数据管道,可以往里面写数据,从里面读数据。

channel 是 goroutine 之间数据通信桥梁,而且是线程安全的。

阅读全文 »

Copy a slice in Go

时间: 2022-09-29   |   分类: go     |   阅读: 384 字 ~1分钟

To duplicate a slice in Go, getting a deep copy of its contents, you need to either use the built-in copy() function, or create a new empty slice and add all the elements of the first slice to it using the append() function. Because of how slices are built in Go, assigning one slice to another only makes a shallow copy, and you should not use it if you want to clone the slice in a deep way.

阅读全文 »

Ubuntu 20.04 修改时区和同步时间

时间: 2022-09-29   |   分类: 运维     |   阅读: 58 字 ~1分钟

查看系统支持的时区

​ timedatectl list-timezones

设置想要的时区

​ sudo timedatectl set-timezone Asia/Shanghai

​ 或者 sudo timedatectl set-timezone Asia/Hong_Kong

查看设置结果

​ date

安装同步软件

​ apt-get install ntp

和服务器同步

​ ntpdate time.nist.gov

CentOS8上安装 Samba

时间: 2022-09-29   |   分类: 运维     |   阅读: 647 字 ~2分钟

centos 8安装Samba服务器及配置

1首先通过命令查看samba的安装情况 rpm -ql | grep samba 查看centos版本 [root@localhost ~]# rpm -q centos-release centos-release-8.1-1.1911.0.8.el8.x86_64 2在线安装samba服务器 yum -y install samba3查看samba服务配置文件 root@localhost ~]# gedit /etc/samba/smb.conf 配置文件内容如下

阅读全文 »

Ubuntu linux编译alsa-lib报错 automake-1.16: command not found 的解决方案

时间: 2022-09-29   |   分类: 运维     |   阅读: 285 字 ~1分钟

在编译alsa的时候报错,config完毕后,make错误如下: line 81: automake-1.16: command not found

而我的automke的版本为1.15

于是卸载了这个automake后,http://ftp.gnu.org/gnu/automake/下载了最新的1.16,然后安装,然后继续编译alsa,报错:

阅读全文 »

Gitlib部署简介

时间: 2022-09-29   |   分类: 运维     |   阅读: 2364 字 ~5分钟

一、前言

1、本文主要内容

  • GitLab社区版部署

  • GitLab配置禁用创建组权限

  • GitLab配置邮件(SMTP)

  • Gitlab备份配置

  • GitLab常用命令说明

    2、GitLab介绍

    GitLab一个开源的git仓库管理平台,方便团队协作开发、管理。在GitLab上可以实现完整的CI(持续集成)、CD(持续发布)流程。而且还提供了免费使用的Plan,以及免费的可以独立部署的社区版本(https://gitlab.com/gitlab-org/gitlab-ce )。官网:https://about.gitlab.com/

阅读全文 »

磁盘那些事

时间: 2022-09-29   |   分类: IT     |   阅读: 11794 字 ~24分钟

背景

计算机硬件性能在过去十年间的发展普遍遵循摩尔定律,通用计算机的CPU主频早已超过3GHz,内存也进入了普及DDR4的时代。然而传统硬盘虽然在存储容量上增长迅速,但是在读写性能上并无明显提升,同时SSD硬盘价格高昂,不能在短时间内完全替代传统硬盘。传统磁盘的I/O读写速度成为了计算机系统性能提高的瓶颈,制约了计算机整体性能的发展。

阅读全文 »

Git生成patch和打patch

时间: 2022-09-29   |   分类: 运维   Git     |   阅读: 2148 字 ~5分钟

git生成patch和打patch

日常开发与合作过程中,对于code生成patch和打patch(应用patch)成为经常需要做的事情,使用方法(直接给出一些examples):

阅读全文 »
29 30 31 32 33 34 35 36 37

日志
分类
标签
RSS 订阅
GitHub
© 2009 - 2025
粤ICP备2021068940号-1 粤公网安备44011302003059
0%