Install php tidy sudo yum install php-tidy
then restart Apache
This file contains hidden or 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
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash - | |
sudo apt-get install -y nodejs |
This file contains hidden or 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
var connect = require('connect'), | |
httpProxy = require('http-proxy'); | |
var app = connect(); | |
var proxy = httpProxy.createProxyServer({ | |
target: 'http://127.0.0.1:8080' | |
}); | |
proxy.on('proxyReq', function(proxyReq, req, res, options) { |
This file contains hidden or 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
body { | |
font-family: 'Lantinghei SC', 'Open Sans', Arial, 'Hiragino Sans GB', 'Microsoft YaHei', 微软雅黑, STHeiti, 'WenQuanYi Micro Hei', SimSun, Helvetica, sans-serif; | |
} |
This file contains hidden or 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
body { | |
font-family: "Helvetica Neue",Helvetica,"Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif; | |
} |
This file contains hidden or 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
private void createIndex() { | |
boolean indexExists = client.admin().indices().prepareExists(INDEX_NAME).execute().actionGet().isExists(); | |
if (!indexExists) { | |
if (LOGGER.isInfoEnabled()) { | |
LOGGER.info("Index {} doesn't exist, create it now.", INDEX_NAME); | |
} | |
client.admin().indices().prepareCreate(INDEX_NAME).execute(); | |
} | |
} |
This file contains hidden or 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
public String getRandomString(String prefix) { | |
return prefix + "_" + UUID.randomUUID().toString().replaceAll("-", ""); | |
} |
This file contains hidden or 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
free -m && sync && echo 3 > /proc/sys/vm/drop_caches && free -m | |
Flush daily using crontab: | |
0 0 * * * sudo free -m && sync && echo 3 > /proc/sys/vm/drop_caches && free -m |
This file contains hidden or 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[0]).find('input[type=text]'); |
This file contains hidden or 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
sudo mysqldump --databases world --single-transaction --compress --order-by-primary –u <local_user> -p<local_password> | |
| mysql --host hostname –-port 3306 –u <RDS_user_name> –p<RDS_password> |