Skip to content

Instantly share code, notes, and snippets.

View clagiordano's full-sized avatar

Claudio Giordano clagiordano

View GitHub Profile
@clagiordano
clagiordano / .gitconfig
Created September 23, 2020 11:32
.gitconfig
[user]
email = <YOUR_MAIL>
name = <YOUR_NAME>
[push]
default = current
[merge]
tool = <YOUR_PREFERRED_MERGE_TOOL>
[alias]
b = branch
ca = commit -a
@clagiordano
clagiordano / composer.json
Last active June 1, 2020 09:58
composer scripts
"scripts": {
"test": "./vendor/bin/phpunit --no-coverage",
"coverage": "php -dzend_extension=xdebug.so ./vendor/bin/phpunit",
"debug": "php -dxdebug.remote_autostart=On -dzend_extension=xdebug.so",
"phpstan": "phpstan analyse -l 7 src/",
"phpmd": "phpmd src/ text phpmd.xml",
"lint": "./vendor/bin/phpcs --standard=phpcs.xml --extensions=php --ignore=autoload.php src",
"lint-fix": "./vendor/bin/phpcbf --standard=phpcs.xml --extensions=php --ignore=autoload.php src"
}
@clagiordano
clagiordano / phpcs.xml
Created April 1, 2018 19:48
PSR2 code sniffer ruleset
<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer">
<description>The coding standard for PHP_CodeSniffer itself.</description>
<!--<include-pattern>../src/*</include-pattern>-->
<exclude-pattern>../tests/*</exclude-pattern>
<rule ref="PSR2"/>
</ruleset>
@clagiordano
clagiordano / phpmd.xml
Created April 1, 2018 19:44
Full phpmd ruleset
<?xml version="1.0"?>
<ruleset name="phpmd"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0
http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="
http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
Full rulesets
@clagiordano
clagiordano / ngrxintro.md
Created August 21, 2017 07:36 — forked from btroncone/ngrxintro.md
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@clagiordano
clagiordano / test.php
Created April 27, 2016 08:07
Sample upload with limited account
<?php
require 'vendor/autoload.php';
use Aws\S3\S3Client;
use League\Flysystem\AwsS3v3\AwsS3Adapter;
use League\Flysystem\Filesystem;
$bucketName = 'YOUR_BUCKET';
$serviceConfig = [