Skip to content

Instantly share code, notes, and snippets.

View gubleo's full-sized avatar
🚫
não leia minha bio!

Gustavo Borges gubleo

🚫
não leia minha bio!
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Recorte de Imagens</title>
<!-- Link para o arquivo CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/cropperjs@1.5.12/dist/cropper.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body> <div class="container mt-5">
@gubleo
gubleo / criarPDF.js
Created May 15, 2023 19:42
Unifica imagens
const fs = require('fs');
const { PDFDocument, rgb } = require('pdf-lib');
async function criarPDFComImagens(imagens, nomeArquivo) {
const pdfDoc = await PDFDocument.create();
for (const imagem of imagens) {
const imagemBytes = fs.readFileSync(imagem);
const imagemObj = await pdfDoc.embedPng(imagemBytes);
const pagina = pdfDoc.addPage();
select id, count(*)
from carga.preferencias
group by id
select moradores.nome, unidades.unidade, unidades.bloco, reserva_academia.*
from acesso.reserva_academia
join condominio.moradores on reserva_academia.autenticacao = moradores.autenticacao
join condominio.unidades on moradores.condominio = unidades.condominio and moradores.bloco = unidades.bloco and moradores.andar = unidades.andar and moradores.unidade = unidades.num
where data::date = current_date and reserva_academia.situacao = 'reservado'
Registro.responsavel_estoque = this._listausuarios.find(x => x.id === Registro.responsavel_estoque).nome
@gubleo
gubleo / bottomnav.html
Created July 8, 2021 17:42
Barra de navegação no menu inferior
<style>
body {
margin: 0 0 55px 0;
}
.nav {
position: fixed;
bottom: 0;
width: 100%;
@gubleo
gubleo / rolagem.css
Created July 7, 2021 18:59
Exibe barra de rolagem. Sem muito esforço, bobinhos!
<style>
html { overflow-y: scroll }
</style>
@gubleo
gubleo / .htaccess
Created February 11, 2020 13:20
esconder extensoes de arquivos html e outros
<IfModule mod_rewrite.c>
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.html [NC]
RewriteRule ^ %1 [R,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*?)/?$ $1.html [L]
</IfModule>
@gubleo
gubleo / git.md
Created February 4, 2020 13:42
Comandos úteis GITHUB

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda

@gubleo
gubleo / only-screen.ts
Created January 14, 2020 19:22
Aplicando propriedades para diferentes resoluções
/* (320x480) iPhone (Original, 3G, 3GS) */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
/* insira suas propriedades aqui */
}
/* (320x480) Celulares, Portrait */
@media only screen and (device-width: 320px) and (orientation: portrait) {
/* insira suas propriedades aqui */
}