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 | |
dist | |
infra | |
.tmp | |
# Yarn | |
.pnp.* | |
.yarn/* | |
!.yarn/patches | |
!.yarn/plugins |
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
{ | |
admin off | |
log { | |
format json | |
} | |
} | |
:80 { | |
try_files {path} / | |
header /assets/img/* Cache-Control max-age=31536000 |
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 golang:1.15.5-alpine3.12 as sidecar | |
WORKDIR /go/src/app | |
COPY ./docker/sidecar/ ./ | |
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-s -w -extldflags "-static"' -o bin/sidecar . && \ | |
chmod +x ./bin/sidecar | |
FROM node:12.19.0-alpine3.9 as build-stage |
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 listeners = ctx => { | |
if (!ctx.$options.on) { | |
return | |
} | |
const listeners = {} | |
Object.entries(ctx.$options.on) | |
.forEach(([event, callback]) => { | |
listeners[event] = callback.bind(ctx) |
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
init: | |
@read -p "SPACES_ACCESS_TOKEN=" SPACES_ACCESS_TOKEN; \ | |
read -p "SPACES_SECRET_KEY=" SPACES_SECRET_KEY; \ | |
read -e -p "SPACE_BUCKET_NAME=" -i "space-name" SPACE_BUCKET_NAME; \ | |
terraform init \ | |
-backend-config="access_key=$$SPACES_ACCESS_TOKEN" \ | |
-backend-config="secret_key=$$SPACES_SECRET_KEY" \ | |
-backend-config="bucket=$$SPACE_BUCKET_NAME" | |
plan: |
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
package xx | |
class Deferrer { | |
private val actions = arrayListOf<() -> Unit>() | |
fun defer(f: () -> Unit) { | |
actions.add(f) | |
} | |
fun done() { |
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 as build-stage | |
RUN apk add --no-cache curl gnupg libstdc++ | |
WORKDIR /app | |
COPY package*.json ./ | |
COPY yarn.lock ./ | |
RUN yarn install | |
COPY . . | |
ARG MODE=production |
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/ | |
dist/ | |
.git/ |
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 pino = require('pino') | |
const dest = pino.destination() | |
const logger = pino({ | |
name: process.env.APPLICATION_NAME || 'my-app', | |
level: process.env.LOG_LEVEL || 'info', | |
useLevelLabels: true, | |
base: { | |
} | |
}, dest) |
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 fs = require('fs') | |
const path = require('path') | |
const slug = require('slug') | |
const axios = require('axios') | |
const progress = require('progress') | |
const urlRegx = /(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s]{2,}|www\.[a-zA-Z0-9]+\.[^\s]{2,})/gi; | |
const readList = async () => { | |
console.info('Loading file data') |