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
<?php | |
if (isset($argv[1])) { | |
$word = rawurlencode($argv[1]); | |
} else { | |
echo <<<USAGE | |
Usage: | |
php {$argv[0]} SEARCH_WORD [ > OUTPUT ] | |
USAGE; |
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
<?php | |
require_once '/home/fivestar/projects/vendor/symfony-project.org/branches/1.4/lib/autoload/sfCoreAutoload.class.php'; | |
sfCoreAutoload::register(); | |
class ProjectConfiguration extends sfProjectConfiguration | |
{ | |
protected $annotationCache; | |
public function setup() |
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
<?php | |
/** | |
* 再帰的に scandir する | |
* | |
* @author Keisuke SATO <[email protected]> | |
**/ | |
function recursive_scandir($path, $result=array()) { | |
if (is_dir($path)) { | |
$path = rtrim($path, '/'). '/'; | |
$dirs = array_diff(scandir($path), array('.', '..')); |
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
<?php | |
/** | |
* Niigata Class | |
* | |
* @author Keisuke SATO aka riaf <[email protected]> | |
* @license New BSD License | |
**/ | |
class Niigata | |
{ | |
protected $_niigata_ = array(); |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
.xdebug-var-dump { | |
padding: 4px 8px; | |
margin: 5px 10px; | |
font-family: Menlo, Monaco, "Consolas", "Lucida Console", "courier new" !important; | |
-moz-border-radius: 10px !important; | |
-webkit-border-radius: 10px !important; | |
-o-border-radius: 10px !important; | |
border-radius: 10px !important; |
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
<?php | |
// TODO: Store をクリアする何かが必要 | |
spl_autoload_register(function($name) { | |
$store_key = array(__DIR__, '__autoload'); | |
if (App::mode() == 'release' && Store::has($store_key)) { | |
$files = Store::get($store_key); | |
} else { | |
$files = array(); | |
$dir = 'libs/'; |
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
cache |
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
<?php | |
require_once 'Services/Twitter.php'; | |
require_once 'HTTP/OAuth/Consumer.php'; | |
try { | |
$twitter = new Services_Twitter(); | |
// コマンドラインで叩くくらいならば,OAuth の鍵は全部定義しちゃってもいいかな..とか。 | |
// ウェブアプリにするならば,きちんと authorize するべきですね。 | |
$oauth = new HTTP_OAuth_Consumer( |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>twitter search</title> | |
<style type="text/css"> | |
body { | |
color: #333; | |
} | |
img { |
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
<?php | |
$url = 'http://***.php'; | |
$data = array( | |
'channel' => '***', | |
'message' => 'ほげらほげら', | |
'password' => '***', | |
); | |
$options = array( | |
'http' => array( |