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 / 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 / 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);

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
@pedropuppim
pedropuppim / puppeteer-ubuntu-1804.md
Last active December 2, 2021 14:00 — forked from winuxue/puppeteer-ubuntu-1804.md
Solution for common dependences issues using puppeteer in ubuntu 18.04 (Bionic)

puppeteer dependeces in ubuntu 18.04 (Bionic)

error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

sudo apt-get install libnss3

error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory

sudo apt-get install libxss1
@pedropuppim
pedropuppim / selenium-php-webdriver-cheatsheet.md
Created July 31, 2017 02:53 — forked from aczietlow/selenium-php-webdriver-cheatsheet.md
Cheat sheet for using php webdriver (facebook/webdriver).

Webdriver PHP API workthough

  • Open a browser

    # start an instance of firefox with selenium-webdriver
    
    $browser_type = 'firefox'
    $host = 'http://localhost:4444/wd/hub'
    

$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);

@pedropuppim
pedropuppim / bin-cc.md
Last active November 28, 2019 18:36 — forked from erikhenrique/bin-cc.md

Validação para cartão de crédito.

Bin e padrões para validação de cartão de crédito.

Bandeira Começa com Máximo de número Máximo de número cvc
Visa 4 13,16 3
Mastercard 5 16 3