Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| Recording Rule Example 1 | |
| ================================ | |
| # Aggregating up requests per second that has a path label: | |
| - record: instance_path:requests:rate5m | |
| expr: rate(requests_total{job="myjob"}[5m]) | |
| - record: path:requests:rate5m | |
| expr: sum without (instance)(instance_path:requests:rate5m{job="myjob"}) | |
| Recording Rule Example 2 |
| # Add field | |
| echo '{"hello": "world"}' | jq --arg foo bar '. + {foo: $foo}' | |
| # { | |
| # "hello": "world", | |
| # "foo": "bar" | |
| # } | |
| # Override field value | |
| echo '{"hello": "world"}' | jq --arg foo bar '. + {hello: $foo}' | |
| { |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| abc 1 2 3 | |
| def 4 5 6 | |
| ga 7 9 10 | |
| hij 1 5 99 |
| /* | |
| Call the api client like this: | |
| var client = new ApiClient<SEnvelope>("https://baseurl.com/api/v1"); | |
| //you would overload and add an auth_token param here | |
| client.GetDtoAsync("envelopes", "object_id", (response) => //callback | |
| { | |
| this.SEnvelope = response.Data;//should be an envelope from the server | |
| }); | |
| #Reference | |
| #https://devnotcorp.wordpress.com/2012/08/21/usage-examples-of-rubys-openssl-lib/ | |
| #!/usr/bin/ruby | |
| require 'openssl' | |
| require 'date' | |
| require 'time' | |
| package main | |
| import ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "flag" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| ) |