Create a new bookmark in your browser, then copy/paste the minified code below into the URL field.
Use Bookmarklet Maker to minify and URI encode the bookmarklet.
| Step 1: GET https://api.datadoghq.com/api/v2/metrics?filter[configured]=false&page[size]=1000 | |
| Status: 200 | |
| Items returned: 1000 | |
| next_cursor length: 12304 chars | |
| links.next length: 12383 chars | |
| Step 2: GET https://api.datadoghq.com/api/v2/metrics?filter[configured]=false&page[cursor]=4e7a6732596b4a445356686152315a3559566861624670474f58526157464a355956644f656c6779526d35614d30706d545552465631457a576d6c4f534842315644424f55325649566d394d565456705931553065564674556e4e6b64306c43526d356f4e464a71536e5250557a423656587073564752584f57785053464a515632773564553959593046425555464251554642516d525461466447615441785956644f57553173546b52564d4778495431565a64314a57627a4254625852325446646a515551794d57786b5345707757544e4f5a6c6c585a47356a624468335458686154564e4961444e6b523364305a455a4b516d4a5862484a594d445630596d747761565a71556d354364305658556c5a77615752496347315552555a56556c524b626c5657536c6c69566c5a455455686b636c565251554a42515546425155464b4e585252613164614d44564c546a42734e55394865464e4e566b303057544647516d5649536e686b625570 |
| #!/usr/bin/env -S uv run --with requests | |
| # /// script | |
| # requires-python = ">=3.12" | |
| # dependencies = ["requests"] | |
| # /// | |
| """ | |
| Demonstrates a bug in the Datadog GET /api/v2/metrics API where the cursor | |
| URL returned in links.next is not followable (returns 400 Bad Request). | |
| Requires DD_API_KEY and DD_APP_KEY environment variables. |
Create a new bookmark in your browser, then copy/paste the minified code below into the URL field.
Use Bookmarklet Maker to minify and URI encode the bookmarklet.
| javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{ | |
| default: Turndown | |
| }, { | |
| default: Readability | |
| }]) => { | |
| /* Optional vault name */ | |
| const vault = ""; | |
| /* Optional folder name such as "Clippings/" */ |
| #!/bin/bash | |
| # Clone/pull every repo you have access to in a github org into a directory. | |
| # Source: https://gist.github.com/drichardson/4f1e831e0feece632ef4cb179955864c | |
| set -euo pipefail | |
| # Max repos to checkout. | |
| LIMIT=500 | |
| usage() { |
| #pragma once | |
| #include "CoreMinimal.h" | |
| #include "Engine/World.h" | |
| #include "EngineUtils.h" | |
| DECLARE_LOG_CATEGORY_EXTERN(LogWorldSingleton, Log, All); | |
| /* |
| #pragma once | |
| #include "CoreMinimal.h" | |
| #include "Engine/World.h" | |
| #include "EngineUtils.h" | |
| /* | |
| * TWorldSingleton is a weak pointer to a actor in a level, which is only a | |
| * singleton by convention of only one actor of that type being in a UWorld. |
| #!/bin/sh | |
| # Is pycodestyle is installed? | |
| which pycodestyle &> /dev/null | |
| if [[ $? -ne 0 ]]; then | |
| cat <<-EOF | |
| pre-commit hook failed. pycodestyle is not installed. | |
| Run the following and try your commit again: | |
| pip install pycodestyle |
| #!/usr/bin/python3 | |
| import json | |
| import sys | |
| import urllib.request | |
| import os | |
| scriptname=os.path.basename(__file__) | |
| usage=f'''Missing username. |
| <# | |
| .SYNOPSIS | |
| Outputs to a UTF-8-encoded file *without a BOM* (byte-order mark). | |
| .DESCRIPTION | |
| Mimics the most important aspects of Out-File: | |
| * Input objects are sent to Out-String first. | |
| * -Append allows you to append to an existing file, -NoClobber prevents | |
| overwriting of an existing file. | |
| * -Width allows you to specify the line width for the text representations |