Linux Mint set display gamma
xrandr --output eDP-1 --gamma 0.86:0.86:0.86
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
| p= store.description.split(' ').slice(0, 25).join(' ') |
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
| // Declare second integer, double, and String variables. | |
| let secondInteger, secondDouble, secondString | |
| // Read and save an integer, double, and String to your variables. | |
| /* Using readline and parsing the input into the variables declared previously */ | |
| secondInteger = parseInt(readLine()); | |
| secondDouble = parseFloat(readLine()); | |
| secondString = readLine(); |
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 multer = require('multer'); | |
| const multerS3 = require('multer-s3'); | |
| const uuid = require('uuid'); | |
| const AWS = require('aws-sdk'); | |
| const sharp = require('sharp'); | |
| AWS.config.update({ | |
| accessKeyId: process.env.AWS_ACCESS, | |
| secretAccessKey: process.env.AWS_SECRET_KEY | |
| }); |
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
| Start my project at 1.0.0 in package.json | |
| Initial dev work | |
| Push to develop branch | |
| Push to master branch | |
| Tag as v1.0.0 | |
| Dev | |
| Push to 'feature/name-of-feature' or 'bug/name-of-bug' branches | |
| Merge pull request of feature and bug branches into develop | |
| When it's ready for release, determine the version number (1.0.1 or 1.1.0) and update package.json | |
| Push package.json to develop branch |
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
| // It splits by comma then map and trim each emai, then check each email pass the test, keeping the ones that do not pass the test. | |
| // If any email do not pass the regex test show it to the user, otherwise continue (return) | |
| const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; | |
| export default emails => { | |
| const invalidEmails = emails | |
| .split(',') | |
| .map(email => email.trim()) | |
| .filter(email => re.test(email) === false); |
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
| // Spread to remove field | |
| const user = { | |
| firstName: 'John', | |
| lastName: 'Doe', | |
| city: 'Here' | |
| } | |
| const { city, ...userWIthoutCity} = user | |
| city // here | |
| userWIthoutCity // {firstName: 'John', lastName: 'Doe'} |
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
| exports.getNewProblemsList = async (req, res, next) => { | |
| const page = req.params.page || 1; | |
| const limit = 10; | |
| const skip = page * limit - limit; | |
| const problemPromise = Problem.find() | |
| .populate('author hardware repairsV', 'name') | |
| .skip(skip) | |
| .limit(limit) | |
| .sort({ created: 1 }) |
Universal
Primeiro instale os básico para React e Android, Node / npm, Yarn Instale e configure o Android JDK 8, Genymotion / USB Device https://github.com/Rocketseat/ambiente-react-native
RN CLI
Instale o CLI do RN:
yarn global add react-native-cli
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
| ``` | |
| for each (unsorted) partition | |
| set first element as pivot | |
| storeIndex = pivotIndex + 1 | |
| for i = pivotIndex + 1 to rightmostIndex | |
| if element[i] < element[pivot] |