This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": 0, | |
"name": "datocms-react-ui", | |
"variant": "project", | |
"kind": 1, | |
"flags": {}, | |
"children": [ | |
{ | |
"id": 135, | |
"name": "FieldGroupProps", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": 0, | |
"name": "datocms-plugin-sdk", | |
"variant": "project", | |
"kind": 1, | |
"flags": {}, | |
"children": [ | |
{ | |
"id": 1, | |
"name": "Account", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { buildClient } from "@datocms/cma-client-node"; | |
import fetch from "cross-fetch"; | |
const client = buildClient({ | |
apiToken: process.env.READWRITE_DATOCMS_API_TOKEN, | |
fetchFn: fetch, | |
}); | |
async function run() { | |
for await (const delivery of client.webhookCalls.listPagedIterator({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { connect } from 'datocms-plugin-sdk'; | |
connect({ | |
buildItemPresentationInfo(item, ctx) { | |
// we only want to customize the presentation for records of a specific | |
// model | |
if (item.relationships.item_type.data.id !== '810975') { | |
return undefined; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
struct KeyPoint | |
{ | |
char key; | |
char points; | |
}; | |
struct KeyPoint rules[] = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import withLayoutProps from 'utils/withLayoutProps'; | |
export const getStaticProps = withLayoutProps(async ({ params: { id } }) => { | |
const pokemon = await api.getPokemonById(id); | |
return { | |
props: { pokemon }, | |
}; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Lettere accentate", | |
"rules": [ | |
{ | |
"description": "Option + e = è", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"modifiers": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://nec.is/writing/transform-your-codebase-using-codemods/ | |
export default function transformer(file, api) { | |
const j = api.jscodeshift; | |
const root = j(file.source); | |
root.find( | |
j.ExportDefaultDeclaration, | |
{ | |
declaration: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bundler/setup" | |
require "commercelayer" | |
client = Commercelayer::Client.new( | |
site: "https://dato-commerce.commercelayer.io", | |
client_id: "18b638d6d9849ab88f10e3cd95c43c4b54b4d03988660c8424e8427a93dc9cd6", | |
client_secret: "5977be2042d6cac22e8340961bdf84263c37444a002e6a9b180d5b7b70ac6a1f" | |
) | |
client.authorize! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var talks = []; | |
var currentIndex = 0; | |
function formatDate(template, date) { | |
var specs = 'YYYY:MM:DD:HH:mm:ss'.split(':'); | |
date = new Date(date || Date.now() - new Date().getTimezoneOffset() * 6e4); | |
return date.toISOString().split(/[-:.TZ]/).reduce(function(template, item, i) { | |
return template.split(specs[i]).join(item); | |
}, template); | |
} |
NewerOlder