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
| { | |
| // Place your snippets for javascript here. Each snippet is defined under a snippet name and has a prefix, body and | |
| // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
| // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
| // same ids are connected. | |
| // Example: | |
| // "Print to console": { | |
| // "prefix": "log", | |
| // "body": [ | |
| // "console.log('$1');", |
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
| /** | |
| * Marlin 3D Printer Firmware | |
| * Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] | |
| * | |
| * Based on Sprinter and grbl. | |
| * Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm | |
| * | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation, either version 3 of the License, or |
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
| ### Gift Box System. | |
| It must be more engaging somehow, something that makes you desire to login and play at least a single 15minutes session every day. | |
| * The UX need some solid work, we should be able to go directly to the "bench" screen to open the box from any menu. | |
| * Add free session to the leveling, all game modes should give you xp. | |
| * Rewards, are probably fine, I am level 15 still I don't know how many items are there, but some very impressive things should be there to make people want to farm it. | |
| * One thing that could add a lot of flavor is a random real life reward, a tshirt, hat, stickers etc, imagine how awesome you open a box and get a whole set of stickers! | |
| ### Game Modes & Gameplay | |
| * There could be some "learn tricks" mode, one map with obstacles that you can train an specific freestyle trick, then another one, until you start mixing them up in combos etc. A challenge mode that we use to learn tricks and freestyle flying flows. | |
| * The training mode needs to have all the videos as challenges ing |
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
| # Plug and connect to bf | |
| # Set receiver to FRSKY_X in the config tab then run: | |
| get frsky_x_rx_num | |
| bind_rx_spi | |
| save |
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, { useState, useEffect, useRef } from 'react'; | |
| const PaginationExample = ({ auth, db, ...props }) => { | |
| const [foundItems, setFoundItems] = useState([]); | |
| const [lastFound, setLastFound] = useState(null); | |
| const [hasMore, setHasMore] = useState(false); | |
| const [loading, setLoading] = useState(false); | |
| const firstRender = useRef(true); // this will check if it is a page render or not | |
| const [input, setInput] = useState({ | |
| from: new Date(), |
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, { useState, useRef } from 'react'; | |
| const YourComponent = () => { | |
| const formRef = useRef(); | |
| const [input, setInput] = useState({}); | |
| const [step, setStep] = useState(1); | |
| const saveInput = () => { | |
| if (formRef.current) { | |
| formRef.current.handleSubmit(); |
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, { useState } from 'react'; | |
| import PropTypes from 'prop-types'; | |
| import { | |
| Modal, | |
| StyleSheet, | |
| View, | |
| Text, | |
| TouchableOpacity, | |
| Platform | |
| } from 'react-native'; |
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
| // Paste this in: | |
| function clearCollection(path) { | |
| const ref = firestore.collection(path) | |
| ref.onSnapshot((snapshot) => { | |
| snapshot.docs.forEach((doc) => { | |
| ref.doc(doc.id).delete() | |
| }) | |
| }) | |
| } | |
| // Use it like this: |
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, { useState, useEffect, useRef, useCallback } from 'react'; | |
| const mountedRef = useRef(true); | |
| const fetchData = useCallback(async () => { | |
| try { | |
| // do your async call here | |
| const ref = await db | |
| .collection('stuff') | |
| .where('stuff', '==', id) |
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 = redeem.data.map(item => item.employeeProfile); | |
| const uniques = new Set(users.map(e => JSON.stringify(e))); | |
| const uniqueUsers = Array.from(uniques).map(e => JSON.parse(e)); |