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' |
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
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
--- | |
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
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
"rules": { | |
"no-consecutive-blank-lines": true, | |
"interface-over-type-literal": false, | |
"trailing-comma":false, | |
"object-literal-sort-keys":false, | |
"member-access":false, | |
"interface-name":false, | |
"arrow-parens":false | |
}, |
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
// Using media-query to generate some common hide/show css classes. | |
// Work in Progress, works with my projects. | |
// !important is sometimes needed with bootstrap, you should try to remove it first. | |
// Most of the time, I just pick one between laptop or desktop | |
// Extra small screen / phone ; | |
$mobileMax: 480px; | |
// Small screen / tablet | |
$tabletMax: 850px; | |
// laptops : |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<persistence xmlns="http://java.sun.com/xml/ns/persistence" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" | |
version="2.0"> | |
<persistence-unit name="funkopop" transaction-type="RESOURCE_LOCAL"> | |
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> | |
<properties> | |
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/funkopop" /> | |
<property name="javax.persistence.jdbc.user" value="admin" /> |
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
package io.pax.cryptos.ws; | |
import javax.servlet.*; | |
import javax.servlet.annotation.WebFilter; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import java.io.IOException; | |
/** | |
* Created by nicorama and others on 09/02/2018. |
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
youtube-dl https://www.youtube.com/watch?v=BLvFgrwghkQ |
NewerOlder