Skip to content

Instantly share code, notes, and snippets.

View Luizgpp's full-sized avatar
🎯
Focusing

Luiz Gabriel Parreira Pereira Luizgpp

🎯
Focusing
  • DDMX - Produtividade Inteligente
  • Itajuba
View GitHub Profile

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@Luizgpp
Luizgpp / clean_code.md
Created December 14, 2021 14:30 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@Luizgpp
Luizgpp / all-angular-material-components-imports.txt
Created March 31, 2021 16:48 — forked from pimatco/all-angular-material-components-imports.txt
All Angular Material Components Imports from app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
//Angular Material Components
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {MatCheckboxModule} from '@angular/material';
import {MatButtonModule} from '@angular/material';
@Luizgpp
Luizgpp / estados-cidades-capitais.json
Created March 31, 2021 16:48 — forked from pimatco/estados-cidades-capitais.json
JSON com Estados Cidades Capitais e Regiões
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"região": "Norte",
"capital": "Rio Branco",
"cidades": [
"Acrelândia",
"Assis Brasil",
<?php
class User extends Authenticatable
{
use Notifiable;
public function colaborador()
{
return $this->hasOne(Colaborador::class);
}
<?php
class Cargo extends Model
{
protected $table = "cargos";
public function colaborador()
{
return $this->hasMany(Colaborador::class);
}
}
<?php
class Colaborador extends Model
{
protected $table = "colaboradores";
public function user()
{
return $this->belongsTo(User::class);
}
@Luizgpp
Luizgpp / gist:3c54cf638587ba85c92184b067a6a76f
Created April 19, 2019 00:17 — forked from voskobovich/gist:537b2000108e4781f70b
List of most currency ISO code and symbol format in SQL.
DROP TABLE currency;
-- Create table variable
CREATE TABLE currency (
name VARCHAR(100),
code VARCHAR(100),
symbol VARCHAR(100)
);
-- Insert currency records
@Luizgpp
Luizgpp / _spacing-helpers.scss
Created January 31, 2019 16:48 — forked from jacurtis/_spacing-helpers.scss
SASS Margin and Padding Helpers Loop. Generates .m-t-10 type helper classes.
/*
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects.
It will generate several classes such as:
.m-r-10 which gives margin-right 10 pixels.
.m-r-15 gives MARGIN to the RIGHT 15 pixels.
.m-t-15 gives MARGIN to the TOP 15 pixels and so on.
.p-b-5 gives PADDING to the BOTTOM of 5 pixels
.p-l-40 gives PADDING to the LEFT of 40 pixels
@Luizgpp
Luizgpp / Friendship.php
Created January 28, 2019 21:52 — forked from sayhicoelho/Friendship.php
Laravel: A Trait for friendship.
<?php
namespace App\Traits;
use App\User;
trait Friendship
{
public function solicitationsOfMine()
{