I hereby claim:
- I am OmarTrigui on github.
- I am cipheredbytes (https://keybase.io/cipheredbytes) on keybase.
- I have a public key whose fingerprint is 47A4 6711 5F27 1E20 0659 85F2 2EC1 3F4A 2C01 0303
To claim this, I am signing this object:
var aop = function(schema) { | |
schema.aop = []; | |
var executePre = function(functions, index, context, next) { | |
if (functions.length == index) { | |
next(); | |
} else { | |
functions[index](context, function() { | |
executePre(functions, index + 1, context, next); |
I hereby claim:
To claim this, I am signing this object:
#!/bin/sh -e | |
if [ $# != 3 ] | |
then | |
echo "usage: $0 <src-port> <dest-host> <dest-port>" | |
exit 0 | |
fi | |
TMP=`mktemp -d` | |
BACK=$TMP/pipe.back |
upstream sample { | |
server 127.0.0.1:8080 fail_timeout=0; | |
} | |
server { | |
listen 80; | |
server_name my-domain.com; | |
location / { | |
return 301 https://$host$request_uri; |
sudo yum install -y cloud-utils-growpart | |
# You can use lsblk command to check the total available space of you disk. | |
# growpart is used to to expand a partition to the whole disk (expand sda1 to sda) | |
# xfs_growfs is used to resize and apply the changes | |
# df -h | |
# For more informations : https://blog.myduniahosting.com/how-to-resize-your-root-diskpartition-online-for-linux/ | |
part=`df --output=source / |grep "/dev/"` | |
if [ ! -z "$part" ] ; then | |
len=${#part} |
# Let's encrypt must be installed and port 443 must not be used for a short period | |
certbot auth --text --agree-tos --standalone --email [email protected] -d domain.com -d mail.domain.com | |
cat /etc/letsencrypt/live/domain.com/privkey.pem > /etc/postfix/postfix_default.pem | |
cat /etc/letsencrypt/live/domain.com/fullchain.pem >> /etc/postfix/postfix_default.pem | |
/usr/local/psa/admin/sbin/mailmng --restart-service | |
# For the other Let's encrypt alternatives : https://wpguru.co.uk/2014/12/plesk-mail-ssl/ |
var nodemailer = require('nodemailer'); | |
var smtpConfig = { | |
host: 'domain.com', | |
port: 587, | |
auth: { | |
user: '[email protected]', | |
pass: 'password' | |
} | |
}; |
var page = require('webpage').create(); | |
var cookie = { | |
// your cookie here | |
}; | |
page.paperSize = { | |
format: 'A4', | |
footer: { | |
height: "2cm", |
#!/bin/bash | |
dd if=/dev/zero of=/swapfile bs=1024 count=$((1024 * 1024 * 4)) | |
chown root:root /swapfile | |
chmod 0600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
echo "/swapfile none swap sw 0 0" >> /etc/fstab |
#!/bin/bash | |
mount -t ext4 /dev/sdaX /mnt/ | |
mount -t proc none /mnt/proc | |
mount -o bind /dev /mnt/dev | |
mount -o bind /sys/ /mnt/sys | |
chroot /mnt/ /bin/bash | |
echo 'nameserver 8.8.4.4' | sudo tee -a /etc/resolv.conf |