Coldfusion create new structure — March 20, 2018

Coldfusion create new structure

if using cfscript

coInfo=StructNew();"Adobe Systems Incorporated";
    coInfo["name"]="Adobe Systems Incorporated";
    coInfo={name="Adobe Systems Incorporated"};

if using simple coldfusion tags

cfset myStruct = {}
cfset"Adobe Systems Incorporated"

Find more help here

Ubuntu apache get list of Virtual hosts — March 12, 2018
Ajax request returns 400 bad request — February 13, 2018
LINUX use grep to find content in any file — February 3, 2018
PHP FPM INFO — February 2, 2018
Ubuntu IPTABLE useful commands —

Ubuntu IPTABLE useful commands

List all rules
sudo iptables -L --line-numbers

Above command will list all rules with (num) in first column for each rule.

Now we can delete them by num
sudo iptables -D INPUT (num)

Super awesome example is here.

To block an IP 
sudo iptables -A INPUT -s -j DROP is any IP address
mysqldump exclude some tables — January 27, 2018

mysqldump exclude some tables

if you want to exclude multiple table here is the simple command to do it

mysqldump -h yourHost -u dbUser -p dbName --ignore-table={dbName.table1,dbName.table2,dbName.table3,dbName.table4} > exportFile.sql

When I tried below command I was getting this error “Illegal use of option –ignore-table=.” . But the above command save my life.

mysqldump -h yourHost -u dbUser -p dbName \
 --ignore-table=dbName.table1 \
 --ignore-table=dbName.table2 \
 --ignore-table= dbName.table3 \
 > dbName.sql