Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Erik Figueiredo erikfig

🏠
Working from home
View GitHub Profile
View gist:80434c0c9a2fa4e5861a836b2c9b386c
protected function webRoutes()
{
if (!$this->app->routesAreCached()) {
Route::namespace('\ErikFig\Feature\products\Http\Controllers')
->middleware(['web'])
->group(__DIR__ . '/../../routes/web.php');
}
}
@erikfig
erikfig / gist:d03e29c1ee60ffe1506a
Created May 2, 2014
CakePHP Hashs Generator (Security.salt e Security.cipherSeed) - Gerador de Hashs (Security.salt e Security.cipherSeed) para CakePHP
View gist:d03e29c1ee60ffe1506a
<html>
<head>
<title>CakePHP Gerador de Hash</title>
</head>
<body>
<h1>Gerador de Hash Para CakePHP</h1>
<p>Recarregue a p&aacute;gina para gerar novos hashs!</p>
<?php
function geraSenha($tamanho = 15, $minusculas = true, $maiusculas = true, $numeros = true, $simbolos = true)
{
View gist:903c28721cd14616300be69f55a552db
<!-- As informações abaixo são obrigatórias. -->
## Link da tarefa no Jira:
<!-- Informe o link das tarefas no jira. -->
Link do Jira: https://webjump.atlassian.net/browse/ADT-1234
<!-- O Checklist deve ser preenchido apenas pelo revisor no momento do code review -->
## Checklist
- [ ] A branch de destino está correta? (develop, staging, master);
View main.js
import api from "./api";
import MovieCover, {buildEvents} from './components/movieCover';
import "./styles.css";
class App {
constructor() {
this.appElement = document.getElementById("app");
this.render()
.then((res) => this.appElement.innerHTML = res)
.then(() => {
View gist:0a3030f7568084723a7d15d4e1e73f2d
<?php
class Model {
public static function find($name)
{
return 'Model::find::' . $name;
}
public function save()
{
View gist:e80851a5abd1c83d97f503ec0acda8a1
<?php
namespace Simbora\v1\Place\Repositories;
use Simbora\v1\Place\Models\Place;
class PlaceRepository
{
protected $place;
View gist:34208a76a888b0bfbff65ba2f02bcbf0
<samlp:AuthnRequest AssertionConsumerServiceURL="https://saml-sp.repro.lab/cgi/samlauth"
Destination="https://saml-redirect.repro.lab/saml/login" ForceAuthn="false"
ID="_59d52136c277a2ae101124b8e40142bf" IssueInstant="2018-01-25T08:55:22Z"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Version="2.0"
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol">
<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">https://netscaler.repro.lab</saml:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:CanonicalizationMethod>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod>
View gist:8a5bfaf84b73560b0f9dfd9bca954a29
<samlp:AuthnRequest
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
ID="ONELOGIN_424759b48c2d86c3fccb57821ddac32a2f948513"
Version="2.0"
ProviderName="Display Name"
IssueInstant="2020-05-22T13:08:23Z"
Destination="https://idp-saml.ambev.com.br/saml2/idp/SSOService.php"
ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
AssertionConsumerServiceURL="https://digitaltrade.ambevdevs.com.br/prod/saml2/ambev/acs">
View WrapperTable
import React, { useState, useEffect } from 'react'
import PropTypes from 'prop-types'
import Table from '../Table'
import MobileTable from '../MobileTable'
import Button from '../Button'
import RegisterUser from '../../containers/Register/RegisterUser'
import { Container, WrapperAddUser } from './styles'
const useViewport = () => {
View gist:1d600f6b6c30a2d31355a01e17332d98
const number = 123456999.789;
let numberFormated = new Intl.NumberFormat('pt-BR', { style: 'decimal', minimumFractionDigits: 2, maximumFractionDigits :2}).format(number);
console.log(numberFormated.replace(/\./g, '').replace(',', '.'))