Skip to content

Instantly share code, notes, and snippets.

View yuritoledo's full-sized avatar
🌌

Yuri Toledo yuritoledo

🌌
View GitHub Profile
@yuritoledo
yuritoledo / gist:f6dadb8deacf898d168c07f239e105cf
Created October 14, 2019 23:52
Remover acentos javascript es6
const removeAcentos = str => str.normalize('NFD').replace(/[\u0300-\u036f]/g, "")
@yuritoledo
yuritoledo / eslint.json
Created October 9, 2019 15:16
eslint react para typescript
{
"env": {
"browser": true,
"es6": true,
"jest": true
},
"settings": {
"react": {
"version": "detect"
}
@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;
@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)
{
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
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) {
@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,
@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"
],
---
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 / 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