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
<?php | |
// This Script is writted according to my test environment | |
// Before testing script you must need to create database | |
// and some sample data into Database | |
// Follow below steps before running this PHP Script | |
// --> CREATE DATABASE mem_test; | |
// --> USE mem_test; | |
// --> GRANT ALL ON mem_test.* TO test@localhost IDENTIFIED BY 'testing123'; | |
// --> CREATE TABLE sample_data (id int, name varchar(30)); | |
// --> INSERT INTO sample_data VALUES (1, "some_data"); |
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
#!/bin/bash | |
# This script is used to disable OOM Killer for Ruby | |
# Process script will find the ruby process pid and change | |
# the OOM value to avoid being killed by kernel | |
# Author : Mansur Ul Hasan | |
# Email : [email protected] | |
# Function to find the PID | |
ProcessName='ruby' # Process Name | |
AppDir='/usr/local/script/oomadjust' # Application path |
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
#!/bin/bash | |
# This script is written to setup mongo replicasets | |
# There are three replicas for Mongo replication | |
# Author : Mansur Ul Hasan | |
# Email : [email protected] | |
mkdir /var/lib/mongod{1..3} | |
mongod --replSet burraq --logpath "/var/log/mongodb/mongod1.log" --dbpath /var/lib/mongod1 --port 27017 & | |
mongod --replSet burraq --logpath "/var/log/mongodb/mongod2.log" --dbpath /var/lib/mongod2 --port 28017 & |
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
#!/bin/bash | |
# This script is written to make your Linux machine Router | |
# With this you can setup your linux machine as gateway. | |
# Author @ Mansur Ul Hasan | |
# Email @ [email protected] | |
# Defining interfaces for gateway. | |
INTERNET=eth1 | |
LOCAL=eth0 |
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
#!/bin/bash | |
# Author Mansur Ul Hasan | |
# EMail : [email protected] | |
# Script is setup to git client 2.5 | |
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel | |
yum install gcc perl-ExtUtils-MakeMaker | |
cd /usr/src | |
wget https://www.kernel.org/pub/software/scm/git/git-2.5.3.tar.gz | |
tar xzf git-2.5.3.tar.gz |
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
--- | |
- hosts: vms | |
tasks: | |
- name: Add Nginx Repository PPA | |
apt_repository: repo='ppa:nginx/stable' state=present | |
register: ppastable | |
- name: Install Nginx | |
apt: pkg=nginx state=present update_cache=true | |
when: ppastable|success |
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
系统数据: | |
user() 当前用户 | |
database() 当前数据库 | |
version() SQL版本号,最后为系统版本(nt-windows) | |
@@datadir 数据库路径 | |
连接型: | |
concat() concat(username,0x3a, password)) | |
group_concat() select group_concat(DISTINCT file_priv, user) from mysql.user; //多个用户情况下, 查看load_file()权限 | |
concat_ws() 与上类似 | |
编码: |
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
#!/bin/bash | |
# This script is designed to install | |
# the SSH terminal logging | |
# currently this script is only work on | |
# CentOS & Ubuntu | |
# Author : Mansur Ul Hasan | |
# EMail : [email protected] | |
# Skype : genious840 | |
# Facebook : https://www.facebook.com/itmarkaz | |
# YouTube : https://www.youtube.com/user/mansur7820 |
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
#!/bin/bash | |
# This script is designed to installation apache | |
# from source code with all options using apr & | |
# apr-utils and library for portability | |
# Author : Mansur Ul Hasan | |
# EMail : [email protected] | |
# Skype : genious840 | |
# Facebook : https://www.facebook.com/itmarkaz | |
# YouTube : https://www.youtube.com/user/mansur7820 |
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
#This COnfiguraion is written by Mansur ul Hasan | |
# The MySQL Server 5.7 configuration file. | |
# | |
# One can use all long options that the program supports. | |
# Run program with --help to get a list of available options and with | |
# --print-defaults to see which it would actually understand and use. | |
# | |
# For explanations see | |
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html |