Skip to content

Instantly share code, notes, and snippets.

View otaciobarbosa's full-sized avatar
🍀
It's Ok To Be Different ✨

Otácio Barbosa otaciobarbosa

🍀
It's Ok To Be Different ✨
View GitHub Profile
@otaciobarbosa
otaciobarbosa / Guia de estudo JavaScript em 2023
Created February 18, 2023 00:54
Diego Fernandes, CTO da Rocketseat
# Gerenciador de Pacotes
npm : https://www.npmjs.com/
pnpm : https://github.com/pnpm/pnpm
# React
TypeScript: https://www.typescriptlang.org/
Tailwindcss: https://tailwindcss.com/
Stitches: https://stitches.dev/
Vanilla-extract: https://vanilla-extract.style/
CVA: https://www.npmjs.com/package/cva
@otaciobarbosa
otaciobarbosa / promocaoComponent.js
Created November 4, 2022 13:44
promocaoComponent
import React, { useState, useEffect } from "react";
import api from "../services/api";
import MUIDataTable from "mui-datatables";
import { createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles';
import CircularProgress from '@mui/material/CircularProgress';
import load from "../../src/assets/img/load.gif";
const fetch = require('node-fetch');
export default function Promocao() {
const [loading, setLoading] = useState("");
import pandas as pd
import requests
import mysql.connector
conn = mysql.connector.connect(
host="localhost",
user="root",
password="",
database="cotacoes"
)
2 cd /var/www/html/intra/sistemas/banco-imagens/uploads
3 ls
4 cd folhetos/
5 chmod 777 -R .
6 ls
7 rm -f 281
8 rm 281
9 rm 281
10 rm -r 281
11 ls
@otaciobarbosa
otaciobarbosa / error
Created November 11, 2021 12:02
Erro na exportação de xml
Traceback (most recent call last):
File "Desktop\getXML\getXML.py", line 37, in <module>
xml.writelines(x['xml_env'])
KeyError: 'xml_env'
@otaciobarbosa
otaciobarbosa / formatar_cnpj_cpf.md
Created August 19, 2020 06:02 — forked from davidalves1/formatar_cnpj_cpf.md
Função para formatar CNPJ e CPF, disponível em PHP e JS

PHP

function formatCnpjCpf($value)
{
  $cnpj_cpf = preg_replace("/\D/", '', $value);
  
  if (strlen($cnpj_cpf) === 11) {
    return preg_replace("/(\d{3})(\d{3})(\d{3})(\d{2})/", "\$1.\$2.\$3-\$4", $cnpj_cpf);
  } 
  

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@otaciobarbosa
otaciobarbosa / login.html
Created May 9, 2019 18:04
Trabalhando com ion-select - [ Ionic - Cross-Platform Mobile App Development ]
<ion-header>
<ion-navbar>
<ion-title>
<p class="title">
Bem Vindo !
</p>
</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding class="content">
@otaciobarbosa
otaciobarbosa / index.html
Created April 16, 2019 21:15
Jogo Roleta - Bom dia e Cia
<div class="skills-wheel">
<ul class="wheel">
<li>
<a href="#commercial-awareness" class="fancybox">1. Promo</a>
</li>
<li>
<a href="#communication" class="fancybox">2. Promo</a>
</li>
import { Component } from "@angular/core";
import { NavController, NavParams, Platform } from "ionic-angular";
import { HomePage } from "../home/home";
import { SQLite, SQLiteObject } from '@ionic-native/sqlite/ngx';
import { Http } from "@angular/http";
import "rxjs/add/operator/map";
export class User {
password: string;
}