Skip to content

Instantly share code, notes, and snippets.

View lucassimon's full-sized avatar
🏠
Working from home

Lucas Simon Rodrigues Magalhaes lucassimon

🏠
Working from home
View GitHub Profile
@lucassimon
lucassimon / KratosServices.rb
Last active June 10, 2021 20:59
KratosServices
class KratosServices
def initialize(client)
# instance of the follow clients
# - FerreriKratosSdk::Clients::ClientRest
# - FerreriKratosSdk::Clients::ClientOry
@client = client
end
def login(body)
@client.login(body)
@lucassimon
lucassimon / ferreri_kratos_sdk.txt
Created June 10, 2021 20:53
Arvore de diretorios da sdk da ferreri
├── bin
│   ├── console
│   └── setup
├── CODE_OF_CONDUCT.md
├── ferreri_kratos_sdk.gemspec
├── Gemfile
├── Gemfile.lock
├── lib
│   ├── ferreri_kratos_sdk
│   │   ├── clients
OryHydraClient::CreateIdentity
require 'ory-kratos-client'
instance = OryHydraClient::CreateIdentity.new(
schema_id: null,
traits: {
email: 'test@example.com'
}
password: 'some password'
)
identity:
default_schema_url: file:///path/to/default-identity.schema.json
const schema = yup.object().shape({
email: yup.string().email("Formato de e-mail inválido").required("Preenchimento obrigatório"),
fullname: yup.string().required().min(9, "Insira seu nome completo"),
cpf: yup.string().required("Preenchimento Obrigatorio"),
cellphone: yup.number().required("Preenchimento Obrigatorio"),
state: yup.string().required("Preenchimento Obrigatorio"),
city: yup.string().required("Preenchimento Obrigatorio"),
password: yup.string().required("Preenchimento Obrigatorio"),
repeatPassword: yup.string().required("Preenchimento Obrigatorio"),
@lucassimon
lucassimon / cloudbuild.log
Created July 26, 2020 14:30
Erro ao criar .env por causa da permissao como root e também sem a pasta vendor para fazer composer install
Starting Step #1 - "Rodando docker ps"
Step #1 - "Rodando docker ps": Already have image (with digest): gcr.io/cloud-builders/docker
Step #1 - "Rodando docker ps":
Step #1 - "Rodando docker ps": ***** NOTICE *****
Step #1 - "Rodando docker ps":
Step #1 - "Rodando docker ps": Alternative official `docker` images, including multiple versions across
Step #1 - "Rodando docker ps": multiple platforms, are maintained by the Docker Team. For details, please
Step #1 - "Rodando docker ps": visit https://hub.docker.com/_/docker.
Step #1 - "Rodando docker ps":
Step #1 - "Rodando docker ps": ***** END OF NOTICE *****
def create_index(es_object, index_name="recipes"):
created = False
# index settings
settings = {
"settings": {"number_of_shards": 1, "number_of_replicas": 0},
"mappings": {
"members": {
"dynamic": "strict",
"properties": {
"title": {"type": "text"},
<!DOCTYPE html>
<html class="no-js" lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
<head>
{{ "<!-- Basic Page Needs -->" | safeHTML }}
{{ block "schema-dot-org" . }}
<!-- schema.org metadata differs for Nodes and Pages -->
{{ end }}
import hashlib
import memcache
import traceback
from flask import request
from functools import wraps
from wakatime_website import app
from werkzeug.contrib.cache import MemcachedCache
mc = memcache.Client()
cache = MemcachedCache(mc)
@lucassimon
lucassimon / index.js
Created July 23, 2019 01:03
Ajuda com testes no react ComponentDidMount, axios e setState
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';