Skip to content

Instantly share code, notes, and snippets.

View AZagatti's full-sized avatar
🎯
Focusing in learn

André Zagatti AZagatti

🎯
Focusing in learn
View GitHub Profile

Default programs

sudo apt install build-essential default-jdk libssl-dev exuberant-ctags ncurses-term ack-grep silversearcher-ag fontconfig imagemagick libmagickwand-dev software-properties-common git vim-gtk3 curl -y

Generate SSH Key

ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "email@email.com"
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export ANDROID_HOME=~/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH="$(yarn global bin):$PATH"
# Path to your oh-my-zsh installation.
export ZSH="/home/andre/.oh-my-zsh"
[user]
email = andre.zagatti1@gmail.com
name = azagatti
[alias]
a = add .
br = branch
ci = commit
co = checkout
cv = checkout dev
" LEADER KEY
let mapleader=","
" COMPATIBILITY
" Set 'nocompatible' to avoid unexpected things that your distro might have
set nocompatible
set t_ut=
" BUNDLE
@AZagatti
AZagatti / person.js
Created May 4, 2020 00:46
React Component
import React from 'react';
export default function Person() {
return (
<h1>O nome da pessoa é: André Zagatti</h1>
);
}
@AZagatti
AZagatti / App.js
Last active May 4, 2020 02:44
App.js
import React from 'react';
import Person from './components/Person';
function App() {
return <Person />;
}
export default App;
@AZagatti
AZagatti / personProps.js
Created May 4, 2020 01:04
Person with props
import React from 'react';
export default function Person(props) {
return (
<h1>O nome da pessoa é: {props.name}</h1>
);
}
@AZagatti
AZagatti / App.js
Last active May 4, 2020 02:44
App with Person props
import React from "react";
import Person from "./components/Person";
function App() {
return (
<div>
<Person name="Solaire of Astora" />
<Person name="Andre of Astora" />
<Person name="Sigmeyer of Catarina" />
@AZagatti
AZagatti / App.js
Last active May 4, 2020 02:44
State
import React, { useState } from "react";
import Person from "./components/Person";
function App() {
const [name, setName] = useState('');
return (
<div>
<input type="text" value={name} onChange={e => setName(e.target.value)} />
@AZagatti
AZagatti / App.js
Last active May 4, 2020 02:02
useEffect
import React, { useState, useEffect } from "react";
function App() {
const [count, setCount] = useState(0);
useEffect(() => {
const interval = setInterval(() => setCount(count + 1), 1000);
return () => {
clearInterval(interval)