Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Talles Airan tallesairan

🏠
Working from home
View GitHub Profile
@tallesairan
tallesairan / README.md
Created Feb 8, 2021
Tabela de erros MercadoPago em php/javascript
View README.md

Tabela de erros mercadopago em php e javascript

simple mercadopago error handling in pt_BR

  • php usage getMpErrorCode('209');
  • js usage getMpErrorCode(209);
@tallesairan
tallesairan / README.md
Last active Feb 3, 2021
Pixel facebook para domínios confirmados
View README.md

Facebook Pixel Para domínios confirmados

Guia simples para implementação dessa nova estratégia.

Após uma mudança recente o facebook infelizmente só passou a aceitar  eventos de domínios confirmados

Como instalar o código do pixel ?

  • 1 Passo
@tallesairan
tallesairan / cpmove-multiples-users.sh
Created Jan 29, 2021
Create cpmove with array of users
View cpmove-multiples-users.sh
usernames=('usr1' 'usr2')
for i in ${usernames[*]}; do /scripts/pkgacct $i; done;
View Using Github Deploy Key.md

What / Why

Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.

As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.

How to

  1. Generate a ssh key
@tallesairan
tallesairan / deploy-keys.md
Created Nov 30, 2020 — forked from holmberd/deploy-keys.md
Setup GitHub repository SSH deploy keys
View deploy-keys.md

Setup GitHub repository SSH deploy keys

  1. Create GitHub repository in github and save the SSH repository url

  2. Init git on server in code directory

  • git init
  1. Create SSH keys on the server
  • ssh-keygen -t rsa -b 4096 -C your@email.here
  • Rename the key that doesn't end with .pub to repo-name.deploy.pem
@tallesairan
tallesairan / README.md
Last active Oct 28, 2020
Install certbot and generate certificate
View README.md

apt-get update

apt-get install python-minimal

python --version

apt-get install git-core

git --version

View sendy.nginx.conf
# nginx configuration by winginx.com
location / {
if ($script_filename !~ "-d"){
rewrite ^/([a-zA-Z0-9-]+)$ /$1.php break;
}
}
location /l {
rewrite ^/l/([a-zA-Z0-9/]+)$ /l.php?i=$1 break;
View ATM.java
public class ATM
{
private boolean userAuthenticated;
private int currentAccountNumber;
private Screen screen;
private Keypad keypad;
private CashDispenser cashDispenser;
private DepositSlot depositSlot;
private BankDatabase bankDatabase;
@tallesairan
tallesairan / mysqlSync.sh
Created Jun 15, 2020
Mysql sync local to remote server
View mysqlSync.sh
#!/bin/bash
# Remote DB credentials
LOCAL_USER=######
LOCAL_PASS=######
LOCAL_HOST=####
LOCAL_DB=####
LOCAL_PORT=###
@tallesairan
tallesairan / README.md
Last active Oct 27, 2020
XPague Postbacks
View README.md

XPague Postbacks

Documentação atualizada, acesse a nova versão em: XPague Docs

Tipo do postback em objectType

No momento os tipos de postbacks são objectType { 'transaction', 'cart' } sendo cart para recuperação de carrinhos, objeto usado em cart é o mesmo do Customer

Acessando schemas