- Install prettier
- Make a .prettierignore file, and add directories you'd like prettier to not format, for example:
**/node_modules
- Run
prettier --write "**/*.js"
*Don't forget the quotes. - Optional: if you want to format JSON/SCSS files too, replace js with json/scss.
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
// how to use :) | |
// mask: "(00) 0 0000-0000" | |
// input: "31999699601" | |
// result: "(31) 9 9969-9606" | |
export const maskContent = (mask, input) => { | |
const m = IMask.createMask({ | |
mask, | |
}); |
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
import React from 'react' | |
import { translate } from 'react-i18next' | |
import { connect } from 'react-redux' | |
import PropTypes from 'prop-types' | |
import { simpleId } from 'utils/utility' | |
import * as actions from 'store/messages/messages.useCases' | |
import './MessageHandler.scss' | |
import { ReactComponent as IcCheck } from 'assets/icons/message/check.svg' |
How to create a portable windows application without an installer from an electron project:
- Clone the electron-quick-start repo:
git clone https://github.com/electron/electron-quick-start
- yarn
- Make your application - probably edit main.js to navigate to some URL
- yarn add electron-packager
- Edit package.json - update the 'name' and add a new script 'packager':
Moved to git repository: https://github.com/denji/nginx-tuning
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.