Skip to content

Instantly share code, notes, and snippets.

View carlitomurta's full-sized avatar
🎓
Creating usefull tools with MIT

Carlito Murta carlitomurta

🎓
Creating usefull tools with MIT
View GitHub Profile
@carlitomurta
carlitomurta / .stylelintrc
Created August 21, 2020 21:52
My StyleFiles config
{
"extends": [
"stylelint-config-standard",
"stylelint-config-recommended-scss",
"stylelint-config-prettier"
],
"rules": {
"font-family-name-quotes": "always-where-recommended",
"function-url-quotes": [
"always",
@carlitomurta
carlitomurta / .editorconfig
Created August 21, 2020 21:52
My .editorconfig File
[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
@carlitomurta
carlitomurta / .prettierrc
Created August 21, 2020 21:51
My Prettier Config File
{
"printWidth": 100,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"arrowParens": "always",
"overrides": [
{
"files": "*.ts",
"options": {
@carlitomurta
carlitomurta / layout.scss
Created March 19, 2020 21:18
Grid layout
$columns: 16; // Number of columns in the grid system
.container {
margin: 0 auto;
max-width: 1440px;
padding: 0px 16px;
}
.row {
display: flex;
@carlitomurta
carlitomurta / zip-code.pipe.ts
Created November 22, 2019 14:14
Pipe Angular para CEP/ZipCode
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'zipCode'
})
export class ZipCodePipe implements PipeTransform {
transform(value: string, args?: any): any {
if (value) {
value = value.replace(/\D/g, '');
@carlitomurta
carlitomurta / cpfCnpj.pipe.ts
Created November 22, 2019 14:14
Pipe Angular para CPF ou CNPJ
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'cpfCnpj'
})
export class CpfCnpjPipe implements PipeTransform {
transform(value: string, args?: any): any {
if (value) {
value = value.replace(/\D/g, '');
@carlitomurta
carlitomurta / agencia.pipe.ts
Created November 22, 2019 14:10
Pipe Angular para Agência
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'agencia'
})
export class AgenciaPipe implements PipeTransform {
transform(value: string, args?: any): any {
if (value) {
value = value.replace(/\D/g, '');
@carlitomurta
carlitomurta / conta.pipe.ts
Created November 22, 2019 14:10
Pipe Angular para Conta Bancária
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'conta'
})
export class ContaPipe implements PipeTransform {
transform(value: string, args?: any): any {
if (value) {
value = value.replace(/\D/g, '');
value = `${value.substr(0, value.length - 1)}-${value.substr(value.length - 1, 1)}`;
@carlitomurta
carlitomurta / codigo-barras.pipe.ts
Created November 22, 2019 14:08
Pipe Angular para Linha digitável de Boletos
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'codigoBarras'
})
export class CodigoBarrasPipe implements PipeTransform {
transform(value: string, args?: any): any {
if (value) {
value = value.replace(/\D/g, '');