| name | strapi-rest |
|---|---|
| displayName | Strapi REST API querying |
| description | This skill provides comprehensive guidance for working with Strapi's REST API, including endpoint usage, authentication, querying parameters, and practical examples for content management. |
This file contains hidden or 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": "JS Event Loop Basics", | |
| "description": "Test your knowledge of the JavaScript event loop with these interactive tasks.", | |
| "tasks": [ | |
| { | |
| "id": "sync-vs-async", | |
| "code": "console.log('A');\nsetTimeout(() => console.log('B'), 0);\nconsole.log('C');", | |
| "answers": [ | |
| { "id": "a", "text": "A, B, C" }, | |
| { "id": "b", "text": "C, B, A" }, |
This file contains hidden or 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
| // Zed keymap | |
| // // For information on binding keys, see the Zed | |
| // documentation: https://zed.dev/docs/key-bindings | |
| // | |
| // To see the default key bindings run `zed: Open Default Keymap` | |
| // from the command palette. | |
| [ | |
| { | |
| "context": "Workspace", | |
| "bindings": { |
This file contains hidden or 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
| # NODE_ENV=production | |
| # | |
| #### Web vars | |
| PUBLIC_BASE_URL=http://localhost:80 | |
| STRAPI_URL=http://localhost:80/strapi # For static content | |
| STRAPI_API_URL=http://cms:1337 # For api request at build time | |
| # customize this | |
| PUBLIC_BRAND=AdNow | |
| PUBLIC_TARGET_LOCALE=en-US |
- Declare
themecookie in theapp.vue. - Use
HTMLnuxt builtin to binddata-themeattribute (your may differ) to thecookie.theme. - Create
theme.store.tsPinia store.cyclefunction cycles through the list of modes and sets current state in thethemecookie - Create
ThemeSwitcher.vuecomponent.
This approach is universal, SSR friendly and easy adoptable.
Read more about useColorMode
This file contains hidden or 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
| <script lang="ts" setup> | |
| import { | |
| Dialog as HDialog, | |
| DialogPanel as HDialogPanel, | |
| TransitionRoot as HTransitionRoot, | |
| TransitionChild as HTransitionChild, | |
| } from "@headlessui/vue"; | |
| const props = defineProps({ | |
| show: { |
This file contains hidden or 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
| upstream strapi { | |
| server 127.0.0.1:1337; | |
| } | |
| upstream nuxt { | |
| server 127.0.0.1:3000; | |
| } | |
| server { | |
| server_name www.domainname.com domainname.com; | |
| access_log /var/log/nginx/access.log; | |
| error_log /var/log/nginx/error.log; |
This file contains hidden or 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
| // Generate random string | |
| export const generateUID = (length: number) => | |
| Array(length) | |
| .fill("") | |
| .map((v) => Math.random().toString(36).charAt(2)) | |
| .join(""); | |
| // Convert ArrayBuffer to HEX string | |
| export const bytesToHEX = (bytes: ArrayBuffer) => | |
| Array.from(new Uint8Array(bytes)).map(b => b.toString(16).padStart(2, '0')).join(''); |
This file contains hidden or 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
| { | |
| "info": { | |
| "_postman_id": "5be5d43b-8bce-418d-a8f8-9eb7a42c2911", | |
| "name": "NASA original API", | |
| "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", | |
| "_exporter_id": "14509461" | |
| }, | |
| "item": [ | |
| { | |
| "name": "Mars2020,ingenuity", |
This file contains hidden or 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
| #!/bin/env bash | |
| # Ask a pass if not enough privileges | |
| if (($EUID != 0)); then | |
| if hash pkexec 2>/dev/null; then | |
| pkexec "$0" "$@" | |
| elif hash gksu 2>/dev/null; then | |
| if [[ -t 1 ]]; then | |
| sudo "$0" "$@" | |
| else |
NewerOlder