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 scheduler = require("./scheduler/scheduler"); | |
| const deleteInactives = require("./cron-jobs/deleteInactives"); | |
| // schedule the deleteInactive users job | |
| scheduler(10000, deleteInactives); |
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 users = [ | |
| { | |
| id: 1, | |
| name: "Leanne Graham", | |
| username: "Bret", | |
| email: "[email protected]", | |
| isActive: false, | |
| address: { | |
| street: "Kulas Light", | |
| suite: "Apt. 556", |
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 React, { useQuery } from "react"; | |
| const AddPost = () => { | |
| const [postState, setPostState] = useQuery({ | |
| title: "", | |
| body: "" | |
| }); | |
| const handleChange = e => { | |
| setPostState({ [e.target.name]: e.target.value }); | |
| }; | |
| return ( |
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 React, { useReducer } from "react"; | |
| const AddPost = () => { | |
| const [postState, setPostState] = useReducer( | |
| (state, newState) => ({ ...state, ...newState }), | |
| { | |
| title: "", | |
| body: "" | |
| } | |
| ); |
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 React, { useReducer } from "react"; | |
| import { useMutation } from "@apollo/react-hooks"; | |
| const AddPost = () => { | |
| const ADD_POST = gql` | |
| mutation( | |
| $authorId: ID! | |
| $title: String! | |
| $body: String | |
| $isPublished: Boolean | |
| ) { |
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 src.controller.services.delays import command_delays as delays | |
| from src.controller.services.drone_services import Drone | |
| from time import sleep | |
| import sys | |
| ''' | |
| 'takeoff', 'land', 'time?', 'speed?', | |
| ''' | |
| command_list = ['command', 'battery?'] |
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 { spawn, exec } = require('child_process') | |
| const drone = spawn('python', ['./src/controller/main.py']) | |
| drone.stdout.pipe(process.stdout) |
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
| export const countries = [ | |
| { | |
| code: "AE", | |
| currency: "AED", | |
| currencyName: "United Arab Emirates Dirham", | |
| name: "United Arab Emirates" | |
| }, | |
| { | |
| code: "AF", | |
| currency: "AFN", |
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
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Quotifr | Inspirational quotes for your daily start up</title> | |
| <link rel="shortcut icon" href="assets/quote-icon.jpg" type="image/jpg"> | |
| <link rel="stylesheet" href="styles/styles.css"> | |
| <script defer src="https://use.fontawesome.com/releases/v5.0.8/js/all.js" | |
| integrity="sha384-SlE991lGASHoBfWbelyBPLsUlwY1GwNDJo3jSJO04KZ33K2bwfV9YBauFfnzvynJ" |
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 url('https://fonts.googleapis.com/css2?family=Montserrat:wght@200;300;400;600&display=swap'); | |
| html { | |
| box-sizing: border-box; | |
| } | |
| body { | |
| margin: 0; | |
| padding: 0; | |
| min-height: 100vh; |