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 'Net/IRC/Client.php'; | |
class WozozoBot extends Net_IRC_Client | |
{ | |
protected function on_privmsg($m) { | |
list($prefix, $msg) = $m->params; | |
if ($msg == 'wozozo') | |
$this->privmsg($prefix, 'yudoufu'); | |
} |
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 | |
// 雰囲気こんな感じ。 | |
// 実際はファイル分けたりしてる | |
class HogeController | |
{ | |
public function index($b) { | |
return $b->provide('fuga'); | |
// return $this->phpt('index'); | |
} |
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 | |
/** | |
* Geohash | |
* | |
* @author Keisuke SATO | |
* @license MIT License | |
* | |
* # Based | |
* http://github.com/davetroy/geohash-js/blob/master/geohash.js | |
* Geohash library for Javascript |
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 | |
date_default_timezone_set('Asia/Tokyo'); | |
$twitter_method = 'sample'; | |
$twitter_user = 'user'; | |
$twitter_pass = 'pass'; | |
$db_name = 'twitter'; | |
$db_user = 'user'; | |
$db_pass = 'pass'; |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import sys, tweepy | |
from couchdb import Server | |
from pit import Pit | |
try: | |
import simplejson as json | |
except ImportError: | |
import json |
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
-- phpMyAdmin SQL Dump | |
-- version 3.2.2 | |
-- http://www.phpmyadmin.net | |
-- | |
-- ホスト: localhost | |
-- 生成時間: 2010 年 1 月 09 日 01:14 | |
-- サーバのバージョン: 5.4.3 | |
-- PHP のバージョン: 5.3.1 | |
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; |
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 | |
class Subversion extends Object | |
{ | |
static protected $_cmd_path_ = '/usr/bin/svn'; | |
protected $_result_; | |
static public function config_path($cmd_path){ | |
self::$_cmd_path_ = $cmd_path; | |
} | |
static public function cmd_path(){ |
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
CREATE TABLE `oretter_status_message` ( | |
`id` int(11) unsigned NOT NULL auto_increment, | |
`body` blob NOT NULL, | |
`created` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
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(!function_exists('parse_ini_string')){ | |
function parse_ini_string($ini, $process_sections=false){ | |
$tmpfile = tempnam(sys_get_temp_dir(), 'INI'); | |
if(@file_put_contents($tmpfile, $ini) !== false){ | |
$r = parse_ini_file($tmpfile, $process_sections); | |
@unlink($tmpfile); | |
return $r; | |
} | |
return false; |
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 | |
/** | |
* なんかよくわからんが PHP 版 | |
*/ | |
$critics = array( | |
'Lisa Rose' => array( | |
'Lady in the Water' => 2.5, | |
'Snakes on a Plane' => 3.5, | |
'Just My Luck' => 3.0, |