Year: 2016

ptitle-particle1

Linux – if anyone logs in notify SSH

Put the following in /etc/profile: The script /etc/profile is executed at every login (for bash shell users).   if [ -n "$SSH_CLIENT" ]; then TEXT="$(date): ssh login to ${USER}@$(hostname -f)" TEXT="$TEXT from $(echo $SSH_CLIENT|awk '{print $1}')" echo $TEXT|mail -s "ssh login" you@your.domain aFrom:youradd@email.com fi   If you have issues delivering mail to a GMAIL inbox, […]
Read more

Add Parameter to URL – JQUERY

Add Parameter to URL – JQUERY function addOrUpdateUrlParam(name, value) { var href = window.location.href; var regex = new RegExp("[&\\?]" + name + "="); if(regex.test(href)) { regex = new RegExp("([&\\?])" + name + "=\\d+"); window.location.href = href.replace(regex, "$1" + name + "=" + value); } else { if(href.indexOf("?") > -1) window.location.href = href + "&" + […]
Read more

MYSQL Dump Single Table

Dumping Single MYSQL Table mysqldump db_name table_name > table_name.sql mysqldump -u -h -p db_name table_name > table_name.sql mysqldump -u -h -p db_name table_name --events --triggers --routines > table_name.sql    
Read more
Cart

No products in the basket.