This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
/** | |
* check for metrics on jenkins | |
* pass -d param with the path of phpmetrics output json | |
*/ | |
function getHigherMetric($metrics, $value) | |
{ | |
$mappedMetrics = array_map(function ($metric) use ($value) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Place your key bindings in this file to override the defaultsauto[] | |
[ | |
{ | |
"key": "ctrl+shift+g", | |
"command": "-workbench.view.scm" | |
}, | |
{ | |
"key": "ctrl+shift+g", | |
"command": "workbench.view.scm" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$finder = PhpCsFixer\Finder::create() | |
->exclude('somedir') | |
->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php') | |
->in(__DIR__); | |
return PhpCsFixer\Config::create() | |
->setRules([ | |
'@PSR2' => true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#code --list-extensions | xargs -L 1 echo code --install-extension | |
code --install-extension bmewburn.vscode-intelephense-client | |
code --install-extension donjayamanne.githistory | |
code --install-extension eamodio.gitlens | |
code --install-extension emeraldwalk.RunOnSave | |
code --install-extension Equinusocio.vsc-material-theme | |
code --install-extension GrapeCity.gc-excelviewer | |
code --install-extension Gruntfuggly.todo-tree | |
code --install-extension higoka.php-cs-fixer | |
code --install-extension kumar-harsh.graphql-for-vscode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get all project conteiners up | |
alias ddown='docker-compose down' | |
# get all project conteiners up | |
alias dup='docker-compose up -d' | |
# get all project conteiners up | |
alias lddown='cd ~/code/laradock && docker-compose down' | |
# get laradock default containers up | |
alias ldup='cd ~/code/laradock && docker-compose up -d nginx mysql phpmyadmin' | |
alias vup='cd ~/Homestead && vagrant up' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This is a tool for help coverage generation on Dusk | |
* This was based on this article: http://tarunlalwani.com/post/php-code-coverage-web-selenium/ | |
*1. add this file to your laravel tests directory | |
*2. add the following line to your nginx config: | |
* fastcgi_param PHP_VALUE "auto_prepend_file=\"/absolute_path/tests/coverage_for_dusk.php\""; | |
* if you are using apache you can use this line on .htaccess: | |
* php_value auto_prepend_file "/absolute_path/tests/coverage_for_dusk.php" | |
*3. Sample test: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"workbench.iconTheme": "material-icon-theme", | |
"editor.fontSize": 20, | |
"workbench.colorTheme": "Material Theme Darker", | |
"workbench.activityBar.visible": false, | |
"workbench.statusBar.visible": false, | |
"breadcrumbs.enabled": true, | |
"workbench.editor.highlightModifiedTabs": true, | |
"debug.console.fontSize": 20, | |
"terminal.integrated.fontSize": 20, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Listen for XDebug", | |
"type": "php", | |
"request": "launch", | |
"port": 9000, | |
"pathMappings": { | |
"/home/vagrant/code/projectname": "/home/leonardo/code/projectname", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package collections | |
import "errors" | |
type Stack struct { | |
valores []interface{} | |
} | |
func (stack *Stack) Push (valor interface{}) { | |
stack.valores = append(stack.valores, valor) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
import "os" | |
import "strconv" | |
func main(){ | |
entrada := os.Args[1:] | |
numeros := make([]int, len(entrada)) |
NewerOlder