Skip to content

Instantly share code, notes, and snippets.

View kawahara's full-sized avatar

Shogo Kawahara (bucyou) kawahara

  • freee
  • Kyoto, Japan
  • 00:35 (UTC +09:00)
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="hello world example" />
<Content type="html"><![CDATA[
こんにちは世界
]]></Content>
</Module>
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="hello world example2" />
<Content type="html"><![CDATA[
こんにちは世界!!
]]></Content>
</Module>
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="hello world OSAPI">
<Require feature="opensocial-0.8" />
<Require feature="osapi" />
<Require feature="dynamic-height" />
</ModulePrefs>
<Content type="html"><![CDATA[
こんにちはだよ!!
<script type="text/javascript">
function url2cmd(url) {
if (!url.match(/^http:\/\/gist\.github\.com\/([0-9]+)/)) {
pne_url2a(url);
return;
}
var id = RegExp.$1;
main(id);
}
function main(id) {
Member:
<?php for($i = 0;$i < 100;$i++): ?>
test_member_<?php echo $i ?>:
id: ~
name: OpenPNE君<?php echo $i ?>号
is_active: 1
<?php endfor; ?>
MemberConfig:
first_member_mobile:
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="Test Application">
<Require feature="opensocial-0.8" />
</ModulePrefs>
<Content type="html">
<![CDATA[
<div id="console"></div>
<script type="text/javascript">
function request() {
<?php
// OpenSocial RESTful APIサンプル
// ライブラリとして http://oauth.googlecode.com/svn/code/php/ を利用しています。
include_once('oauth/OAuth.php');
define('CONSUMER_KEY', '#CONSUMER_KEY#');
define('CONSUMER_SECRET', '#CONSUMER_SECRET#');
define('BASE_URL', 'http://sns.example.com');
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="hello world example">
<Require feature="opensocial-0.8"/>
</ModulePrefs>
<Content type="html"><![CDATA[
<script type="text/javascript">
function getHtml() {
var params = {};
params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;
<?php
// OpenSocial RESTful APIサンプル (2-legged OAuth)
// ライブラリとして http://oauth.googlecode.com/svn/code/php/ を利用しています。
include_once('lib/OAuth.php');
define('CONSUMER_KEY', '#CONSUMER_KEY#');
define('CONSUMER_SECRET', '#CONSUMER_SECRET#');
define('BASE_URL', '#BASE_URL#');
<?php
require_once dirname(__FILE__).'/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();
require_once dirname(__FILE__).'/../lib/util/sfPropelBaseTask.class.php';
define('OPENPNE_CONFIGURAIOTN_SAMPLE_HASH', '7b73a69b5efd2d390bead8135e8a6335');
if (!defined('E_DEPRECATED'))