(检查 rss 中的特殊字符) http://www.pengzao.com/article/html-entity.html
http://zh.wikipedia.org/wiki/%E6%8E%A7%E5%88%B6%E5%AD%97%E7%AC%A6
function HtmltoEntity(str){
var match = [
'<',
var Sequelize = require('sequelize') | |
var sequelize = new Sequelize('sequelize_test', 'root') | |
//Note that the model definition does not have "fullName" | |
var User = sequelize.define('User', { | |
email: Sequelize.STRING, | |
firstName: Sequelize.STRING, | |
lastName: Sequelize.STRING, | |
}, | |
{ |
#!/bin/bash | |
# Install build dependencies | |
yum install -y gcc libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel | |
# Get GraphicsMagick source | |
wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.9.tar.gz | |
tar zxvf GraphicsMagick-1.3.9.tar.gz | |
# Configure and compile |
# Install tmux on Centos release 6.5 | |
# install deps | |
yum install gcc kernel-devel make ncurses-devel | |
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL | |
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
tar -xvzf libevent-2.0.21-stable.tar.gz | |
cd libevent-2.0.21-stable | |
./configure --prefix=/usr/local |
(检查 rss 中的特殊字符) http://www.pengzao.com/article/html-entity.html
http://zh.wikipedia.org/wiki/%E6%8E%A7%E5%88%B6%E5%AD%97%E7%AC%A6
function HtmltoEntity(str){
var match = [
'<',
_bottomHeader(); | |
$(window).on('scroll', function() { | |
if ($(this).scrollTop() <= obj.sliderHeight) { | |
_bottomHeader(); | |
} else { | |
_topHeader(); | |
} | |
}); |
<?php | |
// Pre-2.6 compatibility | |
if( !defined('WP_CONTENT_URL') ) | |
define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); | |
if( !defined('WP_CONTENT_DIR') ) | |
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); |
/** | |
* Shortcut for adding animation class name to dom element | |
* @param {string} cls class name | |
* @param {Function} cb callback | |
* @param {Function} lastItemCb callback execute at last elment animated | |
* @return {object} this | |
*/ | |
$.fn.classAnimoEnd = function(cls, cb, lastItemCb) { | |
var el = this; |
[ | |
{ | |
"args": { | |
"setting": "tab_size", | |
"value": 4 | |
}, | |
"command": "set_setting" | |
}, | |
{ | |
"args": |
grunt.registerMultiTask('auto_create_ts', 'The best Grunt plugin ever.', function() { | |
function replaceAssets(fileSrc) { | |
//read page file data | |
var htmlData = grunt.file.read(fileSrc); | |
//get the full asset text, like "text/javascript" src="js/hello.js?auto_create_ts=3232323233" | |
// console.log(/(".*?auto_create_ts=)(\d+)([\"|\'])/g.test(htmlData)); | |
var newdata = htmlData.replace(/(".*?auto_create_ts=)(\d+)([\"|\'])/g, "$1" + (Math.round(+new Date() / 1000)) + "$3"); |
// @return [float] a random number between min and max | |
function getRandom(min, max) { | |
return Math.random() * (max - min) + min; | |
} | |
// @return [integer] a random int between min and max | |
function getRandomInt(min, max) { | |
return Math.floor(Math.random() * (max - min + 1) + min); | |
} |