For AWS CLI credentials , there are different ways that aws cli will find for credentials. Based on this link, There are 6 ways in total for now, who knows future there will be more secured way to using CLI. For this example , i will talk about how to import keys but using the […]
AWS SDK (PHP)
Hi, Today i am gonna talk about how to use SDK provided by aws (PHP). For aws SDK, they support few kind of languages such as Php, Android, IOS , Java, Python. For all the available language for sdk , Click Here You will have to import aws sdk files there are three kind of […]
Server & Sql Monitoring (PMM-Server)
Hi, i’ve recently created a pmm-server ( monitoring system for server & mysql ). A pmm-server act as a server and client can connect to pmm-server to look on their information by using the command pmm-admin. For more info Click in this link https://www.percona.com/doc/percona-monitoring-and-management/deploy/server/index.html Setup SMTP server For this example you can refer to […]
LazyLoad (Nice & Convinient Plugin for delay Image Load ) (Save bandwidth)
https://appelsiini.net/projects/lazyload/
DataTables (Nice & Convinient Plugin for Pagination & Search engine)
Youtube Ref : https://www.youtube.com/watch?v=2RGlzZyS1_0 Datatable Ref : https://datatables.net/
How to prevent multiple ajax calling
1.Call a first function before calling second function(ajax) 2.In first function , check for a div with specific id’s length 3.In second function(ajax) most top append the div with specific id. Example: Event Scroll to Bottom -> Call ajax: $(window).on(“scroll”, function() { if($(window).scrollTop() == $(document).height() – $(window).height()){ beforeajaxcalling(); } }); Function to be called before […]
Datepicker js (Nice & Convinient Plugin for date picker)
Datepicker
Create daterange using function
function createDateRangeArray($strDateFrom,$strDateTo) { // takes two dates formatted as YYYY-MM-DD and creates an // inclusive array of the dates between the from and to dates. // could test validity of dates here but I’m already doing // that in the main script $aryRange=array(); $iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4)); $iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4)); if ($iDateTo>=$iDateFrom) { array_push($aryRange,date(‘Y-m-d’,$iDateFrom)); // first entry while […]
How to add user in Linux
1.useradd {NAME} 2.passwd {NAME} 3.chage -d 0 {NAME} : To force user to change password when first login 4.create user home directory and chown to the user permission. EX: mkdir /home/{NAME} chown {NAME}.{NAME} /home/{NAME} How to List & Add user from a particular group in linux List $ grep ^{GROUPNAME} /etc/group Add User into Group […]
How to dump and import sql into mysql (Command Line)
#EXPORT mysqldump -u {USER} -h {IP} -p {DB_NAME} {DB_TABLE (OPTIONAL)} | gzip > dump.sql.gz #IMPORT CREATE DATABASE {DB_NAME} mysql -u {USER} -h {IP} -p {DB_NAME} < dump.sql option:- -d : to dump only table structure out only