| name | explain-diff-html |
|---|---|
| description | Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output. |
Please make me a rich, interactive explanation of the specified code change.
It should have these sections:
| function addProperty(continuationToken) { | |
| var response = getContext().getResponse(); | |
| var collection = getContext().getCollection(); | |
| var updated = 0; | |
| if (continuationToken) { // Parse the token | |
| var token = JSON.parse(continuationToken); | |
| if (!token.queryContinuationToken) { | |
| throw new Error('Bad token format: no continuation'); |
Effective September 2021, Dropbox will be deprecating long-lived access tokens.
This GIST generally describes how to authenticate requests to Dropbox API v2, for anyone working on a server-side PHP Dropbox implementation.
It's important to understand three types of codes you'll encounter:
| export default { | |
| name: `category`, | |
| title: `Category`, | |
| type: `document`, | |
| fields: [ | |
| { | |
| name: `name`, | |
| title: `Category Name`, | |
| type: `string`, | |
| validation: Rule => Rule.required() |
| // install first binaries from http://ffxsam.s3.amazonaws.com/public/audiowaveform-lambda.zip | |
| // @author Andrzej Ojczenasz https://github.com/ojczeo | |
| // @version '1.0.0' | |
| 'use strict'; | |
| process.env.PATH = process.env.PATH + ':' + process.env.LAMBDA_TASK_ROOT + '/bin'; | |
| function getExtension(filename) { | |
| var ext = path.extname(filename||'').split('.'); | |
| return ext[ext.length - 1]; |
| variables: | |
| VERSION_ID: '1.0.$CI_PIPELINE_ID' | |
| stages: | |
| - build | |
| build: | |
| image: slauta93/electron-builder-win | |
| stage: build | |
| artifacts: |
| // Creates a new promise that automatically resolves after some timeout: | |
| Promise.delay = function (time) { | |
| return new Promise((resolve, reject) => { | |
| setTimeout(resolve, time) | |
| }) | |
| } | |
| // Throttle this promise to resolve no faster than the specified time: | |
| Promise.prototype.takeAtLeast = function (time) { | |
| return new Promise((resolve, reject) => { |
Call it like this:
<api-status theme="dark" status-endpoint="/api/status"></api-status>
It uses window.fetch() which you might have to polyfill if you haven't already: yarn add whatwg-fetch
The component expects a JSON response with a property called message. If it's non-empty, it'll show the message.
Pretty straightforward.
| <?php | |
| /** | |
| * Assumes https://github.com/Spomky-Labs/jose library is installed and autoloading is set up | |
| * Decode and verify token guide: https://github.com/Spomky-Labs/jose/blob/master/doc/operation/Verify.md | |
| */ | |
| use Jose\Factory\JWKFactory; | |
| use Jose\Loader; | |
| // We load the key set from a URL | |
| // JSON Key URL (JKU) - https://cognito-idp.{region}.amazonaws.com/{userPoolId}/.well-known/jwks.json. |