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
-- | |
- name: Create DNS zone | |
route53_zone: | |
zone: "{{ item }}.{{ domain }}" | |
state: present | |
comment: Created with Ansible | |
with_items: "{{ dns_zone_namespaces }}" | |
register: dns_zones |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
try: | |
with util.ipmi(util.get_lom_ip(self.host))) as ipmi: | |
ipmi.foo() | |
except exceptions.IPMIError: | |
self._unwind("Failed to connect to IPMI", exceptions.IPMIError) | |
raise |
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
-include_lib("riak_core/include/riak_core_vnode.hrl"). | |
send_command(Pid, Request) -> | |
Ref = make_ref(), | |
gen_fsm:send_event(Pid, ?VNODE_REQ{request=Request, | |
sender={raw, Ref, self()}}), | |
{ok, Ref}. | |
get_response(Ref) -> | |
receive {Ref, M} -> {ok, M} |
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
end_per_testcase(_, Config) -> | |
Pid = ?config(vnode, Config), | |
send_command(Pid, stop), | |
ok. |
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
init_per_testcase(_, Config) -> | |
{ok, Pid} = riak_core_vnode:start_link(etsdb_vnode, 0, []), | |
[{vnode, Pid}| Config]. |
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
if git describe --exact-match 2> /dev/null; then | |
VERSION=$(git describe) | |
else | |
VERSION=$(git describe | sed -E 's/([0-9]+)\.([0-9]+)-([0-9]+).*/\1.\2.\3/') | |
git tag -a "$VERSION" -m "Tagging version \"${VERSION}\"" | |
fi |
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
def first_value(l): | |
for (value, time) in l: | |
if value is not None: | |
return value |
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
first_value([[null,Time]|T]) -> | |
first_value(T); | |
first_value([[Value, Time]|T]) -> | |
{ok, Value}; | |
first_value(_)-> | |
{error, no_value}. |
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
[[null,1378153440], | |
[1.0,1378153380], | |
[1.0|...], | |
[...]|...] |
NewerOlder