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
export class Optional<T> { | |
constructor(public value:T) { | |
} | |
isPresent():boolean { | |
return this.value !== null && this.value !== undefined; | |
} | |
map(bindCall):Optional<T> { |
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
--- | |
version: "3.3" | |
services: | |
# POSTGRES: https://github.com/docker-library/postgres | |
db: | |
image: postgres | |
container_name: db | |
#restart: always | |
environment: | |
POSTGRES_USER: ${POSTGRES_USER} |
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
require('dotenv').config() | |
const ewelink = require('ewelink-api') | |
const credentials = { | |
username: process.env.EMAIL, | |
password: process.env.PASSWORD | |
} | |
const devices = { | |
lili: process.env.LILI // device Id |
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
[Unit] | |
Description=My app | |
After=syslog.target | |
[Service] | |
User=www-data | |
Type=simple | |
ExecStart=/home/myuser/mywebsite/node_modules/next/dist/bin/next start -p $PORT | |
SuccessExitStatus=130 | |
RestartSec=3 | |
Restart=on-failure |
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
/** | |
* This custom hook is used to get the size of the screen and creates | |
* a context to share the size with all the components. | |
*/ | |
import React, { FC, useEffect, useState } from 'react' | |
export const tabletSize = '634px' | |
export const desktopSize = '1206px' |
OlderNewer