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.继续阅读 »
xmake在xmake.lua中提供了 $(varname) 的语法,来支持内置变量的获取,例如:
lua
add_cxflags("-I$(buildir)")
它将会在在实际编译的时候,将内置的 buildir 变量转换为实际的构建输出目录:-I./build
并且这些变量在自定义脚本中,也是可以支持的,例如:
lua
target("test")
after_build(target)
print("build ok for $(plat)!")
end
这将会在编译完后,输出:
lua
build ok for macosx!
这些内置变量,大部分都是通过配置的时候,缓存的继续阅读 »
1. Things Happen for A Reason
我最喜欢的一部电影《危情谍战》中有这样一句台词,“Things Happen for A Reason”,不知道为什么,直到今天我对这句台词的印象都很深刻,也许是当时看到这句话的时候脑海里灵光一现,或是引起共鸣才会烙下这么深刻的印象吧。几乎从那以后,不论是做事还是进行思考,我都会自然而然的养成从底层逻辑逐步的来挖掘和分析事物的核心原理。继续阅读 »
New features
Add automaticlly check libc interfaces
Support custom allocator
Add trace for allocator in the debug mode
Add static_pool module
Add stream interfaces for reading all data to string
Add adler32 hash algorithm
Add tb_memmem interface
Add regex module with pcre, pcre2 or posix regex
Changes
Optimize stre继续阅读 »
Creature Mod Tutorial 1 - "Creating a Mod"
In this tutorial we're going to learn how to create our very own mod for 'Don't Starve'. Mods are a way for players to add their own content to the game. Creating a mod is really easy. All we need is two files and a folder and we're good to go. Let's get started!继续阅读 »
Typically, you only need to execute the following command for compiling project.
bash
xmake
xmake will probe your host environment and target platform automaticly.
The default mode is release and xmake will compile all targets.
You can compile only one given target which name is 'test' for executing the follo继续阅读 »
1. 枚举 - enumerate 可以有参数哦
之前我们这样操作:
i = 0
for item in iterable:
print i, item
i += 1
现在我们这样操作:
for i, item in enumerate(iterable):
print i, item
enumerate函数还可以接收第二个参数。就像下面这样:
list(enumerate('abc'))
[(0, 'a'), (1, 'b'), (2, 'c')]
list(enumerate('abc', 1))
[(1, 'a'), (2, 'b'), (3, 'c'继续阅读 »