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
| "use strict"; | |
| const { getStoreOfProduct, isUserOwnsStore } = require("../../../lib/utils"); | |
| /** | |
| * product service | |
| */ | |
| const { createCoreService } = require("@strapi/strapi").factories; |
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
| git commit conventions: | |
| https://github.com/conventional-changelog/commitlint#what-is-commitlint | |
| https://www.conventionalcommits.org/en/v1.0.0/#specification | |
| # examples | |
| type(scope?): subject | |
| feat: add espanol lanugage | |
| fix(ui): bug in submit button |
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
| import { createContext, FC, useContext, useState } from 'react'; | |
| const Context = createContext<any>(null); | |
| type Props = { | |
| children: JSX.Element[] | JSX.Element | string; | |
| }; | |
| const StateProvider: FC<Props> = ({ children }) => { | |
| const [state, setState] = useState(); |
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
| port: 54321 | |
| user: admin | |
| pass: admin |
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
| import React from "react"; | |
| export default function Example() { | |
| return <OtpInput value={otp} onChange={(value: string) => setOtp(value)} />; | |
| } |
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_modules | |
| build | |
| scripts/setNewVersion.js |
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
| // nodejs script that adds a new version to the project. (git(local, and remote), package.json and a commit message) | |
| // example: node setNewVersion.js 0.0.1 | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const { exec } = require('child_process'); | |
| let v = process.argv[2]; | |
| if (v.charAt(0) === 'v') { | |
| v = v.substring(1); |
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
| function sleep(ms) { | |
| return new Promise((resolve) => setTimeout(resolve, ms)); | |
| } | |
| const t = 50; | |
| (async () => { | |
| let f1 = false; | |
| while (!f1) { | |
| let jsPath; |
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
| chad-cheats: | |
| # based on: https://youtu.be/Mtgo-nP_r8Y | |
| space + h + t : change theme | |
| :TSInstall <language>(elixir) : add syntax highlighting support | |
| :TSInstallInfo : see what syntax highlighting are already installed |
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
| agent_load_env () { test -f "$env" && . "$env" >| /dev/null ; } | |
| agent_start () { | |
| (umask 077; ssh-agent >| "$env") | |
| . "$env" >| /dev/null ; } | |
| agent_load_env | |
| # agent_run_state: 0=agent running w/ key; 1=agent w/o key; 2=agent not running | |
| agent_run_state=$(ssh-add -l >| /dev/null 2>&1; echo $?) |
OlderNewer