Skip to content

Instantly share code, notes, and snippets.

@danish1010
danish1010 / Kitchen.md
Last active December 22, 2018 17:29
Kitchen maintence

Teak Wood Cutting Board

Maintenance:

Period: Every day use

Task: Wash wooden boards with a bit of soap, rinse in hot water, wipe clean, and allow to dry upright.

Period: Every few weeks Task

@danish1010
danish1010 / GIT.md
Last active January 4, 2019 05:25
GIT cheatsheet

Checkout master version of a file

git checkout origin/master -- api/routes.ts

Merge changes from BranchA into BranchB

git checkout BranchB
git merge BranchA
@danish1010
danish1010 / sample.py
Last active March 26, 2019 18:12
SAMPLE API INTERFACE
from app.lib.metrics import Summary, Counter, Guage, Profile
MEASURE_DEMO_TASK = Profile(
name = 'demo_task',
documentation = 'Measure throughput, latency and errors for demo task',
namespace = 'manage.project'
)
class DemoTaskHandler(TaskHandler):
@danish1010
danish1010 / web_server.py
Last active April 18, 2019 15:54
RUNNING Datadog in GAE
def get_request_from_user():
payload = {
metric_name: 'xyz',
value: 1
}
# Add payload to the queue
# which would we picked up by the worker to flush metric
add_job_to_metrics_flush_worker(payload)