Skip to content

Instantly share code, notes, and snippets.

View WganMe's full-sized avatar

Wael Alnahari WganMe

View GitHub Profile
@WganMe
WganMe / configserver.sh
Created July 28, 2016 03:33
configserver
cd /usr/src
rm -fv csf.tgz
wget https://download.configserver.com/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh
perl /usr/local/csf/bin/csftest.pl
sh /usr/local/csf/bin/remove_apf_bfd.sh
rm -Rfv /usr/src/csf*
cd /usr/src
<!doctype html>
<!-- The Time Machine GitHub pages theme was designed and developed by Jon Rohan, on Feb 7, 2012. -->
<!-- Follow him for fun. http://twitter.com/jonrohan. Tail his code on https://github.com/jonrohan -->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" href="stylesheets/github-dark.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<!doctype html>
<!-- The Time Machine GitHub pages theme was designed and developed by Jon Rohan, on Feb 7, 2012. -->
<!-- Follow him for fun. http://twitter.com/jonrohan. Tail his code on https://github.com/jonrohan -->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="stylesheets/stylesheet.css" media="screen">
<link rel="stylesheet" href="stylesheets/github-dark.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
@WganMe
WganMe / hhvm.service
Created January 2, 2017 16:05
cat /usr/lib/systemd/system/hhvm.service
[Unit]
Description=HipHop Virtual Machine
[Service]
PIDFile=/var/run/hhvm/hhvm.pid
ExecStartPre=/bin/mkdir -p /var/log/hhvm/
ExecStartPre=/bin/chown -R nginx:nginx /var/log/hhvm/
ExecStartPre=/bin/mkdir -p /var/run/hhvm/
ExecStartPre=/bin/chown -R nginx:nginx /var/run/hhvm/
ExecStart=/usr/local/bin/hhvm -m daemon -u nginx -c /etc/hhvm/server.ini -c /etc/hhvm/php.ini -c /etc/hhvm/server.conf
@WganMe
WganMe / Server Ports
Last active January 10, 2017 05:32
Couchbase DB Server Ports
#It is all too common for people to just turn off IPtables instead of actually figuring out what ports to open. I have to admit I have done it myself. Well we need to stop that. IPtables is our friend, really. To that end, here is the body of a script you can use to configure IPtables.
# Couchbase DB Server Ports
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 4369 -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 8091 -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 8092 -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 11209 -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 11210 -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 11211 -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 11214 -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 11215 -j ACCEPT
@WganMe
WganMe / Arabic Word
Last active April 2, 2017 19:38
Arabic Word
عربي, لا, من, هذا, أن, فيه, أنا, على, ما, هل, يا, و, لقد, ذلك, ماذا, أنت, هنا, لم, إلى, نعم, كان, هو, ان, هذه, هناك, عن, فى, كل, فقط, ليس, كنت, الآن, يجب, انا, لك, مع, شيء, لكن, الذي, لنا, حسنا, سوف, كيف, هيا, نحن, إنه, أجل, لماذا, إذا, عندما, انه, لي, كذلك, الى, انت, بعد, هي, أين, أنها, كانت, أي, حتى, إنها, أعرف, تلك, قبل, قد, الأمر, بعض, أوه, مثل, أريد, رجل, أعتقد, لو, ربما, بخير, أيها, يكون, جيدة, عليك, شخص, أنك, إن, التي, به, علي, ولكن, أليس, أحد, الوقت, انها, يمكن, اليوم, تعرف, تريد, صحيح, تكون, أكثر, لست, أستطيع, كما, شئ, منذ, لذا, واحد, جدا, يمكنك, لديك, الرجل, يبدو, كلا, لدي, أوه, تفعل, سيدي, غير, مرة, عليه, اذا, حدث, آخر, شكرا, لدينا, يوجد, أعلم, مكان, الناس, له, سيكون, رائع, مرحبا, آسف, وقت, سيد, اللعنة, بهذا, كم, أفضل, ليست, بها, أنها, معك, الكثير, قلت, بك, الان, الذى, يحدث, يوم, يكن, وأنا, بي, واحدة, بأن, ولا, يمكنني, هم, أخرى, علينا, أبي, تعال, ثم, هكذا, بذلك, المكان, ألا, بالطبع, أنني, معي, شىء, لهذا, إلهي, ها, انك, تستطيع, الحقيقة, العمل, الليلة, العالم, تعلم, بالتأكيد, حقا, الطريق, الأن, أمي,
@WganMe
WganMe / securetmp
Created April 16, 2017 01:05
noexec
# /scripts/securetmp
*** Notice *** No loop module detected
If the loopback block device is built as a module, try running `modprobe loop` as root via ssh and running this script again.
If the loopback block device is built into the kernel itself, you can ignore this message.
Would you like to secure /tmp & /var/tmp at boot time? (y/n) n
securetmp will not be added to system startup at this time.
Would you like to disable securetmp from the system startup? (y/n) y
Would you like to secure /tmp & /var/tmp now? (y/n) n
/tmp & /var/tmp will not be secured at this time.
@WganMe
WganMe / Optimize and repair all tables in all databases
Created April 16, 2017 02:32
Optimize and repair all tables in all databases
mysqlcheck --auto-repair -o --all-databases
@WganMe
WganMe / How to Install OpenVPN Access Server
Created April 26, 2017 22:30
How to Install OpenVPN Access Server
cipher AES-256-CBC
auth SHA256
https://www.upcloud.com/support/openvpn-access-server/
@WganMe
WganMe / curl libcurl libcurl-devel rhel7 rpm
Last active April 28, 2017 16:37
curl libcurl libcurl-devel rhel7 rpm
http://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/
wget http://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/curl-7.54.0-3.0.cf.rhel7.x86_64.rpm
wget http://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/libcurl-7.54.0-3.0.cf.rhel7.x86_64.rpm
wget http://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/libcurl-devel-7.54.0-3.0.cf.rhel7.x86_64.rpm
rpm -Uvh curl-7.54.0-3.0.cf.rhel7.x86_64.rpm libcurl-7.54.0-3.0.cf.rhel7.x86_64.rpm libcurl-devel-7.54.0-3.0.cf.rhel7.x86_64.rpm
rpm -Uvh http://mirror.city-fan.org/ftp/contrib/sysutils/Mirroring/mirror-2.9-13.noarch.rpm