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
#!/bin/sh | |
git clone git://github.com/masainox/wordpress-heroku.git -b language-ja | |
cd wordpress-heroku | |
heroku create | |
heroku addons:add heroku-postgresql:dev | |
# copy DATABASE_URL(heroku config) | |
heroku config -s |grep HEROKU_POSTGRESQL_ | |
heroku config:set DATABASE_URL=postgres://USER:PW@HOST:PORT/DB # set same var HEROKU_POSTGRESQL_*****_URL |
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
"10100100110".reverse.split('1',-1).inject([]){|ret,i| ret << i.size + (ret.last.nil? ? 0 : ret.last + 1); ret }[0..-2] | |
# => [1, 2, 5, 8, 10] |
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
TEST |
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
<% content_for :header do %> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
<script type="text/javascript" src="<%= @theme.path %>/js/jquery.facebook.js"></script> | |
<% end %> |
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($) { | |
var app_id = $('meta[property="fb:app_id"]').attr('content'); | |
$('<script type="text/javascript">') | |
.prop({ async: "true" }) | |
.attr({ src: document.location.protocol + '//connect.facebook.net/ja_JP/all.js' }) | |
.appendTo($('<div>', { id: 'fb-root' }).appendTo($('body'))); | |
window.fbAsyncInit = function() { | |
FB.init({ |
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:app_id" content="FACEBOOK_APP_ID" /> | |
<meta property="fb:admins" content="ADMIN_USER_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
<div class="fb-comments" data-href="http://example.com" data-num-posts="5" data-width="690"></div> |
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
<div class="fb"> | |
<div class="fb-comments" data-href="<%= base_url + @entry.link %>" data-num-posts="5" data-width="690"></div> | |
</div> |
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
def meta_ogp | |
s = yield_content :meta_ogp | |
s unless s.blank? | |
end |
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_ogp %> |
OlderNewer