This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. in tomcat/conf/server.xml, add the directory to appBase paramter in Host section | |
<Host name="test.example.com" appBase="/mnt/example" autoDeploy="true" reloadable="true"> | |
2. in the listing directory, add WEB-INF/ folder, add web.xml in WEB-INF w/ the following: | |
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<!DOCTYPE web-app | |
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" | |
"http://java.sun.com/dtd/web-app_2_3.dtd"> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.browser={};(function(){jQuery.browser.msie=false; | |
jQuery.browser.version=0;if(navigator.userAgent.match(/MSIE ([0-9]+)\./)){ | |
jQuery.browser.msie=true;jQuery.browser.version=RegExp.$1;}})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Webkit flicks if the element you want to animate is bigger than the screen. | |
The Fix: | |
Add these two properties to prevent flickering effects: | |
-webkit-transform: translateZ(0); | |
-webkit-perspective: 1000; | |
-webkit-backface-visibility: hidden; | |
Reference: http://indiegamr.com/ios6-html-hardware-acceleration-changes-and-how-to-fix-them/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#element-need-show').click(function(e){ | |
e.stopPropagation(); | |
}); | |
$("#link-for-popup").click(function(e) { | |
e.preventDefault(); | |
e.stopPropagation(); | |
$('#element-need-show').show(); | |
}); | |
$(document).click(function() { | |
$('#element-need-show').hide(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
font-family: … "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif; | |
/* 中文字体之前的「…」代表西文字体 */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT table_schema "Data Base Name", SUM( data_length + index_length) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if you open browser development tool's console and find some javascript errors like "switchEditors is undefined" or "jquery is undefined", It appears that the new version of WordPress has some new performance optimisation features that concatenate all JavaScript resources into a single request. | |
Solution: put the following two lines of codes in wp-config.php: | |
define('CONCATENATE_SCRIPTS', false); | |
define('SCRIPT_DEBUG', true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rsync -rav --progress "ssh -i KEY-PAIR.ppk" /mnt/temp/ root@another-instance-ip-addr:/mnt/temp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat *.txt |grep "YOUR_FILTER"|grep -vi "EXCLUDE_FILTER"|cut -d\" -f2|awk '{print$2}'|sort|uniq -c|sort -nr > report.log | |
Example: | |
cat report.log | grep -vi ".css\|.js\|.woff\|.eot\|.ttf\|.jpg\|.gif\|.png\|.ico" |grep -vi "wp-login.php\|wp-cron.php\|wp-admin\|robots.txt" | cut -d\" -f2|awk '{print$2}'|sort|uniq -c|sort -nr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p:first-child:first-letter { float: left; color: #903; font-size: 75px; line-height: 60px; padding-top: 4px; padding-right: 8px; padding-left: 3px; font-family: Georgia; } |
OlderNewer