Skip to content

Instantly share code, notes, and snippets.

View FelipeGangrel's full-sized avatar

Felipe Pires de Oliveira FelipeGangrel

View GitHub Profile
@FelipeGangrel
FelipeGangrel / scripts.sql
Last active March 1, 2019 18:39
SIVIS | TICKET4YOU | SQLServer
/** Limpar eventos de teste */
DECLARE @eventoId int = 8;
DELETE FROM sf_eventos_ambientes WHERE id_evento >= @eventoId;
DELETE FROM sf_eventos_configuracao WHERE id_evento >= @eventoId;
DELETE FROM sf_ingresso WHERE id_evento >= @eventoId;
DELETE FROM sf_eventos WHERE id >= @eventoId;
SELECT * FROM sf_eventos;
SELECT * FROM sf_eventos_ambientes;
<?php
class Cripto
{
/**
* O salt será usado para negar ou aceitar a request e também para gerar uma chave criptografica
* @var string
*/
protected $salt;
DROP FUNCTION IF EXISTS `getMotivoPendenciaDocumento`;
DELIMITER //
CREATE FUNCTION `getMotivoPendenciaDocumento`(
tipo_entidade VARCHAR(20),
entidade_id INT(11),
documento_tipo_id INT(11))
RETURNS VARCHAR(20)
BEGIN
drop procedure if exists testeLoop;
DELIMITER //
CREATE PROCEDURE testeLoop(INOUT numero INT(11))
BEGIN
DECLARE i INT DEFAULT 1;
TRUNCATE TABLE teste;
WHILE (i <= numero) DO
INSERT INTO teste (nome) values (CONCAT('teste - ', i));
SET i = i+1;
END WHILE;
ngrok http -host-header=rewrite site.com:80
Error:
Doctrine\Common\Proxy\AbstractProxyFactory::getProxyDefinition(): Failed opening required '/tmp/__CG__AppTeam.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/usr/local/bin')
auto generate (DOCTRINE_PROXY_AUTOGENERATE) set to true. However only do this in development! You don't want (and need) that overhead on production environments.
php artisan doctrine:generate:proxies when you deploy to production.
public function assinar($url, $key, $body=null){
$parsedUrl = parse_url($url);
$signatureElements = $parsedUrl['path']."?".$parsedUrl['query'];
if($body)
$signatureElements .= $body;
$usablePrivateKey = $key;