Skip to content

Instantly share code, notes, and snippets.

View felipe2g's full-sized avatar
🔥
Coding!

Felipe Guimarães felipe2g

🔥
Coding!
  • Uberlândia, Minas Gerais
View GitHub Profile
@alexbruno
alexbruno / valid.cnpj.ts
Last active June 25, 2024 15:16
Validação de CNPJ
// Regex para validação de string no formato CNPJ
export const regexCNPJ = /^\d{2}.\d{3}.\d{3}\/\d{4}-\d{2}$/
// Método de validação
// Referência: https://pt.wikipedia.org/wiki/Cadastro_Nacional_da_Pessoa_Jur%C3%ADdica
export function validCNPJ(value: string | number | number[] = '') {
if (!value) return false
// Aceita receber o valor como string, número ou array com todos os dígitos
const isString = typeof value === 'string'

Building pgModeler in MacOS with Homebrew

The official installation instructions for pgModeler recommends installing Xcode and the Enterprise DB distribution of Postgres to fulfill its build requirements. Luckily, Homebrew's got us covered!

  1. Checkout the source

    git clone https://github.com/pgmodeler/pgmodeler.git
    
@codesorter2015
codesorter2015 / reverse_proxy_setup.txt
Last active June 6, 2024 00:15
Reverse Proxy Setup with XAMPP/WAMP
Open apache httpd.conf file
Enable the following Modules by removing the # at the front of the line.
- LoadModule rewrite_module modules/mod_rewrite.so
- LoadModule proxy_module modules/mod_proxy.so
- LoadModule proxy_http_module modules/mod_proxy_http.so
- LoadModule proxy_connect_module modules/mod_proxy_connect.so
Open apache httpd-vhosts.conf
<VirtualHost *:80>
ProxyRequests On