<WizardProvider steps={4}>
<Container maxWidth="sm">
<Paper className={classes.paper}>
<WizardSlotForm />
</Paper>
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 cn from 'classnames' | |
import Router from 'next/router' | |
import React, { useState } from 'react' | |
const DONE_DURATION = 250 | |
export default function RouteIndicator() { | |
const [loading, setLoading] = useState(false) | |
const [timeoutId, setTimeoutId] = useState<ReturnType<typeof setTimeout>>() |
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
-- First create schema/data data for tests | |
DROP TABLE api.slot CASCADE; | |
CREATE TABLE api.slot ( | |
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), | |
name TEXT, | |
latitude NUMERIC, | |
longitude NUMERIC, | |
geog geography(Point, 4326) DEFAULT NULL |
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
#!/bin/bash | |
# Creates self-signed CA certificates and certificates for local domains. | |
# | |
# Prompts for a local domain name (e.g. my-app.localhost) and creates all | |
# necessary certificates. | |
# | |
# Next steps: | |
# Copy the certificates (e.g. my-app.localhost.crt and my-app.localhost.key) to | |
# your service (Nginx, Apache, ...) and configure it. |
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
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md | |
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192 | |
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB. | |
------------ | |
-- Basics -- | |
------------ | |
-- Get indexes of tables |
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 { useCallback } from 'react' | |
import { useRouter } from 'next/router' | |
import { useTranslation } from 'react-i18next' | |
import { Box, Button, ButtonGroup } from '@material-ui/core' | |
export default function LocaleSwitcher() { | |
const { t } = useTranslation() | |
const router = useRouter() | |
const changeLang = useCallback( | |
// Same route different language |
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
// encode(decode) html text into html entity | |
var decodeHtmlEntity = function(str) { | |
return str.replace(/&#(\d+);/g, function(match, dec) { | |
return String.fromCharCode(dec); | |
}); | |
}; | |
var encodeHtmlEntity = function(str) { | |
var buf = []; | |
for (var i=str.length-1;i>=0;i--) { |
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
/** | |
* Created by dagan on 07/04/2014. | |
* https://github.com/ofirdagan/cross-domain-local-storage | |
*/ | |
const MESSAGE_NAMESPACE = "cross-domain-local-message"; | |
/* global console */ | |
export const xdLocalStorage = () => { | |
const requests = {}; |
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
# Build target dependencies # | |
########################### | |
FROM node:14-alpine AS base | |
WORKDIR /app | |
ARG NODE_ENV=production | |
ENV PATH=/app/node_modules/.bin:$PATH \ | |
NODE_ENV="$NODE_ENV" | |
COPY package.json yarn.lock /app/ | |
EXPOSE 3040 |
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
# https://taskfile.dev | |
# sudo snap install task --classic | |
version: "3" | |
tasks: | |
ps: docker-compose ps | |
up: docker-compose up -d {{- .SERVICE}} |