Creat second disk for k8s
In Vagrantfile, add the following customized command to create disk for k8s source code.
The vagrant/virtual box will create a disk with only 10Gi by default, which is not enough for k8s's build & test.继续阅读 »
Python Stackoverflow 经典问题
What does the “yield” keyword do?
What is a metaclass in Python?
How do I check whether a file exists using Python?
Does Python have a ternary conditional operator?
Calling an external command in Python
What does if __name__ == “__main__”: do?
How to make a chain of function decorators in继续阅读 »
New features
Support make command and compile directly without xmake
Add switch context interfaces into platform module
Add coroutine module (supports i386, x86_64, arm, arm64 ..)
Add simple http server demo using coroutine
Add simple spider using coroutine
Add io poller interfaces(with epoll, poll, kqueue, select)
Su继续阅读 »
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继续阅读 »
xmake v2.0 has supported the plugin module and we can develop ourself plugin module conveniently.
We can run command xmake -h to look over some builtin plugins of xmake
Plugins:
l, lua Run the lua script.
m, macro Run the given macro.继续阅读 »