Skip to content

Instantly share code, notes, and snippets.

View Petelin's full-sized avatar

lin Petelin

View GitHub Profile
@Petelin
Petelin / limit.py
Created April 28, 2016 02:29 — forked from hartror/limit.py
Finding safe ways to limit a forked proccess's memory in Python.
#!/usr/bin/env python
import os
import psutil
import resource
import subprocess
import sys
import time
dash_id=xxxx
api_key=xxx
app_key=xxx
# 1. export
curl -X GET "https://app.datadoghq.com/api/v1/dash/${dash_id}?api_key=${api_key}&application_key=${app_key}" > dash.json
# 2. edit dash.json
move "graphs", "title", "description" up one level in the json hierarchy, from being beneath "dash" to being at the same level