Skip to content

Instantly share code, notes, and snippets.

View IgorDePaula's full-sized avatar
😆

Igor C. de Paula IgorDePaula

😆
View GitHub Profile
@erikfig
erikfig / README.md
Created October 18, 2018 18:21
Atualizar repositório forked com o original, simples e rápido

Crie dois alias, um para adicionar o repositório e outro para atualizar:

git config --global alias.arf "!git remote add upstream"
git config --global alias.uf "!git fetch upstream && git checkout master && git merge upstream/master"

Isso cria dois comandos git, o primeiro para adicionar remoto forked (arf) e segundo para atualizar o forked (uf - u de update).

Da primeira vez que for usar você adiciona o original:

@srbry
srbry / main.go
Created October 2, 2018 08:25
Golang lambda authorizer
package main
import (
"errors"
"strings"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
)
@IgorDePaula
IgorDePaula / NewRouter.php
Last active March 22, 2023 18:08
Router sem expressoes regulares
<?php
/**
* Created by PhpStorm.
* User: Ione
* Date: 09/07/2018
* Time: 22:40
*/
class Request
{
@wilcorrea
wilcorrea / composer.json
Last active July 29, 2018 15:21
Update composer.json script
{
"scripts": {
"test": "vendor/bin/phpunit --colors=always",
...
"major": "./composer.release.sh major",
"minor": "./composer.release.sh minor",
"patch": "./composer.release.sh patch"
},
"config": {
"process-timeout": 60000
@IgorDePaula
IgorDePaula / DiContainer.php
Created June 27, 2018 15:56
New DI - Container
<?php
$start = microtime(true);
class Di
{
private $store = [];
/**
* @return array
*/
public function getStore()
{
#!/bin/bash
BASE=$(dirname $(readlink -f ${0}))
DOMAIN=${1}
REPO="${BASE}/repo/${DOMAIN}"
APP="${BASE}/app/${DOMAIN}"
mkdir -p ${REPO}
mkdir -p "${APP}/public"
@wilcorrea
wilcorrea / root.app.example_net.docker-compose.yml
Last active April 26, 2018 13:54
Proxy reverse with nginx and docker-compose
version: '3'
services:
example_net-app:
container_name: example_net-app
image: nginx
networks:
- reverse-proxy
environment:
<template>
<div>
<v-card width="100%">
<v-card-title>
<h1>{{name}}</h1>
<v-spacer></v-spacer>
<v-text-field
append-icon="search"
label="Pesquisar"
@wilcorrea
wilcorrea / Controller.php
Last active February 15, 2018 01:43
Dicas & Truques em Orientação a Objetos: Ato I ~ Controller.php (usando a OO a seu favor)
<?php
namespace App\Http\Content\Controllers;
use App\Common\Model;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Routing\Controller;
/**
@IgorDePaula
IgorDePaula / MainMenu.vue
Last active October 8, 2018 14:45
Menu recursivo em quasar (para drawer)
<template>
<div>
<q-collapsible v-if="item.children.length > 0" v-for="(item, index) in itens" :key="index" :icon="item.icon" indent :label="item.name"
:to="`/app/competitions/${item.id}`">
<main-menu :itens="item.children"/>
</q-collapsible>
<q-side-link :to="''" v-else >
<q-item>
<q-item-side :icon="item.icon"/>
<q-item-main :label="item.name"/>