This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Custom measure="call" label="Workers: active">cocaine-tool info --name=ruby-v0.12 | python -c "import json, sys; c = json.loads(sys.stdin.read()); r = c['apps']['ruby-v0.12']['slaves']['active']; sys.stdout.write(str(r))"</Custom> | |
<Custom measure="call" label="Workers: idle">cocaine-tool info --name=ruby-v0.12 | python -c "import json, sys; c = json.loads(sys.stdin.read()); r = c['apps']['ruby-v0.12']['slaves']['idle']; sys.stdout.write(str(r))"</Custom> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -c 'import time; print(time.strftime("%a, %d %b %Y %H:%M:%S %z", time.localtime()))' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mixin template UriBasedRequest(T) { | |
public string uri() @property const { | |
UriBuilder builder = new UriBuilder(); | |
string[] paths; | |
foreach (memberName; __traits(allMembers, T)) { | |
// TODO: Iterate only over fields. | |
alias Member = TypeTuple!(__traits(getMember, this, memberName))[0]; | |
alias MemberType = typeof(Member); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename T> | |
struct FormatTraits; | |
template<std::size_t N> | |
struct FormatTraits<char[N]> { | |
constexpr static bool supports(char c) { | |
return c == 's'; | |
} | |
}; |
NewerOlder