Skip to content

Instantly share code, notes, and snippets.

View wilmanbarrios's full-sized avatar

Wilman Barrios wilmanbarrios

View GitHub Profile
@wilmanbarrios
wilmanbarrios / GitHub-Forking.md
Created August 24, 2017 02:08 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@wilmanbarrios
wilmanbarrios / Testcase.php
Created February 11, 2018 16:30
Laravel TDD: Disable Exception Handling
<?php
namespace Tests;
use App\Exceptions\Handler;
use Illuminate\Contracts\Debug\ExceptionHandler;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
abstract class TestCase extends BaseTestCase
{
// Creates a new promise that automatically resolves after some timeout:
Promise.delay = function (time) {
return new Promise((resolve, reject) => {
setTimeout(resolve, time)
})
}
// Throttle this promise to resolve no faster than the specified time:
Promise.prototype.takeAtLeast = function (time) {
return new Promise((resolve, reject) => {
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
export PATH=/opt/firefox/firefox:$PATH
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
<?php
class Warp extends Space
{
protected $array;
public function __construct($array)
{
$this->array = $array;
}
<snippet>
<content><![CDATA[
/** @test */
function ${1/\s/_/g}() {
${0:// ${1:type name of method with spaces}}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>test</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@wilmanbarrios
wilmanbarrios / laravel-dependencies.md
Last active February 7, 2019 00:01
Instalación de PHP y Nodejs

Requisitos servidor con aplicaciones Laravel 5.*

PHP 7.1.*

Herramientas necesarias

sudo apt-get install -y git vim curl wget zip unzip

Extenciones comunes de php7.*

@wilmanbarrios
wilmanbarrios / chain_helper.php
Created January 30, 2019 22:10 — forked from calebporzio/chain_helper.php
Handy "chain()" helper method for making non-fluent classes/objects fluent.
<?php
function chain($object)
{
return new class ($object) {
public function __construct($object)
{
$this->wrapped = $object;
}
@wilmanbarrios
wilmanbarrios / .php_cs.laravel.php
Created July 17, 2019 13:55 — forked from laravel-shift/.php-cs-fixer.php
PHP CS Fixer - Laravel Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'phpdoc_indent' => true,
'binary_operator_spaces' => [
'operators' => ['=>' => null]
],