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 / Spinner.js
Created April 28, 2020 04:45 — forked from LauraBeatris/Spinner.js
Roullete Spinner made with React Hooks
const spinWheel = useCallback(() => {
// Receives the winner prop and search for his position in the spinner bets array
const order = [8, 1, 14, 2, 13, 3, 12, 4, 0, 11, 5, 10, 6, 9, 7];
const position = order.indexOf(winner);
// Determine position where to land
const rows = 12;
const card = 80 + 2 * 2;
let landingPosition = rows * 15 * card + position * card;
@leohmoraes
leohmoraes / gist:13b3d4b2831829362d7f10b80f35ea04
Created April 23, 2020 04:54 — forked from tlack/gist:5094559
example of proxying https -> http
location / { # ~ domain=(.*)& {
rewrite_log on;
if ( $arg_callback ) {
echo_before_body '$arg_callback(';
echo_after_body ');';
}
if ($args ~ "domain=(.*)&") {
set $key1 $1;
echo_before_body "$arg_callback(";
# proxy_pass http://whois.api.go.co/blah=$key1;
@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 / 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 / board.go
Created August 5, 2019 12:07 — forked from eminetto/board.go
board.go
package main
import (
"fmt"
"bytes"
)
func main() {
b := NewBoard()
fmt.Println(b.BoardRepresentation())
@leohmoraes
leohmoraes / kannel.conf
Created August 4, 2019 16:35 — forked from srugano/kannel.conf
Example of Kannel configurations to be used with a Huawei modem.
# CONFIGURATION FOR USING SMS KANNEL WITH RAPIDSMS
#
# For any modifications to this file, see Kannel User Guide
# If that does not help, see Kannel web page (http://www.kannel.org) and
# various online help and mailing list archives
#
# Notes on those who base their configuration on this:
# 1) check security issues! (allowed IPs, passwords and ports)
# 2) groups cannot have empty rows inside them!
# 3) read the user guide
@leohmoraes
leohmoraes / fetch-api-examples.md
Created August 1, 2019 11:20 — forked from justsml/fetch-api-examples.md
JavaScript Fetch API Examples
import pandas as pd
import requests
from bs4 import BeautifulSoup
import matplotlib.pyplot as plt
import seaborn as sns
# Método para extrair várias páginas de uma só vez
def scrape_stats(base_url, year_start, year_end):
years = range(year_start,year_end+1,1)
@leohmoraes
leohmoraes / course-flow.md
Created July 6, 2019 03:04 — forked from johnpapa/course-flow.md
Introduction to Vue

Getting Started with Vue

This course gently introduces how to start developing with Vue to create web applications.

You will learn how to hone your Vue component skills, display data, present lists and inputs, handle user interactions in components, navigate between views, manage data and state, and get started with all of the key tools to make you efficient at developing with Vue.

1 - Getting Started with Vue

The learner will see what we will learn and build in the demos for this course. We’ll cover the requirements for Vue, how to set up your tools to code with Vue, and what recommended tooling you will need.

Cursos e Dicas de Data Science

Cursos

DataCamp --> Site com cursos curtos de data science e suas bibliotecas. [GRATUITO | IDIOMA: INGLÊS]

Minerando Dados --> site sensacional com exemplos práticos de data mining e diversos outros. [GRATUITO | IDIOMA: PORTUGUÊS]

Hacker Rank --> Ótimo site para desafios e aprimoramento de técnicas. [GRATUITO | IDIOMA: INGLÊS]

Data Science Cheatsheets --> Tabelas resumo de PYTHON, PANDAS, NUMPY, SCIKIT-LEARN, PANDAS... enjoy!!! [GRATUITO | IDIOMA: INGLÊS]