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
<html> | |
<head><title>Hello</title></head> | |
<body><p>Hello, world!</p></body> | |
</html> |
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
<?php | |
//For PHP 5.3.x or later | |
public function emailExtended($data, $deep = false) { | |
$pattern = '/.+@(docomo|ezweb)\.ne\.jp$/i'; | |
$check = preg_replace_callback($pattern, function($matches) { | |
$patterns = array('/\.{2,}/', '/\.@/'); | |
$replacements = array('.', '@'); | |
return preg_replace($patterns, $replacements, $matches[0]); | |
}, array_shift($data)); | |
return Validation::email($check, $deep); |
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
<?php | |
function mb_strimlen($str, $start, $length, $trimmarker = '', $encoding = false) { | |
$encoding = $encoding ? $encoding : mb_internal_encoding(); | |
$str = mb_substr($str, $start, mb_strlen($str), $encoding); | |
if (mb_strlen($str, $encoding) > $length) { | |
$markerlen = mb_strlen($trimmarker, $encoding); | |
$str = mb_substr($str, 0, $length - $markerlen, $encoding) . $trimmarker; | |
} | |
return $str; | |
} |
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
<meta property="fb:admins" content="100002501170896" /> | |
<meta property="fb:app_id" content="285724981447786" /> | |
<meta property="og:url" content="http://www.msng.info/" /> | |
<meta property="og:type" content="blog" /> | |
<meta property="og:title" content="頭ん中" /> | |
<meta property="og:locale" content="ja_JP" /> | |
<meta property="og:site_name" content="頭ん中" /> | |
<meta property="og:image" content="http://www.msng.info/wp-content/themes/msng/img/favicon4.png" /> | |
<meta property="og:description" content="インターネットやコミュニケーションの話題を中心に、思ったことをつらつらと書いていくブログです。" /> |
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
<script type="text/javascript">if (window.top != window.self) window.top.location = window.self.location;</script> |
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
<!-- | |
・できれば <body> タグの直後に置く | |
・日本語ボタンを出すなら en_US を ja_JP にする | |
・アプリケーションIDをつける場合は、xfbml=1 の後に | |
&appId=[Facebookで取得するアプリケーションID: https://developers.facebook.com/apps ] | |
をつける | |
--> | |
<div id="fb-root"></div> | |
<script>(function(d, s, id) { | |
var js, fjs = d.getElementsByTagName(s)[0]; |
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
<?php | |
function is_hankaku($str, $include_kana = false, $include_controls = false, $encoding = null) { | |
if (!$include_controls && !ctype_print($str)) { | |
return false; | |
} | |
if (is_null($encoding)) { | |
$encoding = mb_internal_encoding(); | |
} | |
if ($include_kana) { |
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
<?php | |
//Requires function is_hankaku() https://gist.github.com/2167287 | |
function is_zenkaku($str, $encoding = null) { | |
if (is_null($encoding)) { | |
$encoding = mb_internal_encoding(); | |
} | |
$len = mb_strlen($str, $encoding); | |
for ($i = 0; $i < $len; $i++) { | |
$char = mb_substr($str, $i, 1, $encoding); | |
if (is_hankaku($char, true, true, $encoding)) { |
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
/** | |
* Google ドキュメントのフォームから投稿があったら確認メールを自動返信する(日本語版) | |
* English version will be available later. | |
* | |
* @author Masunaga Ray ( http://www.msng.info/ ) | |
* @instruction http://www.msng.info/archives/2012/04/google-docs-auto-reply.php | |
*/ | |
function sendConfirmation() { | |
//フォームでメールアドレスが入力される列の名前 | |
var emailColName = "メールアドレス"; |
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
/** | |
* Google ドキュメントのフォームから投稿があったら確認メールを自動返信する(日本語版) | |
* English version will be available later. | |
* | |
* @author Masunaga Ray ( http://www.msng.info/ ) | |
* @instruction http://www.msng.info/archives/2012/04/google-docs-auto-reply.php | |
*/ | |
function sendConfirmation() { | |
try { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); |
OlderNewer