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
// via maeharinの日記「や...やっと理解できた!JavaScriptのプロトタイプチェーン」 | |
// http://d.hatena.ne.jp/maeharin/20130215/javascript_prototype_chain | |
var C = function(name){ | |
// function C(name){ | |
this.name = name; | |
console.log( name ); // hoge | |
// fuga | |
// piyo | |
console.log( this.__proto__ ); // C {x: "xxx"} |
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
// 参考(というかほぼまんま): | |
// https://productforums.google.com/forum/#!topic/docs-ja/-2Go4Q_6mj8 | |
function onEdit(event) { | |
// 対象外とする行(見出し行とか) | |
var exclusionRows = [1, 2]; | |
// eventのシートを取得 | |
var sheet = event.source.getActiveSheet(); | |
// eventのセル範囲を取得 | |
var range = event.source.getActiveRange(); |
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
*ターミナルに入力 | |
defaults write com.apple.dashboard mcx-disabled -boolean true | |
Dockを再起動 | |
killall Dock | |
*使用可能にする場合 | |
defaults delete com.apple.dashboard mcx-disabled | |
の後、再び再起動 |
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
/* ================================================== | |
pingbackの停止 | |
================================================== */ | |
function remove_x_pingback($headers) { | |
unset( $headers['X-Pingback'] ); | |
return $headers; | |
} | |
add_filter( 'wp_headers', 'remove_x_pingback' ); | |
function remove_pingback_method( $methods ) { |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
(メールマガジン)|(mail magazine)|(ニュースレター)|(news letter)|(登録情報更新・退会)|(購読を解除)|(unsubscribe from)|(to unsubscribe) |
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 name="apple-mobile-web-app-status-bar-style" content="default"> <!-- デフォルト色/不透明 --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> <!-- 黒/不透明 --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> <!-- 黒/半透明 --> |
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
function remove_more_jump_link($link) { | |
$offset = strpos($link, '#more-'); | |
if ($offset) { $end = strpos($link, '"',$offset); } | |
if ($end) { $link = substr_replace($link, '', $offset, $end-$offset); } | |
return $link; | |
} | |
add_filter('the_content_more_link', 'remove_more_jump_link'); |
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
function require_login() { | |
if ( ! is_user_logged_in() && ! preg_match( '/^(wp-login\.php|async-upload\.php)/', basename( $_SERVER['REQUEST_URI'] ) ) && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) && ! ( defined( 'DOING_CRON' ) && DOING_CRON ) ) { | |
auth_redirect(); | |
} | |
} | |
add_action( 'init', 'require_login' ); |
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
var q = location.search.substring(1).split("&"); | |
for(var l=0;l<q.length;l++){ | |
if(q[l].indexOf("=")>-1){ | |
q[l] = q[l].split("="); | |
}else{ | |
q[l] = [q[l],"default"]; | |
} | |
q[q[l][0]] = q[l][1]; | |
} | |
alert(q.hoge); |
NewerOlder