k8s-keystone-auth service is used for Kubernetes webhook authentication and authorization for OpenStack Keystone. The k8s-keystone-auth service can be running either as a static pod(controlled by kubelet) or a normal kubernetes service.继续阅读 »
You can use xmake to run the given target and need not know where is the target program.
e.g.
We define a simple target with named 'test'.
lua
target("test")
set_kind("console")
add_files("*.c")
So, we can run it directly.
bash
$xmake r test
or $xmake run test
xmake will compile it 继续阅读 »
这是一个系列文章,主要分享shell(部分功能仅适用于bash)的使用建议和技巧,每次分享3点,希望你能有所收获。
另外,这些建议和技巧都是我工作中用到的,只有我用到了才会记录并分享出来,所以没有什么顺序而言,用到什么我就分享什么。
1 sed替换文件内容
$ cat demo
this is demo
$ sed -i s/demo/test/g demo
$ cat demo
this is test
通过sed,可以很方便替换文件中的某些字符串。比如这里的demo文件只有一行内容:this is demo。通过sed将文件中的demo字符串替换成test。这里的-i选项是直接修改文件内容,字母s表示替换字符,字母g继续阅读 »
创建用户并设置密码:
mysql
create user test IDENTIFIED BY '1234546';
为新用户分配权限:
mysql
//为该用户分配所有的权限
GRANT ALL PRIVILEGES ON *.* TO 'test'@'localhost' IDENTIFIED BY '123456';
//查看当前用户的权限
SHOW GRANTS;
//撤销上一次的授权
REVOKE ALL PRIVILEGES ON *.* FROM 'test'@'localhost'
/继续阅读 »