Skip to content

Instantly share code, notes, and snippets.

View geekcom's full-sized avatar
🏴
Time to code...

Daniel Rodrigues geekcom

🏴
Time to code...
View GitHub Profile
@geekcom
geekcom / geekcom.key
Created June 26, 2020 21:11
My PGP Open Source Key
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF6BOdkBEADQzhspoM44xtONPN7VGwRPwY6onk2+b+RdYYvkHzJc8jghdQJh
iIOwXvbgHwPkC5EWa+7cTLy1feb+emdk747MMv+ch+CdtlgWXaZOm75QlBLWj58C
V9dXgrJE8ZrYCpTiTFtV0Ghi8AbGJJTx45d1RlM/yHUtee8qsbihMPfMDIo4gyGX
fscXFuMXh8wIhbLV2XMGUz9206e882HNqLB7fHo6vpcyXbaZRZQW/c6GB1tVt1uA
wFT9d5ovZ0eebfS3jQjWQsH8sbe4ItbRKxoOdHTVgI86IDslGyrxcCsahRa8kLOa
4InyKLelPLYcTrQXmbI8R4YIpIyyjzlRFQAjy0FwgJOXe3r+nrMgTxu1Jfr0vosQ
qDRoExLAR2su+RKOpz6BhA9euOEtOzzTnMnCnAPm3Q5o8yc+b5N8g4luqHZVHCTG
N/zNbC3yjYfY+qH5eW4dpHO3tRVTJBexrba8nk6P3jnMlje2Nqsxaw/e2CWcoFA5
@geekcom
geekcom / npath.php
Last active March 19, 2020 17:15
npath example
<?php
function foo($a, $b)
{
if ($a > 10) {
echo 1;
} else {
echo 2;
}
}
@geekcom
geekcom / MyClassWithPreloading.php
Created December 8, 2019 23:14
MyClassWithPreloading.php
<?php
class MyClassWithPreloading
{
public function helloPreloading()
{
$start = microtime(true);
$value = 1;
@geekcom
geekcom / php.ini
Created December 8, 2019 22:53
php.ini
opcache.enable_cli=1
opcache.preload="/var/www/app/preload.php"
opcache.preload_user=www-data
@geekcom
geekcom / preload.php
Created December 8, 2019 22:49
preload.php
<?php
$files = [
'MyClassWithPreloading.php'
];
foreach ($files as $file) {
opcache_compile_file($file);
}
@geekcom
geekcom / shell.php
Last active September 26, 2019 15:52
PHP interactive mode
php -a
@geekcom
geekcom / gitCommands.txt
Last active September 20, 2022 21:39
Minhas anotações - GIT
git init >> Inicia um novo repositório git;
git add Controller.php >> Adiciona um arquivo a "staging area";
git add . >> Adiciona todos os arquivos do repositório a "staging area";
git commit -m "mensagem" >> Faz um commit;
git commit -am "mensagem" >> Adicionar arquivo a "staging area" e fazer commit ao mesmo tempo;
git commit  --amend >> Alterar último commit;
git commit --amend -m "Mensagem" >> Fazer commit alterando o último.
-------------------------------------------------------------------------------------------
git log >> Mostra histórico de commits;
@geekcom
geekcom / BilletService.php
Created October 17, 2018 17:30
SetShippingCost e SetShippingType PagSeguro - PHPSDK
<?php
namespace BilletService;
use PagSeguro\Domains\Requests\DirectPayment\Boleto as BilletPagseguroApi;
class BilletService
{
private $billetPagseguroApi;
@geekcom
geekcom / CreditCardPaymentTest.php
Created October 2, 2018 20:47
CreditCardPaymentTes
<?php
namespace Test;
use PHPUnit\Framework\TestCase;
class CreditCardPaymentTest extends TestCase
{
/**
* @dataProvider creditCardDataProvider
@geekcom
geekcom / phpunit.xml
Created May 11, 2018 13:05
Config phpunit
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">