Skip to content

Instantly share code, notes, and snippets.

View brutalzinn's full-sized avatar

Roberto Paes brutalzinn

View GitHub Profile
const { interfaces } = require("mocha")
//definindo entidade aviao e seus comportamentos
class Veiculo {
veiculosQueVoam = ["aviao", "asadelta","helicoptero"]
constructor(tipo, combustivel){
this.tipo = tipo
this.combustivel = combustivel
this.cor = "sem cor"
const path = require('path');
const root_dir = path.join(path.dirname(require.main.filename),'arquivos')
const fs = require('fs');
const uuid = require('uuid').v4;
const criaEndereco = (destino, arquivoNome) => {
return path.join(root_dir, destino, arquivoNome);
}
@brutalzinn
brutalzinn / titlepagecorrection.js
Created April 26, 2021 13:49
bootcamp title correction
const history = useHistory();
useEffect(() => {
return history.listen((location) => {
let nomeDaPagina="Nome do projeto"
let _title = location.pathname.replace('/', '')
_title = _title.indexOf('/') > 0 ? _title.substring(0, _title.indexOf('/')) : _title
switch(_title.toUpperCase()){
case '':
_title = `${nomeDaPagina}-Início`
break;
@brutalzinn
brutalzinn / TestTwo.razor
Created January 15, 2021 22:44
A error with my event..
@using Sharpy
@using BackendAPI.Objects
@using BackendProxy
@using BackendAPI
@using BackendAPI.Events
@using BackendAPI.Pages.Shared
@using System.Diagnostics
@using Microsoft.JSInterop
@inject IJSRuntime JSRuntime
@brutalzinn
brutalzinn / Test.razor
Created January 15, 2021 22:32
A error with my events calling javascript
@using Sharpy
@using BackendAPI.Objects
@using BackendProxy
@using BackendAPI
@using BackendAPI.Events
@using BackendAPI.Pages.Shared
@using System.Diagnostics
@using Microsoft.JSInterop
@inject IJSRuntime JSRuntime