Skip to content

Instantly share code, notes, and snippets.

View leohmoraes's full-sized avatar
🏠
Working/Learning and Hackathon from home

Léo Moraes leohmoraes

🏠
Working/Learning and Hackathon from home
View GitHub Profile
@leohmoraes
leohmoraes / email.dart
Created April 14, 2020 13:37 — forked from paulo9mv/email.dart
Adiciona o método sendMessage()
import 'package:mailer/mailer.dart';
import 'package:mailer/smtp_server.dart';
class Email {
String _username;
var smtpServer;
Email(String username, String password){
_username = username;
smtpServer = gmail(_username, password);
@leohmoraes
leohmoraes / main.dart
Last active February 12, 2020 00:45
42. Stateless e Stateful - Daniel Ciolfi - Curso Flutter
/*
Rode na web
https://dartpad.dev/078f00a6e5d75c252eaa9a4177c1aa05
*/
import 'package:flutter/material.dart';
/* 001
@leohmoraes
leohmoraes / esp8266-push.ino
Created December 22, 2019 04:03
esp8266-push-notification (nao testado)
/*******************************************************************
* Push Notificaiton Demo *
* Using IFTTT and Telegram to send alerts to your phone *
* *
* Telegram Library: *
* https://github.com/witnessmenow/Universal-Arduino-Telegram-Bot *
* *
* IFTTT Maker Library: *
* https://github.com/witnessmenow/arduino-ifttt-maker *
* *
@leohmoraes
leohmoraes / webserver-led-on-off-arduino-lolin-generic-esp8266.ino
Last active December 22, 2019 02:07
webserver-led-on-off-arduino-lolin-generic-esp8266
// Source of origin code : https://www.nyebarilmu.com/tutorial-arduino-mengakses-nodemcu-sebagai-access-point/
// Entering the Library, for the tutorial on adding NodeMCU libraries and boards, see here: https://www.youtube.com/watch?v=8jMr94B8iN0
#include <ESP8266WebServer.h>
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
ESP8266WebServer server(80);
// Make a wifi name and password as access points
const char *ssid = "nova-rede";
@leohmoraes
leohmoraes / mongo.md
Last active September 21, 2019 00:50
Mongo

Criar um container com o mongo

  • docker run --name NOME_BASE -p 27017:27017 -d -t mongo

  • Criar a base NOME_BASE

CONECTAR NO SSH

  • mongo mongodb://localhost:27017/NOME_BASE

Criando um indice

@leohmoraes
leohmoraes / anotacoes instalacao teclas macbook.md
Last active September 10, 2019 15:42
Macbook Teclas e Atalhos #macbook #instalacao #teclas

Command (⌘) + R Instala o macOS mais recente que estava instalado no Mac.

Option + ⌘ + R Atualize para a versão mais recente do macOS compatível com o Mac.

Shift + Option + ⌘ + R Instala o macOS que veio com o Mac ou a versão mais próxima ainda disponível.

Fonte: https://support.apple.com/pt-br/HT204904

@leohmoraes
leohmoraes / ..Modulo 02 - Video 13-14 - Conceitos de JWT.md
Last active August 26, 2019 00:32
..Modulo 02 - Video 13-14 - Conceitos de JWT.md #rocketseat #bootcamp8 #modulo02 #jwt

JWT - Json Web Token

Video 13

# POST ROTA 

usuario e senha

retorna um Token JWT

AAAAAAAA.BBBBBBBBBB.CCCCCCCCC

@leohmoraes
leohmoraes / curl.md
Created August 25, 2019 21:07 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@leohmoraes
leohmoraes / ..Anotacoes Modulo 02 - Video 10-12.md
Last active August 26, 2019 00:41
..Anotacoes Modulo 02 - Video 10-12 - Json no Shell

rodar no modo dev

yarn dev

video 12

yarn add bcryptjs

para testar no terminal

ver json no bash

brew install jq

@leohmoraes
leohmoraes / ..anotacoes Modulo 02- Video 08 - Migrations dos Usuarios.md
Last active August 26, 2019 00:35
Modulo 02- Video 08 - Migrations dos Usuarios #rocketseat #bootcamp8 #modulo02

gerar o arquivo de migracao para criar a tabela

yarn sequelize migration:create --name=create-users

up: (queryInterface, Sequelize) detalhes dos campos

down: (queryInterface)

executar a criacao da tabela