simple mercadopago error handling in pt_BR
- php usage getMpErrorCode('209');
- js usage getMpErrorCode(209);
<?php | |
/** | |
* Create a web friendly URL slug from a string. | |
* | |
* Although supported, transliteration is discouraged because | |
* 1) most web browsers support UTF-8 characters in URLs | |
* 2) transliteration causes a loss of information | |
* | |
* @author Sean Murphy <[email protected]> | |
* @copyright Copyright 2012 Sean Murphy. All rights reserved. |
usernames=('usr1' 'usr2') | |
for i in ${usernames[*]}; do /scripts/pkgacct $i; done; |
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.
Create GitHub repository in github and save the SSH repository url
Init git on server in code directory
git init
ssh-keygen -t rsa -b 4096 -C [email protected]
.pub
to repo-name.deploy.pem
apt-get update
apt-get install python-minimal
python --version
apt-get install git-core
git --version
# 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; |
public class ATM | |
{ | |
private boolean userAuthenticated; | |
private int currentAccountNumber; | |
private Screen screen; | |
private Keypad keypad; | |
private CashDispenser cashDispenser; | |
private DepositSlot depositSlot; | |
private BankDatabase bankDatabase; | |
#!/bin/bash | |
# Remote DB credentials | |
LOCAL_USER=###### | |
LOCAL_PASS=###### | |
LOCAL_HOST=#### | |
LOCAL_DB=#### | |
LOCAL_PORT=### |