Skip to content

Instantly share code, notes, and snippets.

View fcschmidt's full-sized avatar
🌐
working to generate impact!

Fábio Schmidt fcschmidt

🌐
working to generate impact!
View GitHub Profile
@fcschmidt
fcschmidt / Makefile
Created May 13, 2019 19:25
Makefile Django
.PHONY: test install pep8 clean
DB_NAME=db_name
test:
@echo 'Run coverage and starting tests'
@pytest --verbose --cov=app --color=yes tests/
report:
@echo 'Report coverage and generate html'
@fcschmidt
fcschmidt / settings.py
Created May 13, 2019 19:24
Django Settings
"""
Django settings for podosphere project.
Generated by 'django-admin startproject' using Django 2.2.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
@fcschmidt
fcschmidt / conftest.py
Created April 13, 2019 22:30
Conftest Model
import pytest
from app.app_factory import create_app
from app.ext.db import db as _db
@pytest.fixture(scope='session')
def app():
"""Session wide test 'Flask' application."""
app = create_app('testing')
ctx = app.app_context()

Keybase proof

I hereby claim:

  • I am fcschmidt on github.
  • I am fcschmidt (https://keybase.io/fcschmidt) on keybase.
  • I have a public key ASCTHvC5ZO3YaJ1dlI4ZasWfLlt-i4HEMg1JqJXx-cEMKAo

To claim this, I am signing this object:

import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
import { NotificationsPage } from './../pages/notifications/notifications';
import { HistoryPage } from './../pages/history/history';
import { HomePage } from './../pages/home/home';
import { RegistrationPage } from './../pages/registration/registration';
import { LoginPage } from './../pages/login/login';
import { HttpClient, HttpHeaders, HttpHeaderResponse } from '@angular/common/http';
import { Injectable } from '@angular/core';
// import { Observable } from 'rxjs/Observable';
// import { resolveDefinition } from '@angular/core/src/view/util';
import 'rxjs/add/operator/map';
/*
Generated class for the RestApiProvider provider.
See https://angular.io/guide/dependency-injection for more info on providers
#!/usr/bin/env python
def calcula_idade(d):
for r in range(0, len(d)):
ano = d[r]['data'][2]
idade = 2018 - ano
d[r]['data'] = idade
d[r]['categoria'] = ''
if idade <= 16:
#!/usr/bin/env python3
def diagonal_principal(m):
ac = 0
m1 = []
while ac <= len(m) - 1:
vet = m[ac]
m1.append(vet[ac])
ac += 1
import binascii
binascii.hexlify(os.urandom(24))
import os
from selenium import webdriver
CHROMEDRIVER_PATH = "/app/.chromedriver/bin/chromedriver" # Heroku instance path
GOOGLE_CHROME_BIN_DEV = "/usr/bin/google-chrome"
CHROMEDRIVER_PATH_DEV = "/home/fcschmidt/.chromedriver/bin/chromedriver"
class GoogleChromeSelenium: