会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
hao.ma
http://weibo.com/haomase7en
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
···
23
下一页
2018年4月3日
lspci: command not found
摘要: [root@iz2ze21jffs548gf9mtp7uz ~]# lspci -bash: lspci: command not found [root@iz2ze21jffs548gf9mtp7uz ~]# yum install pciutils
阅读全文
posted @ 2018-04-03 17:45 hao.ma
阅读(707)
评论(0)
推荐(0)
2018年3月31日
golang new make 区别
摘要: make用于内建类型(map、slice 和channel)的内存分配 new用于各种类型的内存分配 new(T)分配了零值填充的T类型的内存空间, 并且返回其地址,即一个*T类型的值 内建函数make(T, args)与new(T)有着不同的功能,make只能创建slice、map和channel
阅读全文
posted @ 2018-03-31 21:36 hao.ma
阅读(204)
评论(0)
推荐(0)
2018年3月27日
kubernetes RBAC
摘要: Role: kind: Role apiVersion: rbac.authorization.k8s.io/v1 metadata: namespace: gauss name: gauss-op rules: - apiGroups: ["*"] resources: ["*"] verbs:
阅读全文
posted @ 2018-03-27 19:18 hao.ma
阅读(301)
评论(0)
推荐(0)
2018年3月15日
Go: invalid operation - type *map[key]value does not support indexing
摘要: package main import "fmt" type Currency string type Amount struct { Currency Currency Value float32 } type Balance map[Currency]float32 func (b *Balance) Add(amount Amount) *Balance { ...
阅读全文
posted @ 2018-03-15 20:54 hao.ma
阅读(1687)
评论(0)
推荐(0)
2018年2月23日
golang install
摘要: 下载golang, 建议直接下载编译好的二进制包 下载地址: https://golang.org/dl/ 下载好后解压,然后放置在指定位置: 然后配置环境 安装好go以后, 安装vim环境 vim 的版本是有要求的,建议去vim官网: http://www.vim.org/download.php
阅读全文
posted @ 2018-02-23 19:06 hao.ma
阅读(527)
评论(0)
推荐(0)
2018年1月30日
显示一个目录下多个文件内容及文件名字
摘要: tail -n +1 -- *.txt more * | cat for f in *; do echo "Filename: $f"; cat "$f"; done find . -name \*.txt -print -exec cat {} \; grep -r '.*' *.txt
阅读全文
posted @ 2018-01-30 18:57 hao.ma
阅读(413)
评论(0)
推荐(0)
2018年1月14日
docker namespace
摘要: 目前docker完成6项隔离 Linux 内核3.8及以后的版本 namespace 的API包括 clone() setns() unshare() Mount namespace: 隔离文件系统挂载点,每个进程能看到的文件系统都记录在/proc/$$/mounts里, UTS namespace
阅读全文
posted @ 2018-01-14 13:29 hao.ma
阅读(412)
评论(0)
推荐(0)
2018年1月13日
docker registry
摘要: docker-registry : 构建私有镜像 sudo docker run -d -p 5000:5000 registry
阅读全文
posted @ 2018-01-13 16:33 hao.ma
阅读(159)
评论(0)
推荐(0)
2018年1月2日
fdisk (最大2T) 非交互式
摘要: check_home=`df -lh | grep /dev/vdb1 | grep home` if [ ${#check_home} -gt 20 ]; then echo "dev/vdb1 /home exist !" exit 0 fi #begin part disk fdisk /dev/vdb > /etc/fstab fi mkdir -p /opt/ne...
阅读全文
posted @ 2018-01-02 14:39 hao.ma
阅读(579)
评论(0)
推荐(0)
2017年12月29日
docker image makeing
摘要: #启动镜像 sudo docker run --name webserver -d -p 80:80 nginx #查看镜像和启动镜像区别 sudo docker diff webserver #直接提交镜像 sudo docker commit \ --author "allenhaozi@gma
阅读全文
posted @ 2017-12-29 20:41 hao.ma
阅读(221)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
···
23
下一页
公告