Skip to content

Instantly share code, notes, and snippets.

View tejima's full-sized avatar

手嶋守 tejima

View GitHub Profile
footer:
_attributes:
Hidden: true
footer_before:
Name: "footer_before"
Caption: "ログイン前フッター"
FormType: "textarea"
ValueType: "string"
IsRequired: false
abort if !system( 'rpm -ivh http://nog.dino.co.jp/dist/centos/5/dino/noarch/dino-release-1.0-1.noarch.rpm')
abort if !system( 'rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt')
abort if !system( 'wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm')
abort if !system( 'rpm -ivh rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm')
abort if !system( 'yum -y install make')
abort if !system( 'yum -y install httpd httpd-devel php php-pear php-devel php-dom php-mbstring php-mysql php-gd')
abort if !system( 'yes yes | pecl install apc')
abort if !system( 'echo "extension=apc.so" > /etc/php.d/apc.ini')
abort if !system( 'yum -y install mysql mysql-server')
abort if !system( 'yum -y install git')
./symfony sa-lunch
PHP Warning: require_once(Zend/Acl.php): failed to open stream: No such file or directory in /home/admin/OpenPNE/351.0131.pne.jp/lib/vendor/Zend/Acl/Assert/Interface.php on line 26
PHP Fatal error: require_once(): Failed opening required 'Zend/Acl.php' (include_path='/home/admin/OpenPNE/351.0131.pne.jp/plugins/opOpenSocialPlugin/lib/vendor/Shindig/:/home/admin/OpenPNE/351.0131.pne.jp/lib/config/../vendor/PEAR/:/home/admin/OpenPNE/351.0131.pne.jp/lib/config/../vendor/OAuth/:/home/admin/OpenPNE/351.0131.pne.jp/lib/config/../vendor/simplepie/:.:/usr/share/pear:/usr/share/php') in /home/admin/OpenPNE/351.0131.pne.jp/lib/vendor/Zend/Acl/Assert/Interface.php on line 26
//tejima
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__).'/../lib/vendor/');
パスが通っていないらしい。
これでカバーした。
Symfonyはシステムにインストールしていない。OpenPNE3.5.1
PHP Fatal error: Cannot redeclare class sfWebRequest in /Users/tejima/OpenPNE/0515.localhost/cache/tejima/mobile_mail_frontend/prod/config/config_core_compile.yml.php on line 2901
なんでだ?
public function executeIndex(sfWebRequest $request)
{
$client = OpenPNEOAuth::getInstance('http://twitter.com/',Doctrine::getTable('SnsConfig')->get('awt_consumer'), Doctrine::getTable('SnsConfig')->get('awt_se
cret'));
//$token = $client->getRequestToken( Doctrine::getTable('SnsConfig')->get('awt_host').'auth/settoken/');
$token = $client->getRequestToken("http://www.tejimaya.com");
error_log("p:". print_r($token,true)."\n",3,'/tmp/aaaaa');
error_log("getAuthorizeUrl():".OpenPNEOAuth::getInstance()->getAuthorizeUrl($token)."\n",3,'/tmp/aaaaa');
error_log("awt_consumer:".Doctrine::getTable('SnsConfig')->get('awt_consumer')."\n",3,'/tmp/aaaaa');
error_log("awt_secret:".Doctrine::getTable('SnsConfig')->get('awt_secret')."\n",3,'/tmp/aaaaa');
$this->tokenRecord = $this->getTokenTable()->findByKeyString($token->key);
if ($this->tokenRecord)
{
//$this->tokenRecord->setCallbackUrl($request->getParameter('oauth_callback', 'oob'));
$this->tokenRecord->setCallbackUrl($authRequest->get_parameter('oauth_callback'));
$this->tokenRecord->setIsActive(false);
$this->tokenRecord->save();
}
import java.io.*;
import java.net.*;
import java.util.regex.*;
public class Main4 {
public static void main(String args[]) {
int n = 0;
Pattern p = Pattern.compile("--> (\\d+)</font>");
try {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
<?xml version="1.0"?>
<root>
<list>
<item>
<item>
<name>Option_R to RightClick</name>
<identifier>remap.optionR2rightclick</identifier>
<autogen>--KeyToPointingButton-- KeyCode::OPTION_R, PointingButton::RIGHT</autogen>
</item>
<item>
@tejima
tejima / openpneSIInstallTask.class.php
Created May 23, 2011 04:29
Skip Interactive Install
<?php
/**
* Mamoru Tejima
*/
class openpneSIInstallTask extends openpneInstallTask
{
protected function configure()
{
$this->namespace = 'openpne';
@tejima
tejima / api.php
Created June 22, 2011 12:08
login api for OpenPNE2
<?php
require_once './config.inc.php';
require_once OPENPNE_WEBAPP_DIR . '/init.inc';
//if(OPENPNE_USE_API != true){
// die("API NOT ACTIVE");
//}
$address = $_GET['address'];
$password = $_GET['password'];