Skip to content

Instantly share code, notes, and snippets.

View gcmatheusj's full-sized avatar
Working in awesome projects

Matheus Castro gcmatheusj

Working in awesome projects
View GitHub Profile
{
"env": {
"es6": true,
"node": true,
"jest": true
},
"extends": [
"airbnb-base",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
const aws = require('aws-sdk');
const sharp = require('sharp');
const crypto = require('crypto');
import awsConfig from '../config/aws';
interface Data {
createReadStream: any;
filename: string;
mimetype: string;
import React, { useCallback } from 'react'
import PropTypes from 'prop-types'
import { useFormik } from 'formik'
import { useMutation } from '@apollo/react-hooks'
import { gql } from 'apollo-boost'
import { EditorState, convertToRaw } from 'draft-js'
import { Button, Typography } from '@material-ui/core'
import { useSnackbar } from '../../../../../lib/SnackbarContext'
import React, { createContext, useCallback, useContext, useReducer } from 'react'
import PropType from 'prop-types'
import Snackbar from '../components/Snackbar'
export const SnackbarContext = createContext()
const initialState = {
open: false,
severity: '',
import React, { createContext, useCallback, useContext, useState } from 'react';
import { uuid } from 'uuidv4';
import ToastContainer from '../components/ToastContainer';
export interface ToastMessage {
id: string;
type?: 'success' | 'error' | 'info';
title: string;
description?: string;
import React, {useState, useRef} from 'react';
import {
View,
WebView,
Text,
Linking,
Dimensions,
StyleSheet,
} from 'react-native';
import { createMuiTheme } from '@material-ui/core/styles'
export const theme = createMuiTheme({
overrides: {
MuiButton: {
root: {
borderRadius: 8,
fontWeight: 'bold',
boxShadow: 'none'
}
async findOneByEnrollment({ accountId, userId, courseId, courseVersionId, lessonId }) {
const [enrolment] = await this.knex('enrollments')
.where({
user_id: userId
})
.andWhere({
account_id: accountId
})
.andWhere({
course_id: courseId
import * as React from 'react';
import styled from 'styled-components';
import media from 'styled-media-query';
import { Form, FormikProps } from 'formik';
import LinearProgress from '@material-ui/core/LinearProgress';
import CardContent from '@material-ui/core/CardContent';
import CardActions from '@material-ui/core/CardActions';
import Button from '@material-ui/core/Button';
import addYears from 'date-fns/addYears';
import * as React from 'react';
import * as ptBRLocale from 'date-fns/locale/pt-BR';
import addYears from 'date-fns/addYears';
import CurrencyInput from 'react-currency-input';
import {
useForm,
Controller,
} from 'react-hook-form';
import {