Skip to content

Instantly share code, notes, and snippets.

View alsyundawy's full-sized avatar
🏠
WFH | Kaum Rebahan Garis Keras Dan Militas

༺ Initial H ༻ alsyundawy

🏠
WFH | Kaum Rebahan Garis Keras Dan Militas
View GitHub Profile
Centminmod - CentOS 7 Quick Commands
Commands for CentOS / centminmod / and other various items
##############################################
## CENTOS 7 COMMANDS
##############################################
Cron: checking log for what is running
# tail -f /var/log/cron
@alsyundawy
alsyundawy / wget
Created August 16, 2018 17:03 — forked from bueckl/wget
Wget examples
#Spider Websites with Wget – 20 Practical Examples
Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute.
1. Download a single file from the Internet
wget http://example.com/file.iso
2. Download a file but save it locally under a different name
wget ‐‐output-document=filename.html example.com
@alsyundawy
alsyundawy / nginx.conf
Created August 31, 2018 04:09 — forked from Stanback/nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@alsyundawy
alsyundawy / main.cf
Created October 19, 2018 03:40 — forked from jult/main.cf
current postfix rbl and some related config
# this is part of my /etc/postfix/main.cf file:
smtp_helo_timeout = 60s
smtp_connect_timeout = 60s
smtp_destination_concurrency_limit = 18
smtp_destination_recipient_limit = 24
smtpd_helo_required = yes
smtpd_recipient_limit = 80
smtpd_recipient_overshoot_limit = 120
local_destination_concurrency_limit = 6
@alsyundawy
alsyundawy / nginx-tuning.md
Created January 25, 2019 04:02 — forked from abdil1234/nginx-tuning.md
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@alsyundawy
alsyundawy / mailserver.md
Created January 30, 2019 12:03
Mailserver on Linux (Postfix and Dovecot)
#!/usr/bin/env bash
set -eufo pipefail
SUDO=""
if [ "$EUID" -ne 0 ]; then
SUDO="sudo"
if ! [ -x "$(command -v $SUDO)" ]; then
echo "Error: Running script as non-root and $SUDO is not installed. Exiting." >&2
exit 1
@alsyundawy
alsyundawy / 01_postfix_installer.md
Created January 30, 2019 12:12 — forked from baronkis/01_postfix_installer.md
Postfix + Dovecot + Postgresql + Postfixadmin + Roundcube + Opendkim

Postfix Installer

Following script may be used for configuring complete and secure email server on fresh install of Ubuntu 18.04 LTS. It will probably work on other distributions using apt-get. After minor changes you'll be able to use it on other Linux distros.

What it does?

02_postfix.sh:

  • Install Postfix and configure it with TLS support.
  • Install Dovecot and configure it's transport on Postfix.
  • Download, extract and correct permissions for Postfixadmin.
  • Download, extract and correct permissions for Roundcube.

Langkah migrasi mail server postfix ke zimbra

Migrasi account

Copy script berikut dan beri nama backup.php. Simpan ke server lama.

#!/usr/bin/php

// Postfixadmin (http://postfixadmin.sourceforge.net/) to Zimbra
@alsyundawy
alsyundawy / clean-up-boot-partition-ubuntu.md
Created March 9, 2019 07:22 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r