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
const deps = await Deno.readTextFile('./src/deps.ts') | |
const regexPkg = /(https:\/\/.+)@([^\/]+)/ | |
let isFinding = true | |
Deno.stdout.write(new TextEncoder().encode('.')) | |
const id = setInterval(() => { | |
if (isFinding) Deno.stdout.write(new TextEncoder().encode('.')) | |
}, 250) |
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
{ | |
"editor.fontFamily": "'JetBrains Mono', 'IBM Plex Mono', Menlo, Monaco, 'Courier New', monospace", | |
"editor.fontSize": 15, | |
"editor.formatOnSave": true, | |
"editor.tabSize": 2, | |
"editor.minimap.enabled": false, | |
"explorer.confirmDelete": false, | |
"explorer.compactFolders": false, | |
"extensions.ignoreRecommendations": true, | |
"files.trimTrailingWhitespace": true, |
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
name: web-develop | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- develop | |
paths: | |
- "web/**/*" | |
env: |
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
prettier --print-width 100 --single-quote --no-semi --trailing-comma es5 --tab-width 2 --use-tabs false --write "**/*.{js,ts}" |
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 print(func, wait) { | |
console.log(`${func}: ${wait}`) | |
setTimeout(() => { console.log(`${func}: ${wait}, waited`) }, wait) | |
} | |
async function func1() { | |
await print(1, 1000) | |
await print(1, 1500) | |
await print(1, 2000) | |
} |
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
FROM node:12-alpine | |
WORKDIR /usr/src/app | |
COPY package*.json ./ | |
RUN npm install | |
COPY . ./ | |
RUN npm run build |
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, useContext, useCallback, useState } from 'react' | |
const AppContext = createContext({}) | |
const useAppContext = () => { | |
return useContext(AppContext) | |
} | |
const useAppState = () => { | |
const initialState = { count: 0 } |
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 Busboy = require('busboy') | |
const XLSX = require('xlsx') | |
function parseMultipartFormData(input, contentType) { | |
return new Promise((resolve, reject) => { | |
const buffers = [] | |
const busboy = new Busboy({ | |
headers: { 'content-type': contentType }, |
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
// Credit: https://gist.github.com/felixjung/a00879103892af44524f | |
// Credit: https://gist.github.com/emcmanus/eb735299788c820b4eb85c38f02598e4 | |
import { | |
camelCase, | |
cloneDeep, | |
isArray, | |
isPlainObject, | |
map, | |
mapKeys, |
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
FROM ubuntu:16.04 | |
# Install required libraries | |
RUN apt-get update &&\ | |
apt-get upgrade -y &&\ | |
apt-get install -y --no-install-recommends \ | |
build-essential python-software-properties wget autoconf git-core curl \ | |
zlib1g-dev libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt1-dev \ | |
libcurl4-openssl-dev libffi-dev |
NewerOlder