Skip to content

Instantly share code, notes, and snippets.

View pedropuppim's full-sized avatar
🎯
Focusing

Pedro Puppim pedropuppim

🎯
Focusing
View GitHub Profile
@pedropuppim
pedropuppim / scrap.php
Last active March 27, 2024 13:58
Cidades aderentes a NFSE nacional
<?php
$url = 'https://www.gov.br/nfse/pt-br/municipios/municipios-aderentes/municipios-aderentes';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
@pedropuppim
pedropuppim / smarapd_203.php
Created February 17, 2024 21:34 — forked from luizvaz/smarapd_203.php
Assinatura e Envio de XML SMARAPD padrão ABRASF 2.03 (Vila Velha)
<?php
/**
* User: LuizVAz
* Date: 28/02/2021
* Time: 19:46
*/
namespace Provedores\webService;
use DOMDocument;
@pedropuppim
pedropuppim / speedtest.py
Created September 14, 2023 14:03
speedtest.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2012 Matt Martz
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@pedropuppim
pedropuppim / script_loop.bash
Created January 28, 2023 02:08
script_loop.bash
#!/bin/bash
for i in {1..5}
do
URL="https://dummyjson.com/products/$i"
response=$(curl -s $URL)
echo $response
printf "\n"
@pedropuppim
pedropuppim / teste_athenas_front.md
Last active January 10, 2023 20:29
teste_athenas_front_jr


TESTE

  • Criar CRUD (listar, adicionar, editar, remover) de dados fictícios.

EXEMPLO DE CRUD

TECNOLOGIA

@pedropuppim
pedropuppim / teste_athenas_scraper.md
Last active October 18, 2023 14:32
Teste Athenas scraper
@pedropuppim
pedropuppim / settings.json
Created November 3, 2022 12:16 — forked from diego3g/settings.json
VSCode Settings (Updated)
{
"emmet.syntaxProfiles" : {
"javascript" : "jsx"
},
"workbench.startupEditor" : "newUntitledFile",
"editor.fontSize" : 16,
"javascript.suggest.autoImports" : true,
"javascript.updateImportsOnFileMove.enabled" : "always",
"editor.rulers" : [
80,
@pedropuppim
pedropuppim / encryption.js
Created August 18, 2022 20:36 — forked from vlucas/encryption.js
Stronger Encryption and Decryption in Node.js
'use strict';
const crypto = require('crypto');
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters)
const IV_LENGTH = 16; // For AES, this is always 16
function encrypt(text) {
let iv = crypto.randomBytes(IV_LENGTH);
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv);
@pedropuppim
pedropuppim / converte_email_array.php
Created June 3, 2022 12:55
Converte em array linha de e-mails com 2 tipos de separadores , e ;
<?php
//Converte em array linha de e-mails com 2 tipos de separadores , e ;
$email="fernanda@ajudes.org.br;josi@ajudes.org.br;";
$emails = preg_split('/[\s,; ]+/', $email, -1, PREG_SPLIT_NO_EMPTY);
print_r($emails);

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by