Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Fernando Evangelista fexx

🎯
Focusing
  • São paulo
View GitHub Profile
View home-office-nova.pac
function FindProxyForURL(url, host) {
url = url.toLowerCase();
host = host.toLowerCase();
if (isPlainHostName(host)) {
return "DIRECT";
}
if ((host == "hml.mol.mapfre.com.br") ||
(host == "ftp.mapfre.com.br") ||
@fexx
fexx / settings.xml
Last active Nov 2, 2019
settings.xml - Criando e enviando imagem Docker com Java e Maven
View settings.xml
<server>
<id>docker.io</id>
<username>{docker_id}</username>
<password>{senha_docker_hub}</password>
<configuration>
<email>{email}</email>
</configuration>
</server>
@fexx
fexx / pom.xml
Last active Nov 2, 2019
pom.xml - Criando imagem docker com maven
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
@fexx
fexx / app.component.css
Created Oct 19, 2019
app.component.css (Consumindo API REST com HttpClient no Angular 8)
View app.component.css
.container {
margin-top: 30px;
}
.add-car {
margin-bottom: 30px;
}
.list-car {
margin-bottom: 50px;
@fexx
fexx / app.component.html
Created Oct 19, 2019
app.component.html (Consumindo API REST com HttpClient no Angular 8)
View app.component.html
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item active" aria-current="page">Gerenciamento de carros</li>
</ol>
</nav>
<div class="container">
<div class="card list-car">
<h5 class="card-header">Lista de carros</h5>
<div class="card-body">
<table class="table">
@fexx
fexx / index.html
Created Oct 19, 2019
index.html (Consumindo API REST com HttpClient no Angular 8)
View index.html
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>AngularHttp</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
@fexx
fexx / app.component.ts
Last active Oct 21, 2019
app.component.ts (Consumindo API REST com HttpClient no Angular 8)
View app.component.ts
import { Component, OnInit } from '@angular/core';
import { CarService } from './services/car.service';
import { Car } from './models/car';
import { NgForm } from '@angular/forms';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
@fexx
fexx / car.services.ts
Created Oct 19, 2019
Métodos http Consumindo API REST com HttpClient no Angular 8)
View car.services.ts
this.httpClient.get<Car[]>(this.url)
this.httpClient.post<Car>(this.url, JSON.stringify(car), this.httpOptions)
this.httpClient.put<Car>(this.url + '/' + car.id, JSON.stringify(car), this.httpOptions)
this.httpClient.delete<Car>(this.url + '/' + car.id, this.httpOptions)
@fexx
fexx / car.service.ts
Last active Jul 31, 2020
Arquivo car.service.ts (Consumindo API REST com HttpClient no Angular 8)
View car.service.ts
import { Injectable } from '@angular/core';
import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
import { Observable, throwError } from 'rxjs';
import { retry, catchError } from 'rxjs/operators';
import { Car } from '../models/car';
@Injectable({
providedIn: 'root'
})
export class CarService {
@fexx
fexx / car.ts
Last active Oct 21, 2019
car.ts (Consumindo API REST com HttpClient no Angular 8)
View car.ts
export interface Car {
id: number;
model: string;
color: string;
price: number;
}
You can’t perform that action at this time.