Skip to content

Instantly share code, notes, and snippets.

View yuritoledo's full-sized avatar
🌌

Yuri Toledo yuritoledo

🌌
View GitHub Profile
const FDropdown = ({ field, form: { setFieldValue, setFieldTouched }, ...props }) => (
<>
<label>Super Herói</label> <br />
<Dropdown
{...field}
{...props}
onChange={(e, { value }) => setFieldValue('superHeroi', value)}
onBlur={(e, { value }) => setFieldTouched('superHeroi', true, true)}
/>
</>
@yuritoledo
yuritoledo / README.md
Created November 7, 2018 01:45
Installing React-Native on Ubuntu

First, you'll need NodeJS and NPM:

sudo apt install curl
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
nodejs -v
v8.4.0
@yuritoledo
yuritoledo / README.md
Created February 26, 2019 11:45 — forked from acamino/README.md
Shortcuts to Improve Your Bash & Zsh Productivity

Shortcut — Action

  • CTRL + A — Move to the beginning of the line
  • CTRL + E — Move to the end of the line
  • CTRL + [left arrow] — Move one word backward (on some systems this is ALT + B)
  • CTRL + [right arrow] — Move one word forward (on some systems this is ALT + F)
  • CTRL + U — (bash) Clear the characters on the line before the current cursor position
  • CTRL + U —(zsh) If you're using the zsh, this will clear the entire line
  • CTRL + K — Clear the characters on the line after the current cursor position
  • ESC + [backspace] — Delete the word in front of the cursor
---
root: true
parser: babel-eslint
extends:
# https://github.com/yannickcr/eslint-plugin-react
- plugin:react/recommended
# https://github.com/gajus/eslint-plugin-flowtype
- plugin:flowtype/recommended
# https://www.npmjs.com/package/eslint-plugin-jest
@yuritoledo
yuritoledo / eslintrc.json
Created April 3, 2019 23:41
eslint with typescript for react native
{
"env": {
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended"
],
@yuritoledo
yuritoledo / tsconfig.json
Created April 4, 2019 12:31
tsconfig for CRA started without typescript
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"allowUnreachableCode": true,
export function cpfMask (value) {
return value
.replace(/\D/g, '')
.replace(/(\d{3})(\d)/, '$1.$2')
.replace(/(\d{3})(\d)/, '$1.$2')
.replace(/(\d{3})(\d{1,2})/, '$1-$2')
.replace(/(-\d{2})\d+?$/, '$1')
}
export function cnpjMask (value) {
{
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
@yuritoledo
yuritoledo / .rotate-image64.js
Created August 13, 2019 20:12
Rotate image and get new base64
const convert = (src, goToRight) => {
const img = new Image()
const canvas = document.createElement('canvas')
const ctx = canvas.getContext('2d')
img.crossOrigin = 'Anonymous'
img.onload = () => {
canvas.width = img.width
canvas.height = img.height
goToRight
? ctx.transform(0, -1, 1, 0, 0, img.height)
@yuritoledo
yuritoledo / cinnamon.css
Created August 19, 2019 19:53
red cinnamon ;D
stage {
font-family: Arial, Roboto, Ubuntu, Sans-Serif;
font-size: 13px;
color: white; }
.label-shadow {
color: rgba(0, 0, 0, 0); }
.popup-menu #notification .notification-button, .popup-menu #notification .notification-icon-button, .notification-button, .notification-icon-button, .modal-dialog-button-box .modal-dialog-button, .sound-button {
min-height: 20px;