Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Lucas Simon Rodrigues Magalhaes lucassimon

🏠
Working from home
Block or report user

Report or block lucassimon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lucassimon
lucassimon / index.js
Created Jul 23, 2019
Ajuda com testes no react ComponentDidMount, axios e setState
View index.js
import React from 'react';
import { connect } from 'react-redux';
import {
Container, Grid, Menu,
} from 'semantic-ui-react';
import CustomerService from '../../services/CustomerService';
import { customerListStart, customerListSuccess, customerListError } from './actions';
import Create from './Create';
import List from './List';
View CtaImage.js
import React from 'react'
class CtaImage extends React.Component {
constructor(props) {
super(props)
this.state = { image: null }
}
componentDidMount() {
const { ctaImage } = this.props
@lucassimon
lucassimon / 10-keyboard.conf
Last active Dec 29, 2018
How to install arch
View 10-keyboard.conf
Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbLayout" "br"
Option "XkbVariant" "abnt2"
EndSection
View handleSubmit.js
onSubmit={ async (values, actions) => {
let attemps = 1
while ( attemps <= 2) {
try {
await SupplierService.create(values, token)
actions.setSubmitting(false);
// TODO: Fetch the paginated data
handleOpenSnackBar('Registro inserido com sucesso', 'success')
close();
View test_iugu.py
# -*- coding: utf-8 -*-
# Third
import iugu
# Apps
# apps
from apps.zipcodes.postmon import postmon_search_cep
from apps.zipcodes.zip_code import translate_to_iugu
@lucassimon
lucassimon / sms.py
Created May 2, 2017
Envio de sms com zenvia
View sms.py
# -*- coding:utf-8 -*-
from __future__ import unicode_literals
# Stdlib imports
import requests
import base64
# Core Django imports
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.views.generic import (
View sublime key bindings
[
// missing accented characters fix for ubuntu 14.10
// a, [á, à, ã, â, å, ä]
{ "keys": ["´","a"], "command": "insert", "args": {"characters": "á"}},
{ "keys": ["`","a"], "command": "insert", "args": {"characters": "à"}},
{ "keys": ["~","a"], "command": "insert", "args": {"characters": "ã"}},
{ "keys": ["^","a"], "command": "insert", "args": {"characters": "â"}},
{ "keys": ["°","a"], "command": "insert", "args": {"characters": "å"}},
{ "keys": ["¨","a"], "command": "insert", "args": {"characters": "ä"}},
@lucassimon
lucassimon / pagarmegithub.py
Created Jan 18, 2017
metodo de post do formulario. Defini o metada como dicionario
View pagarmegithub.py
# encoding: utf-8
import requests
from .exceptions import NotBoundException
from .resource import AbstractResource
from .settings import BASE_URL
from .transaction import Transaction
View crawlerjs.js
var crawlerjs = require('crawler-js');
var mongo = require('mongodb');
var monk = require('monk');
var db = monk('localhost:27017/airport');
var crawler = {
interval: 1000,
getSample: 'http://www.aeroportosdobrasil.com/aeroportos/listagem/1',
get: 'http://www.aeroportosdobrasil.com/aeroportos/listagem/[numbers:1:33:1]',
preview: 0,
View gist:9338bdd98fd4f4ca06a2
{
"bold_folder_labels": true,
"color_scheme": "Packages/Theme - Brogrammer/brogrammer.tmTheme",
"dictionary": "Packages/Languages/Portuguese/pt_BR.dic",
"file_exclude_patterns":
[
".*",
"*.pyc",
"*.pyo",
"*.exe",
You can’t perform that action at this time.