Skip to content

Instantly share code, notes, and snippets.

View co3k's full-sized avatar
🔞
"><s>'\

Kousuke Ebihara co3k

🔞
"><s>'\
View GitHub Profile

As a rule, defining variable in the global scope. Accessing variable by using global keyword

@co3k
co3k / gitsync.php
Created March 31, 2010 02:43
定期的に git-svn rebase して push するやつ
<?php
require_once 'VersionControl/Git.php';
$git = new VersionControl_Git('/path/to/OpenPNE2-git-mirror');
$git->setGitCommandPath('/path/to/git');
$branches = $git->getBranches();
foreach ($branches as $branch)
{
diff --git a/lib/config/opApplicationConfiguration.class.php b/lib/config/opApplicationConfiguration.class.php
index de3f3f5..8d0e611 100644
--- a/lib/config/opApplicationConfiguration.class.php
+++ b/lib/config/opApplicationConfiguration.class.php
@@ -420,7 +420,33 @@ abstract class opApplicationConfiguration extends sfApplicationConfiguration
public function globEnablePlugin($pattern, $isControllerPath = false)
{
- return $this->globPlugins($pattern, false, $isControllerPath);
+ if (!sfConfig::get('ebi_cache_glob_plugin', false))
diff --git a/apps/pc_frontend/config/routing.yml b/apps/pc_frontend/config/routing.yml
index 10e96c1..1fca8c9 100644
--- a/apps/pc_frontend/config/routing.yml
+++ b/apps/pc_frontend/config/routing.yml
@@ -37,6 +37,66 @@ error:
url: /default/error
param: { module: default, action: error }
+global_search:
+ url: /search
diff --git a/web/index.php b/web/index.php
index 8d02f46..3884136 100644
--- a/web/index.php
+++ b/web/index.php
@@ -8,6 +8,8 @@
* file and the NOTICE file that were distributed with this source code.
*/
+// xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);
+
diff --git a/apps/pc_frontend/config/factories.yml b/apps/pc_frontend/config/factories.yml
index 1465851..9463dff 100644
--- a/apps/pc_frontend/config/factories.yml
+++ b/apps/pc_frontend/config/factories.yml
@@ -92,13 +92,7 @@ all:
debug: false
untranslated_prefix: "[T]"
untranslated_suffix: "[/T]"
- cache:
- class: sfFileCache
diff --git a/lib/config/opApplicationConfiguration.class.php b/lib/config/opApplicationConfiguration.class.php
index de3f3f5..8dac5ca 100644
--- a/lib/config/opApplicationConfiguration.class.php
+++ b/lib/config/opApplicationConfiguration.class.php
@@ -18,6 +18,8 @@
abstract class opApplicationConfiguration extends sfApplicationConfiguration
{
static protected $zendLoaded = false;
+ public $globEnablePluginList = array();
+ public $globEnablePluginControllerList = array();
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://sf.op3-ebihara.ebizori.deb/" />
<title>cpu_testing</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import email, sys
p = email.FeedParser.FeedParser()
p.feed(sys.stdin.read())
mail = p.close()
content_charset = mail.get_content_charset(None)
@co3k
co3k / const.php
Created April 13, 2010 08:39
クラス定数チェッカー
<?php
$r = new ReflectionClass('PDO');
$consts = $r->getConstants();
var_dump(array_keys($consts, 0)); // 定数の値が 0 のクラス定数名を引っ張り出す