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
# SNSクローラーをenvに設定 | |
SetEnvIf User-Agent ^facebookexternalhit.*$ fb_crawler | |
SetEnvIf User-Agent ^facebookplatform.*$ fb_crawler | |
SetEnvIf User-Agent ^Twitterbot.*$ tw_crawler | |
# どれか一致で通過 | |
<RequireAny> | |
# クローラー | |
Require env fb_crawler | |
Require env tw_crawler |
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
/*-------------------------------- | |
広告のフロート | |
-------------------------------*/ | |
// jQueryの開始方法を変更 | |
$(function() { | |
/* | |
Ads Sidewinder | |
by Hamachiya2. http://d.hatena.ne.jp/Hamachiya2/20120820/adsense_sidewinder | |
*/ | |
var main = $('main'); // メインカラムのID |
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
// 画面に表示される分の大きさ(カットされて見えない部分は含まない) | |
Size visibleSize = Director::getInstance()->getVisibleSize(); | |
// 画面に表示される左端のポイントの座標(これのせいで可読性が最悪になる) | |
Vec2 origin = Director::getInstance()->getVisibleOrigin(); | |
// "こんにちは世界"という文字のラベルを作成する。フォントはArialで24ポイントの大きさ | |
auto label = LabelTTF::create("こんにちは世界", "Arial", 24); | |
// LabelTTFはdeprecatedなので↓にした方が良い。 | |
// Label::create("こんにちは世界", "Arial", 24); |