I hereby claim:
- I am palazzem on github.
- I am palazzem (https://keybase.io/palazzem) on keybase.
- I have a public key ASCRinl2svThLRKvJf0vYiwH9MD2-ReufZWfDBN5uVvMIwo
To claim this, I am signing this object:
# Android | |
gen/ | |
build/ | |
# Gradle | |
.gradle/ | |
local.properties | |
# Old Android | |
bin/ |
#! /bin/bash | |
# Bash script to create a self signed CA and a server certificate | |
# This script is unattended and (for this reason), the CA key | |
# doesn't require any password to be used. This is __NOT__ a good | |
# behaviour in a production environment so USE IT AT YOUR OWN RISK! | |
# Configure CA structure | |
mkdir -m 0700 -p \ | |
./demoCA/private \ |
#!/bin/bash | |
VENV=$1 | |
if [ -z $VENV ]; then | |
echo "usage: runinenv [virtualenv_path] CMDS" | |
exit 1 | |
fi | |
. ${VENV}/bin/activate | |
if [ -f ${VENV}/bin/postactivate ]; then | |
. ${VENV}/bin/postactivate |
#!/usr/bin/env python | |
from __future__ import absolute_import, division, print_function, \ | |
unicode_literals | |
from concurrent.futures import ThreadPoolExecutor | |
from ddtrace import tracer | |
from ddtrace.contrib.tornado import trace_app | |
from random import uniform | |
from time import sleep |
import asyncio | |
def set_current_context(ctx, loop=None): | |
# retrieves the current Task | |
loop = loop or asyncio.get_event_loop() | |
task = asyncio.Task.current_task(loop=loop) | |
# attach the Context to the task! | |
setattr(task, '__current_ctx', ctx) | |
def get_current_context(loop=None): |
I hereby claim:
To claim this, I am signing this object:
import requests | |
from datetime import datetime, timedelta | |
from datadog import initialize, statsd | |
options = { | |
'api_key':'your_datadog_key_here', | |
} | |
# don't use a trailing slash |
import asyncio | |
def set_current_context(ctx, loop=None): | |
# retrieves the current Task | |
loop = loop or asyncio.get_event_loop() | |
task = asyncio.Task.current_task(loop=loop) | |
# attach the Context to the task! | |
setattr(task, '__current_ctx', ctx) |
class Handler(object): | |
async def handle_request(self, request): | |
# set the current context | |
ctx = {} | |
set_current_context(ctx) | |
ctx['username'] = request.get('username', 'Anonymous') | |
result = await retrieve_user_data() | |
return result |
# Install the Datadog Agent | |
mkdir -p /opt/datadog-agent/ | |
mkdir -p /var/log/datadog/ | |
mv ~/agent-armv7-package/agent /opt/datadog-agent/ | |
mv ~/agent-armv7-package/dist /opt/datadog-agent/ | |
mv ~/agent-armv7-package/datadog-agent /etc/ | |
# Create dd-agent user and set permissions | |
addgroup dd-agent | |
adduser --system --no-create-home --disabled-password --ingroup dd-agent dd-agent |