autoload -U zmv
zmv '(**/)(*).txt' '$1$2.md'
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 crypto from 'crypto' | |
// Validation telegram mini app | |
function authWebApp(apiToken: string, telegramInitData: string) { | |
const initData = new URLSearchParams(telegramInitData) | |
const hash = initData.get('hash') | |
const dataToCheck: string[] = [] | |
initData.sort() | |
initData.forEach((v, k) => k !== 'hash' && dataToCheck.push(`${k}=${v}`)) |
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
{"name":"jra1","description":"jra coin1","symbol":"jra1", "image":"https://cdn.joincommunity.xyz/clicker/moneta.png"} |
14
That's what worked for me:
- The Remotes
$ git remote rm origin $ git remote add origin git@github.com:/.git If your SSH key is already in use on another github rep, you can generate a new one.
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
class Queue<T = any> { | |
items: T[] = [] | |
// Implementing various methods of javascript queue: | |
// 1. adding element to the queue | |
enqueue(item: T) { | |
this.items.push(item) | |
} | |
// 2. removing element from the queue |
- Create
.npmrc
. - Add
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
in.npmrc
file. - Generate access token from
npmjs
and put in zshrc, bashrc. - Login npmjs by terminal
npm adduser
5.1. pnpm --filter=package_name publish --no-git-checks // use pnpm and workspace 5.2. yarn npm publish // use yarn 5.3. npm publish // use npm
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 obj = { | |
"start.headline": "1 headline", | |
"start.subHeadline": "subHeadline", | |
"start.accordion.headline": "2 headline", | |
"start.accordion.sections.0.content": "content 0", | |
"start.accordion.sections.0.iconName": "icon 0", | |
"start.accordion.sections.1.headline": "headline 1", | |
"start.accordion.sections.1.content": "content 1", | |
"start.accordion.sections.1.iconName": "icon 1", | |
"start.accordion.sections.2.headline": "headline 2", |
│ In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:141:
│ In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_rsize_t.h:30:
│ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/machine/types.h:37:2: error: architecture not supported
│ #error architecture not supported
│ ^
│ fatal error: too many errors emitted, stopping now [-ferror-limit=]
│ 20 errors generated.
│ make: *** [Release/obj.target/validation/src/validation.o] Error 1
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 React from 'react' | |
import { Randomize } from '@huula/utils' | |
import useSwiperRef from 'hooks/useSwiperRef' | |
import { Swiper, SwiperSlide, SwiperProps, SwiperRef } from 'swiper/react' | |
import SwiperCore, { Autoplay, Pagination, Navigation } from 'swiper' | |
import { Event } from './Event' | |
SwiperCore.use([Autoplay, Pagination, Navigation]) | |
const slidesPerView = { |
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 BigNumber from 'bignumber.js' | |
export const accelerateNumber = ( | |
target: number, // Input number | |
delay: number, // Delay timeout | |
duration: number, // Duration corresponding to each acceleration in s | |
decimals: number, // Decimals | |
onGetValue: (value: number) => void | |
) => { | |
let number = 0 |
NewerOlder