This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration file for runtime kernel parameters. | |
# See sysctl.conf(5) for more information. | |
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for | |
# references: | |
# | |
# https://config.securix.org/config/securix-conf/etc/sysctl.conf | |
# https://github.com/minhdanh/Linux-Kernel-Tuning-and-Hardening/blob/master/kernel_hardening_tuning.sh | |
# https://gist.github.com/sokratisg/98d03e20fca76d4b699f | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo vi /etc/security/limits.conf | |
Add: | |
* soft nofile 65535 | |
* hard nofile 65535 | |
* soft nproc 32768 | |
* hard nproc 32768 | |
# Note - instead of *, you can add any user! * means - setting applies to all the users. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#service ntp stop | |
#ntpdate ntp.ubuntu.com | |
#service ntp start | |
# forced NTP synchronization | |
sudo service ntp stop | |
sudo ntpd -gq | |
#sudo ntpdate -sb time.nist.gov | |
sudo service ntp start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@mgr ELK]# curator --version | |
curator, version 3.0.0 | |
[root@mgr ELK]$ which curator | |
/usr/bin/curator | |
[root@mgr ELK]# curator --host 10.4.0.45 bloom indices --time-unit days --timestring "%Y-%m-%d" --older-than 2 | |
2015-03-16 15:21:03,404 INFO Job starting... | |
2015-03-16 15:21:03,556 WARNING Bloom filters no longer exist for search in Elasticsearch since v1.4.0 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vi /etc/elasticsearch/elasticsearch.yml | |
#Add the following line somewhere in the file, to disable dynamic scripts: | |
script.disable_dynamic: true | |
bootstrap.mlockall: true | |
http.cors.allow-origin: "/.*/" | |
http.cors.enabled: true | |
#Add to /etc/sysctl.conf | |
fs.file-max = 65536 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
from jinja2 import Environment, FileSystemLoader | |
dir_path = os.path.dirname(os.path.abspath(__file__)) | |
t_environment = Environment( | |
autoescape=False, | |
#loader=FileSystemLoader(os.path.join(dir_path, 'templates')), | |
loader=FileSystemLoader(os.path.dirname(os.path.abspath(__file__))), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##compare rpm versions and lot of utilities related to rpm | |
# yum install rpmdevtools | |
## Information about repository - | |
# yum install yum-utils | |
You can also do: | |
# yum info openssl | |
# yumdb info 'python*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Right-click the extension download link (in Mozilla Add-ons, where it says "Download Now"), select "Save Link As..." and download/SAVE .xpi file to your computer in a location where you can find it later. | |
2) Manually install it by dragging the file onto an open Firefox window. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apache web server | |
================= | |
Feb 18 13:42:48 www http_access: 120.61.15.50 - - [18/Feb/2015:13:42:48 +0530] "GET / HTTP/1.1" 200 31413 | |
Feb 18 13:42:48 www http_access: 49.248.46.26 - - [18/Feb/2015:13:42:48 +0530] "GET /SpryAssets/SpryMenuBarDownHover.gif HTTP/1.1" 200 55 | |
#%{MONTH}\ %{MONTHDAY}\ %{TIME}\ %{WORD:user}\ %{WORD:access}\: %{IP:ip} \- \- \[%{MONTHDAY}/%{MONTH}/%{YEAR}:%{TIME} %{NUMBER}\] "%{WORD:http_method} / %{WORD:http}/%{NUMBER:http_ver}" %{NUMBER:response_code} %{NUMBER:bytes} | |
%{MONTH}\ %{MONTHDAY}\ %{TIME}\ %{WORD:user}\ %{WORD:access}\: %{IP:ip} \- \- \[%{MONTHDAY}/%{MONTH}/%{YEAR}:%{TIME} %{NUMBER}\] "%{WORD:http_method} %{URIPATH} %{WORD:http}/%{NUMBER:http_ver}" %{NUMBER:response_code} %{NUMBER:bytes} | |
Squid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################# | |
# Full Imports | |
import sys | |
import math | |
import random | |
import subprocess | |
""" | |
This is a pure Python implementation of the K-Means Clustering algorithmn. The |