Skip to content

Instantly share code, notes, and snippets.

View iaurg's full-sized avatar
☣️
Extreme Programming and Challenges

Italo A. iaurg

☣️
Extreme Programming and Challenges
View GitHub Profile
@iaurg
iaurg / turn.js
Last active August 14, 2024 18:50
console.log("Try 1")
@iaurg
iaurg / BacktoTop.js
Created July 14, 2021 22:25
scroll to top next.js
const BackTotop = () => {
const [showScroll, setShowScroll] = useState(false)
const checkScrollTop = () => {
if (!showScroll && window.pageYOffset > 400) {
setShowScroll(true)
} else if (showScroll && window.pageYOffset <= 400) {
setShowScroll(false)
}
}
@iaurg
iaurg / CheckBox.ts
Created May 14, 2021 00:26
CheckBox component React Native pure
import React from 'react';
import { Feather } from '@expo/vector-icons';
import { View, TouchableOpacity, Text, StyleSheet } from 'react-native';
type CheckboxProps = {
label: string,
labelStyle: object,
iconColor: string,
onChange: () => void,
value: boolean,
@iaurg
iaurg / books.json
Last active July 14, 2021 13:50
Good Books
[
{
"author": "Ray Dalio",
"itemId": "8551003429",
"link": "https://amzn.to/2P975Bx",
"title": "Principios"
}
,
{
"author": "Aditya Y.",
@iaurg
iaurg / 🐱 GitHub Data
Last active April 18, 2021 21:20
🐱‍💻 GitHub Data
🏆 529 Contributions in year 2021
📦 Used 120 MB in GitHub's Storage
📜 12 Public Gists
🔑 3 Public Keys
💼 Opted to Hire
@iaurg
iaurg / .gitconfig
Created April 20, 2020 18:06
Git alias boilerplate
me = config user.name
# Less verbose status
st = status -sb
# Checkout
co = checkout
# Checkout master
cm = checkout master
@iaurg
iaurg / pt.json
Last active April 15, 2020 14:40
Arquivo de tradução do tema para Ghost - Nurui v2.1.1. Ativar tradução: Envie este json para a pasta ../locales dentro do tema e atualize a opção "Publication Language" no painel do Ghost para pt.
{
"meta-page": " (Página %)",
"Back to Homepage": "Voltar ao inicio",
"No posts": "Sem postagens",
"1 post": "1 post",
"% posts": "% posts",
"Load more": "Carregar mais",
"Featured": "Destaque",
"Newer Post": "Post Novo",
"Older Post": "Post Antigo",
@iaurg
iaurg / NextNProgress.js
Created March 11, 2020 15:26
Loader NProgress in Next.js component build with hooks.
import { useEffect } from 'react';
import NProgress from 'nprogress';
import Router from 'next/router';
import PropTypes from 'prop-types';
export default function NextNProgress({
color = '#29D',
startPosition = 0.3,
stopDelayMs = 200,
height = 3,
@iaurg
iaurg / asdfzsh.md
Last active February 26, 2020 20:40
How to configure node global commands in shell using zsh/omyzsh, when node is installed with asdf.

How to configure node global commands in zsh/omyzsh, when node is installed with asdf.

Just run this on terminal:

echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.zshrc

If don't work, bring the code . $HOME/.asdf/asdf.sh to top of your .zshrc file

@iaurg
iaurg / activecampaign.js
Created January 24, 2020 18:17
A React component for Active Campaign Form using Ant Design
import fetch from 'isomorphic-unfetch';
import { notification } from 'antd';
import styled from 'styled-components';
import { Form, Input } from '@rocketseat/unform';
import * as Yup from 'yup';
import PropTypes from 'prop-types';
const FormStyled = styled(Form)`
display: flex;
justify-content: space-between;