ssh-keygen -f ~/.ssh/id_rsa -q -P ""
cat ~/.ssh/id_rsa.pub
Copy and put that ssh key on destination server in (if don't exists, create it):
~/.ssh/authorized_keys
a |
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm | |
yum remove php-common # Need to remove this, otherwise it conflicts | |
yum install php56w | |
yum install php56w-mysql | |
yum install php56w-common | |
yum install php56w-pdo | |
yum install php56w-opcache | |
php --version | |
sudo ssh-keygen -t rsa -b 4096 -C eishii1 |
source: http://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/ | |
`openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key]` | |
What this command does is extract the private key from the .pfx file. Once entered you need to type in the importpassword of the .pfx file. This is the password that you used to protect your keypair when you created your .pfx file. If you cannot remember it anymore you can just throw your .pfx file away, cause you won’t be able to import it again, anywhere!. Once you entered the import password OpenSSL requests you to type in another password, twice!. This new password will protect your .key file. | |
Now let’s extract the certificate: | |
`openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt]` |
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
$ iptables -I INPUT -p tcp --dport 80 -m state --state NEW -m recent --set | |
$ iptables -I INPUT -p tcp --dport 80 -m state --state NEW -m recent --update --seconds 30 --hitcount 10 -j DROP | |
#Source: http://codingfreak.blogspot.ca/2010/01/iptables-rate-limit-incoming.html |
[ -f /etc/hosts ] && echo "Found" || echo "Not found" |
#alternative to .gitignore | |
git update-index --assume-unchanged path/to/file |
<?php | |
backup_tables('localhost', 'DB_USER', 'DB_PASS', 'DB_DATABASE'); | |
/* backup the db OR just a table */ | |
function backup_tables($host,$user,$pass,$name,$tables = '*') | |
{ | |
$link = mysql_connect($host,$user,$pass); |
#modal {
display: block;
position: fixed;
top: 50%;
left: 50%;
box-sizing: border-box;
transform: translate(-50%, -50%);
}