Skip to content

Instantly share code, notes, and snippets.

View FelipeGangrel's full-sized avatar

Felipe Pires de Oliveira FelipeGangrel

View GitHub Profile
public function assinar($url, $key, $body=null){
$parsedUrl = parse_url($url);
$signatureElements = $parsedUrl['path']."?".$parsedUrl['query'];
if($body)
$signatureElements .= $body;
$usablePrivateKey = $key;
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.
ngrok http -host-header=rewrite site.com:80
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;
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
<?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;
@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;
@FelipeGangrel
FelipeGangrel / AlterTables.sql
Created February 20, 2019 13:45
SIVIS | TICKET4YOU | SQLServer
/** Adicionando campo obrigatorio_credenciamento à sf_eventos */
ALTER TABLE [dbo].[sf_eventos] ADD obrigatorio_credenciamento TINYINT NOT NULL DEFAULT 0;
GO
EXEC sys.sp_addextendedproperty
@name=N'MS_Description', @value=N'0 => não permite credenciamento, 1 => credenciamento opcional, 2 => credenciamento obrigatório',
@level0type=N'SCHEMA', @level0name=N'dbo',
@level1type=N'TABLE', @level1name=N'sf_eventos',
@level2type=N'COLUMN', @level2name=N'obrigatorio_credenciamento'
GO
alias dev='cd d:/Felipe/Dev'
alias dev-react='dev && cd React'
alias dev-react-native='dev && cd ReactNative'
alias dev-vue='dev && cd Vue'
alias dev-flutter='dev && cd Flutter'
alias dev-adb='cd ~/AppData/Local/Android/Sdk/platform-tools/'
alias react-native-menu='dev-adb && ./adb shell input keyevent 82'
@FelipeGangrel
FelipeGangrel / ext.txt
Created May 31, 2020 00:36 — forked from chronon/ext.txt
List of docker-php-ext-install extension names
Possible values for ext-name:
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant