To install, place datadog.py
in your callback plugins directory. If you don't yet have one, run:
mkdir -p plugins/callback
Then place the following in your ansible.cfg
file:
[defaults]
callback_plugins = ./plugins/callback
""" | |
Custom parser for nginx log suitable for use by Datadog 'dogstreams'. | |
To use, add to datadog.conf as follows: | |
dogstreams: [path to ngnix log (e.g: "/var/log/nginx/access.log"]:[path to this python script (e.g "/usr/share/datadog/agent/dogstream/nginx.py")]:[name of parsing method of this file ("parse")] | |
so, an example line would be: | |
dogstreams: /var/log/nginx/access.log:/usr/share/datadog/agent/dogstream/nginx.py:parse | |
Log of nginx should be defined like that: | |
log_format time_log '$time_local "$request" S=$status $bytes_sent T=$request_time R=$http_x_forwarded_for'; | |
when starting dd-agent, you can find the collector.log and check if the dogstream initialized successfully | |
""" |
SUITE_NAME=default | |
# create a bats subdirectory under your desired suite | |
mkdir -p test/integration/$SUITE_NAME/bats | |
# create an initial "canary" bats test file | |
# more examples at: | |
# * https://github.com/fnichol/chef-rvm/tree/master/test/integration/rubies/bats | |
# * https://github.com/fnichol/chef-ruby_build/tree/master/test/integration/alltherubies/bats | |
# * https://github.com/sstephenson/bats |
Vagrant::Config.run do |config| | |
# ... | |
config.vm.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
end |
// https://github.com/settings/replies | |
// Settings > Saved Replies | |
// Execute in JS console. | |
(async function generateReplies(document) { | |
// https://conventionalcomments.org/#labels | |
const LABEL = { | |
praise: "praise", | |
nitpick: "nitpick", | |
suggestion: "suggestion", | |
issue: "issue", |
$ git branch -r --merged | | |
grep origin | | |
grep -v '>' | | |
grep -v master | | |
xargs -L1 | | |
awk '{split($0,a,"/"); print a[2]}' | | |
xargs git push origin --delete |
net.core.somaxconn = 32768 | |
net.ipv4.conf.all.send_redirects = 1 | |
net.ipv4.ip_nonlocal_bind = 1 | |
net.ipv4.tcp_abort_on_overflow = 0 | |
net.ipv4.tcp_fin_timeout = 10 | |
net.ipv4.tcp_keepalive_time = 300 | |
net.ipv4.tcp_max_orphans = 262144 | |
net.ipv4.tcp_max_syn_backlog = 16384 | |
net.ipv4.tcp_max_tw_buckets = 262144 | |
net.ipv4.tcp_mem = 200000 280000 300000 |
I got sick of writing the same Serializer & ModelViewSet classes over and over so I found and wrote some code to do it for me, and somehow it works! Please note that there are a lot of caveats to running an API like this and while this may work, I know there's A LOT of room for improvement, feel free to fork and help!
Import the router
module to your main sites urls.py file as the injection point like so...
Make sure to remove any other imports from other viewsets that you don't need that may conflict!
import requests | |
import logging | |
import httplib | |
# Debug logging | |
httplib.HTTPConnection.debuglevel = 1 | |
logging.basicConfig() | |
logging.getLogger().setLevel(logging.DEBUG) | |
req_log = logging.getLogger('requests.packages.urllib3') | |
req_log.setLevel(logging.DEBUG) |
I'm doing some research on how companies use GitHub Enterprise (or public GitHub) internally. If you can help out by answering a few questions, I'd greatly appreciate it.