This file contains hidden or 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 | |
set_include_path('/path/to/oauth'); | |
require_once 'OAuth.php'; | |
define('CONSUMER_KEY', ''); | |
define('CONSUMER_SECRET', ''); | |
define('BASE_URL', 'https://twitter.com'); | |
define('REQUEST_TOKEN_URL', BASE_URL.'/oauth/request_token'); |
This file contains hidden or 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
AdminUser: | |
<?php for ($i = 0; $i < 100; $i++) : ?> | |
admin_user_<?php echo $i ?>: | |
username: "admin_<?php echo $i ?>" | |
password: "password" | |
<?php endfor; ?> | |
Member: | |
<?php for ($i = 1; $i <= 100; $i++) : ?> | |
member_<?php echo $i ?>: |
This file contains hidden or 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 | |
define('SNS_TITLE', 'MySNS'); | |
define('FEED_URL', 'http://example.com/api.php/feeds/diary'); | |
define('APPEND_CDATA_TO_CONTENT', true); | |
// --- | |
require_once 'Zend/Loader/Autoloader.php'; | |
$autoloader = Zend_Loader_Autoloader::getInstance(); |
This file contains hidden or 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 | |
require_once 'OAuth.php'; | |
require_once 'OpenPNEOAuth.class.php'; | |
// config | |
define('CONSUMER_KEY', ''); // コンシューマキー | |
define('CONSUMER_SECRET', ''); // コンシューマシークレット | |
define('BASE_URL', 'http://sns.example.com/'); // SNS の URL (最後は / で終わる必要があります) | |
define('SCRIPT_URL', 'http://externals.example.com/oauth_sample.php'); // このスクリプトの URL |
This file contains hidden or 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 | |
/** | |
* Copyright 2009 Kousuke Ebihara | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or 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 | |
/** | |
* This file is part of the OpenPNE package. | |
* (c) OpenPNE Project (http://www.openpne.jp/) | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file and the NOTICE file that were distributed with this source code. | |
*/ |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
import xmlrpclib, urllib, urllib2, cookielib, datetime | |
xmlrpc_url = 'http://user:[email protected]/login/xmlrpc' | |
login_url = 'http://redmine.openpne.jp/login' | |
login_account = {'username': 'user', 'password': 'pass'}; | |
newticket_url = 'http://redmine.openpne.jp/projects/op3/issues/new'; | |
def convert_type(type): |
This file contains hidden or 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 | |
if grep "\(refs\|fixes\) #[0-9]\+" $1 > /dev/null; then | |
ticket=$(sed -e "s/.*\(fixes\|refs\) #\([0-9]\+\).*/\2/" .git/COMMIT_EDITMSG | line) | |
title=$(curl -s "http://redmine.openpne.jp/issues/$ticket" | sed -n "/<title>/p" | sed "s/<title>\(.\+\)<\/title>/\1/") | |
if [ "404 - OpenPNE Issue Tracking System" = "$title" ]; then | |
echo "The specified ticket #$ticket is undefined." | |
exit 1 | |
fi |
This file contains hidden or 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 | |
echo 'PHP Version: '.phpversion().PHP_EOL; | |
echo 'allow_call_time_pass_reference: '.(int)ini_get('allow_call_time_pass_reference').PHP_EOL; | |
echo '============================='.PHP_EOL.PHP_EOL; | |
function ref(&$arg) | |
{ | |
$arg = 'kani'; | |
} |
This file contains hidden or 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 | |
class HelperTwigExtension extends Twig_Extension | |
{ | |
static protected $helpers = array(); | |
public function getTokenParsers() | |
{ | |
if (empty(self::$helpers)) | |
{ |
OlderNewer