Skip to content

Instantly share code, notes, and snippets.

View MorenoMdz's full-sized avatar
🎯
Focusing

MorenoMdz

🎯
Focusing
  • Self
  • Florianópolis
View GitHub Profile
@MorenoMdz
MorenoMdz / RNDatePickerModal.js
Last active October 6, 2020 15:00
Modal that supports DatePicker for Android and IOS
import React, { useState } from 'react';
import PropTypes from 'prop-types';
import {
Modal,
StyleSheet,
View,
Text,
TouchableOpacity,
Platform
} from 'react-native';
@MorenoMdz
MorenoMdz / Formik_submit_outside.js
Created October 4, 2020 01:52
Submit Form from outside Formik RN
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();
@MorenoMdz
MorenoMdz / firestore_pagination_lookahead_search.js
Last active September 7, 2020 20:19
Firestore Pagination look ahead search example
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(),
@MorenoMdz
MorenoMdz / js
Created January 12, 2020 17:02
Bind Tinyhawk S to D16
# 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
@MorenoMdz
MorenoMdz / gist:6803253b3ec2f7d97ba16ecc8479e897
Last active November 20, 2019 01:55
Liftoff Game Feedback
### 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
/**
* 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
@MorenoMdz
MorenoMdz / .js
Created September 21, 2019 22:24
VS Code snippets
{
// 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');",
```
for each (unsorted) partition
set first element as pivot
storeIndex = pivotIndex + 1
for i = pivotIndex + 1 to rightmostIndex
if element[i] < element[pivot]
@MorenoMdz
MorenoMdz / rn_new-app_setup.md
Last active September 3, 2019 02:28
React Native boilerplate
@MorenoMdz
MorenoMdz / linux-commands.md
Created March 16, 2019 21:02
A bunch of usefull linux commands

Linux Mint set display gamma xrandr --output eDP-1 --gamma 0.86:0.86:0.86