postconf -d | grep some_value
Monthly Archives: February 2014
curl and POST, GET, PUT, DELETE
Make requests with data:
Since we learn how to make POST, GET, PUT, DELETE requests, we can now make same requests with data. In order to send data with those requests, we should use –data parameter. Here are some examples:
::::/bin/bash
# send login data with POST request
curl –request POST ‘http://www.linuxhow.tk/login/’ \
–data ‘username=myusername&password=mypassword’
# send search data to with get request
curl –request GET ‘http://www.linuxhow.tk/results?search_query=my_keyword’
# send PUT request with data
curl –request PUT ‘http://www.linuxhow.tk/rest-api/user/12345/’\
–data ’[email protected]’
# same thing but this one get data from a file named data.txt
curl –request PUT ‘http://www.linuxhow.tk/user/12345/’\
–data @data.txt
postfix to accept mail from external connections
vi /etc/postfix/main.cf
inet_interfaces = all
eSignature from Barracuda
If you want try e-signature from Barracuda you can get it there:
https://signnow.com/l/business/esignature_roi
postfix enable port 587
vi /etc/postfix/master.cf
Uncomment:
submission inet n – n – – smtpd
/etc/init.d/postfix restart
block ICMP incoming requests
iptables -I INPUT -j DROP -p icmp –icmp-type echo-reques
bash read value
read -p “Username: ” USR
read -p “Password: ” PASS
wget –user-agent=Mozilla/5.0 –save-cookies cookies.log –post-data “user=$USR&pass=$PASS” –no-check-certificate https://www.linux4you.tk/login
Fedora with Fedy
Fedy, formerly known as Fedora utils, is an open source collection of useful utilities such as mp3 support, Adobe Flash, Oracle Java and much more that Fedora doesn’t ship by default. Fedy lets you to install all the utilities with just a single click and you can customize/tweak your Fedora Linux as per your liking. Not only utilities, we can easily add repositories, so don’t bother about downloading and adding .repo files manually.
wget http://satya164.github.io/fedy/fedy-installer
chmod +x fedy-installer
sudo ./fedy-installer
linux – compare 2 folder size
diff <(du -sh dir1) <(du -sh dir2)
fix UTF-8 files with BOM
If you want just to show BOM files, use this one:
grep -rl $’\xEF\xBB\xBF’ .
to remove BOM:
find . -type f -exec sed ‘1s/^\xEF\xBB\xBF//’ -i.bak {} \; -exec rm {}.bak \;
or
find -type f -print0 | xargs -0 grep -l `printf ‘^\xef\xbb\xbf’` | sed ‘s/^/found BOM in: /’