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
// 1. Import the Storyblok client | |
import StoryblokClient from "storyblok-js-client"; | |
const spaceId = "yourspaceid"; | |
// 2. Initialize the client with the oauth token | |
// from the my account area at https://app.storyblok.com | |
const Storyblok = new StoryblokClient({ | |
oauthToken: process.env.STORYBLOK_OAUTH_TOKEN, | |
}); | |
// Select all the components |
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
// 1. Import the Storyblok client | |
import StoryblokClient from "storyblok-js-client"; | |
const spaceId = 325423; | |
// 2. Initialize the client with the oauth token | |
// from the my account area at https://app.storyblok.com | |
const Storyblok = new StoryblokClient({ | |
oauthToken: process.env.STORYBLOK_OAUTH_TOKEN, | |
}); | |
// Select all the stories (eventually you can filter only the needed story) |
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 { writeFile, appendFile } from "fs/promises"; | |
// Read access token from Environment | |
const STORYBLOK_ACCESS_TOKEN = process.env.STORYBLOK_ACCESS_TOKEN; | |
// Read access token from Environment | |
const STORYBLOK_VERSION = process.env.STORYBLOK_VERSION; | |
/** | |
* Fetch a single page of data from the API, | |
* with retry logic for rate limits (HTTP 429). |
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 StoryblokClient from "storyblok-js-client"; | |
const at = process.env.STORYBLOK_ACCESS_TOKEN; | |
// initalizing the StoryblokClient using the cache option. | |
// The cache option affect the caching for the response | |
// if the cache type is set to memory, | |
// the response from the API call is cached internally | |
// to the StoryblokClient. | |
// The lifecycle of the response cache is the same of the StoryblokClient instance |
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
<?php | |
return [ | |
/** | |
* The book title. | |
*/ | |
'title' => 'Laravel Doc e-book', | |
/** | |
* The author name. |
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
const { dockStart } = require('@nlpjs/basic'); | |
const fs = require('fs'); | |
(async () => { | |
const dock = await dockStart({ use: ['Basic', 'Qna'], nlu: { useNoneFeature: false } }); | |
const nlp = dock.get('nlp'); | |
await nlp.addCorpus({ filename: './qna.tsv', importer: 'qna', locale: 'en' }); | |
await nlp.train(); | |
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
for i in $(git branch --list "0*" --format="%(refname:short)"); do | |
git checkout $i | |
echo "Branch : ${i}" | |
echo "Press _enter_ to checkout the next branch" | |
read | |
done |
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
<?php | |
/** | |
* Cheatsheet with PHP array functions | |
* | |
* Cheatsheet for showing some "use cases" about | |
* PHP array functions, sorting, editing, map, filter etc. | |
* | |
* @author Roberto Butti | |
* @link https://gist.github.com/roberto-butti/e8a1f5a4bae04b3a9668896ac546a24c | |
* |
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
git clone https://github.com/Hi-Folks/gh-actions-yaml-generator.git | |
cd gh-actions-yaml-generator | |
composer install | |
php artisan ghygen:generate --projectdir=../your-laravel-app |
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
cache: | |
paths: | |
- vendor/ | |
variables: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_USER: mysql_user | |
MYSQL_PASSWORD: mysql_password | |
MYSQL_DATABASE: mysql_db |
NewerOlder