- Setup builx builder:
docker buildx create --name ourbuilder
docker buildx use ourbuilder
/* Based on: https://stackoverflow.com/a/44018490/31493 */ | |
var duration = /(-?\d*\.?\d+(?:e[-+]?\d+)?)\s*([a-zμ]*)/ig | |
/** | |
* conversion ratios | |
*/ | |
-- Query APM agent version | |
-- https://discuss.newrelic.com/t/is-there-a-nrql-query-i-can-do-that-will-list-all-of-the-versions-of-my-apm-agents/105495 | |
SELECT agentHostname, apmAgentVersion, apmAppName, apmLanguage | |
FROM NrDailyUsage | |
WHERE apmLanguage IS NOT NULL | |
SINCE 1 day ago | |
LIMIT MAX |
# bash-only parser that leverages sed and awk to parse simple yaml files | |
# | |
# See https://stackoverflow.com/a/21189044/31493 for usage, caveats, etc. | |
function parse_yaml { | |
local prefix=$2 | |
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') | |
sed -ne "s|^\($s\):|\1|" \ | |
-e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ | |
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | |
Misc. Google Sheets snippets |
# EditorConfig is awesome: https://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
# Unix-style newlines with a newline ending every file and no trailing whitespace | |
[*] | |
end_of_line = lf | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
# Posted by Benjamin Lush on Datadog Slack | |
# | |
# I haven't tested it yet | |
import requests | |
url = "https://app.datadoghq.com/api/v1/dashboard_search?with_suggested=true&query=in%3Apreset_dashboard_list%2F1%20&start=0&count=1&sort=" | |
result = requests.get(url, headers).json() | |
count = 50 | |
for index in range(int(result['total']) // count + 1): |
import requests | |
# Set the repo owner and name | |
owner = "YOUR_REPO_OWNER" | |
repo = "YOUR_REPO_NAME" | |
GITHUB_TOKEN = "YOUR_GITHUB_TOKEN" | |
# Set the GitHub API URL | |
url = f"https://api.github.com/repos/{owner}/{repo}/pulls" |
# Boilerplate for Python apps using OpenAI API. | |
# From DeepLearning.ai's "ChatGPT Prompt Engineering for Developers" mini-course | |
# First, these dependencies need to be installed: | |
# | |
# pip install openai python-dotenv | |
import openai | |
import os |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.11575811356306076</real> |