node set-version.mjs patch
node set-version.mjs minor
node set-version.mjs major
node set-version.mjs 0.0.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
| // axiosInstance example with good logging for developers | |
| import axios from 'axios'; | |
| import { API_PREFIX, API_URL } from '../config'; | |
| import { getUserToken } from '../auth'; | |
| const userToken = getUserToken(); | |
| const headers: any = {}; | |
| if (userToken) { | |
| headers.Authorization = `Bearer ${userToken}`; |
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 $?) |
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
| 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
| // 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
| 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
| 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
| 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 { 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(); |
NewerOlder