メールの振り分けをしてくれるソフトウェア。
設定ファイルにルールを記載するとよきに計らってくれる。
yum install procmail
# procmailのパス調べる
which procmail
<?php | |
function crawl_page($url, $depth = 5) | |
{ | |
static $seen = array(); | |
if (isset($seen[$url]) || $depth === 0) { | |
return; | |
} | |
$seen[$url] = true; |
/*! | |
* requires jQuery | |
* usage: | |
* Scroller.to({ offset: 100 }); | |
* Scroller.to({ target: $('#main') }); | |
* | |
* advanced usage (with additional easing function not provided here) | |
* Scroller.to({ target: $('#main'), delay: 500, multiplier: 1.5, easing: 'easeOutQuad' }); | |
*/ | |
var Scroller = (function() |
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
<?php | |
// Load WordPress | |
require_once 'path/to/www/wp-load.php'; | |
require_once ABSPATH . '/wp-admin/includes/taxonomy.php'; | |
// Set the timezone so times are calculated correctly | |
date_default_timezone_set('Europe/London'); | |
// Create post |
Install Postfix and Procmail: | |
yum install postfix | |
yum install procmail | |
(Optional)Setup mail relay: /etc/postfix/main.cf | |
relayhost = [Relay server IP] | |
Setup procmail: /etc/postfix/main.cf | |
mailbox_command = /usr/bin/procmail |
// Requires JQuery and CORS enabled for the Origin you're testing from. | |
// Uncomment the next 4 lines to import JQuery | |
// var script= document.createElement('script'); | |
// script.type= 'text/javascript'; | |
// script.src= '//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min.js'; | |
// document.head.appendChild(script); | |
// Set up the multipart form using HTML5 FormData object | |
// https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest/FormData | |
var form = new FormData(); |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<script type="text/javascript" src="//stuk.github.io/jszip/dist/jszip.js"></script> | |
<script type="text/javascript" src="//stuk.github.io/jszip-utils/dist/jszip-utils.js"></script> |
var uni_words = []; | |
var all_words = jQuery('body').text().split(/ |\ /); | |
jQuery.each(all_words, function(index, item){ | |
if (item.length > 1 && /^[A-Za-z][A-Za-z0-9]*$/.test(item)) { | |
if(jQuery.inArray(item, uni_words) === -1) { | |
uni_words.push(item); | |
} | |
} | |
}); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script src="https://fb.me/react-15.1.0.js"></script> | |
<script src="https://fb.me/react-dom-15.1.0.js"></script> |