- 博客(6)
- 收藏
- 关注
原创 记一次scp permission denied
scp ./somefile.txt admin@somemachine:/path/to/right/place>permission denied原因是目标机器的目标目录在admin用户登陆时没有写权限,可以换root用户登陆,或者考到admin用户有写权限的目录下。...
2018-10-29 14:23:41 841
原创 curl 401 unauthorized解决
用curl获取web信息时遇到了401unauthorized错误。用下面的命令解决了:curl --insecure --anyauth -u admin:password -X GET https://somesitewithunauthrorizedisssue.com记录一下
2018-10-23 09:35:52 20386 6
原创 python默认参数的坑以及最佳实践
// An exampledef addEnd(L=[]): L.append("end") return Lprint addEnd()#["end"]print addEnd()#["end", "end"]坑!!!对一切的列表有记忆了,不是我们想要的print的结果和想象中不同, 从上述调用结果发现,函数每次都记住了上次
2018-10-19 15:54:49 321
原创 docker image save成tar包,tar包load成image
docker的命令都很简洁,我喜欢。将一个tar包load成一个image:docker load < my.tar 或者 docker load -i my.tar将image save成tar包: docker save logmanager:1.0 >...
2018-10-16 10:08:32 26560
原创 DoS攻击与Rate Limiting
Dos(Denial of Service) attack: trying to make a system overloaded by sending lots of requests.It's analogous to a group of people crowding the entry door of a shop, making it hard for real customers...
2018-10-10 15:42:52 128
转载 goroutine和channel与死锁详解
Go语言中有个概念叫做goroutine, 这类似我们熟知的线程,但是更轻。goroutine和线程的具体区别在于:1. OS的线程由OS内核调度,每隔几毫秒,一个硬件时钟中断发到CPU,CPU调用一个调度器内核函数。这个函数暂停当前正在运行的线程,把他的寄存器信息保存到内存中,查看线程列表并决定接下来运行哪一个线程,再从内存中恢复线程的注册表信息,最后继续执行选中的线程。这种线程切换需要...
2018-10-08 15:51:52 785
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人