Skip to content

Instantly share code, notes, and snippets.

View akinncar's full-sized avatar

Akinn Rosa akinncar

View GitHub Profile

Computers

  • PC Gamer / Desktop (Ryzen 7 2700, 16 GB RAM, RTX 3050, 1TB Nvme)
  • Macbook M1 16 GB RAM 1TB 13-inch (Personal)
  • Macbook M1 Max 32 GB RAM 500GB 16-inch (Work)
  • Macbook i5 2017 8 GB RAM 1TB 13-inch (Personal)

Acessories

  • Keyboard Keychron K3
@akinncar
akinncar / dieta.md
Last active March 20, 2023 22:54
Dieta

8:30

  • 1 Xícara de Café com leite
  • 3 bananas cortadas com 2 colheres de sopa de aveia (as vezes acrescentando morango)
  • 500ML litro de água (total diário: 500ML)

10:00

  • Bolachinhas para forrar o estomago (estilo bolacha da vakinha)
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
contract CashbackContract {
address payable shop;
uint256 public percentage = 10; // 10%
constructor(address target) {
shop = payable(target);
@akinncar
akinncar / akinn.cfg
Created June 25, 2022 03:01
cfg ifsc 2022
cfgver "1"
unbindall
bind "0" "slot10"
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "5" "slot5"
bind "6" "slot6"
bind "7" "slot7"
@akinncar
akinncar / AutoScrolling.js
Created March 16, 2022 11:45
AutoScrolling horizontal component for React Native
import * as React from 'react'
import { Animated, Easing, ScrollView, View } from 'react-native'
const AutoScrolling = ({
style,
children,
endPaddingWidth = 20,
duration,
delay = 0,
isLTR = false,
@akinncar
akinncar / .deps...npm...@openzeppelin...contracts...access...Ownable.sol
Created December 5, 2021 01:35
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
@akinncar
akinncar / .zshrc
Last active February 17, 2022 14:21
.zshrc
export JAVA_HOME="/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home"
export ANDROID_HOME=~/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
@akinncar
akinncar / mockRender.js
Created July 10, 2021 01:20
Mock contexts on testing library
import '__mocks__/broadcast'
import { ReactChildren, ReactChild } from 'react'
import { render } from '@testing-library/react'
import { GlobalStyles } from 'styles'
import { ToastContainer } from 'components/Toast'
import { AuthProvider } from 'contexts/AuthContext'
import { SidebarProvider } from 'contexts/SidebarContext'
@akinncar
akinncar / mockHooks.js
Created June 23, 2021 14:36
Mock custom hooks on jest
// outside component (after imports)
const useAuth = jest.spyOn(require('contexts/AuthContext'), 'useAuth')
const user = {
user: {
name: 'Roberto Firmino',
},
}
// inside describe
useAuth.mockReturnValue(user)
@akinncar
akinncar / AuthContext.tsx
Last active November 3, 2023 01:51
AuthContext with NextJs + Nookies
import {
createContext,
ReactNode,
useContext,
useEffect,
useState,
} from 'react'
import { setCookie, parseCookies, destroyCookie } from 'nookies'
import Router from 'next/router'