MySQL Find And Replace
UPDATE `tbl_name` SET tbl_field = replace(tbl_field, 'FIND', 'REPLACE');
View ArticleCreate A MySQL User
GRANT ALL PRIVILEGES ON `db_name.table_name` (or .*) TO 'username'@'localhost' IDENTIFIED BY 'password';
View ArticleCSS Debug
* { outline:2px dotted red } * * { outline:2px dotted green } * * * { outline:2px dotted orange } * * * * { outline:2px dotted blue } * * * * * { outline:1px solid red } * * * * * * { outline:1px solid...
View ArticleHTML5 Starter Page
<!doctype html> <html lang="en-us"> <head> <meta charset="utf-8"> <title>My Site</title> <!--[if lte IE 8]> <script...
View ArticleShow Each Process Memory Usage
ps axu Show full command in ps display: ps axu --width=500
View ArticleShow Process CPU Usage
Display how much CPU a process is using: ps -eo pcpu,pid -o comm= | sort -k1 -n -r | head -1 For example, show top five CPU using processes: ps -eo pcpu,pid -o comm= | sort -k1 -n -r | head -5 Which...
View ArticleInstall CSF (Firewall) And LFD (Log File Daemon)
cd /usr/src/ wget http://www.configserver.com/free/csf.tgz tar -xzf csf.tgz cd csf sh install.sh
View ArticlePrint Active Connections To Port 80 Per IP Address
netstat -plan | grep :80 | grep -E "(EST|LIST)" | awk {'print $5'} | cut -d: -f 1 | sort | uniq -c | sort -nk 1
View ArticleGoogle API jQuery Include
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript"> $(function(){ }); </script>
View ArticleImport MySQL Dump
mysql -h DBHOST -u DBUSER -pDBPASS DBNAME < dump.sql Replace text in uppercase with the appropriate information: DBHOST - Database hostname, usually localhost DBUSER - User with privileges to the...
View ArticleEmbed Audio Using The Audio Tag
<audio controls autoplay autobuffer src="song.mp3"></audio>
View ArticleFind Duplicate MySQL Records
SELECT email, count(email) AS total FROM `tbl_mailing_list` GROUP BY email HAVING total > 1 ORDER BY total;
View ArticleValidate Email Address With JavaScript
/^((([a-z]|d|[!#$%&'*+-/=?^_`{|}~]|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])+(.([a-z]|d|[!#$%&'*+-/=?^_`{|}~]|[u00A0-uD7FFuF900-uFDCFuFDF0-uFFEF])+)*)|((x22)((((x20|x09)*(x0dx0a))?(x20|x09)+)?(([x01...
View Article
More Pages to Explore .....