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
dcomp(){ | |
local bdout=$(boot2docker status) 2>/dev/null | |
if [ $bdout = 'poweroff' ]; then | |
boot2docker up && $(boot2docker shellinit) | |
fi | |
docker-compose $* | |
} |
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_config: | |
instances: | |
# Most memstats metrics are exported by default | |
# See http://godoc.org/runtime#MemStats for their explanation | |
- expvar_url: http://localhost:8000/debug/vars | |
tags: | |
- "application_name:myapp" | |
- "optionaltag2" |
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
#!/bin/zsh | |
# use webtest.sh <url to visit> | |
zmodload -i zsh/mathfunc | |
for i in {1..1000} | |
do | |
sleep $(( rand48()*2 )) | |
curl $1 | |
done |
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
package main | |
import ( | |
"expvar" | |
"github.com/paulbellamy/ratecounter" | |
"io" | |
"net/http" | |
"strconv" | |
"time" | |
) |
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_config: | |
instances: | |
- search: top |
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
from checks import AgentCheck | |
import re | |
import psutil | |
class CheckProcessNotRunning(AgentCheck): | |
def check(self, instance): | |
search = instance['search'] | |
running_names = [p.name().strip() for p in psutil.process_iter()] | |
matched = len([n for n in running_names if re.match(search, n)]) | |
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_config: | |
instances: | |
- name: My service | |
host: datadog.com | |
port: 8080 | |
window: 5 | |
threshold: 3 |
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
from dogapi import dog_http_api as api | |
api.api_key = 'YOUR_API_KEY' | |
api.application_key = 'YOUR_APPLICATION_KEY' | |
# Submit a single point with a timestamp of `now` | |
api.metric('page.views', 1000) | |
#see more examples here: http://docs.datadoghq.com/api/ |
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
<?php | |
/** | |
* Template Name: SliderTest | |
*/ | |
wp_enqueue_style( 'royal_slider_css', get_template_directory_uri() . "/royalslider/royalslider.css"); | |
wp_enqueue_style( "royal_slider_default_skin_css", get_template_directory_uri() . "/royalslider/skins/default/rs-default.css" ); | |
wp_enqueue_script( "royal_slider_js", get_template_directory_uri() . "/royalslider/jquery.royalslider.min.js"); | |
get_header( ); |
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
<div class="search-item"> | |
<label>Neighborhoods:</label> | |
<select id=hoodselect name='hood-select'> | |
<option value="">Any</option> | |
</select> | |
</div> | |
<div class="search-item"> | |
<label>Min Beds:</label>[min_beds] | |
</div> | |
<div class="search-item"> |