Skip to content

Instantly share code, notes, and snippets.

View sotarok's full-sized avatar
🍺
developing Crowi and a Craft Beer Restaurant

Sotaro Karasawa sotarok

🍺
developing Crowi and a Craft Beer Restaurant
View GitHub Profile
Acme_BrainPhack 0.0.1 3
Acme_BrainPhack 0.0.2 2
Acme_BrainPhack 1.0.0 7
Acme_IdolMaster 0.1.0 3
Acme_MorningMusume 0.1.0 2
CSV_Iterator 0.1.0 9
CyclicValueProducer 1.0.0 2
DB_SerializeDB 0.1.1 1
Date_Japanese_Era 0.1.0 7
Db_Fixture 0.1.3 8
<?php
/**
*
*/
$dir = '/home/sotarok/tmp/log/mail/';
$file = (glob($dir . '*'));
<?php
$b = mb_get_info();
mb_language('Japanese');
$a = mb_get_info();
mb_language('Russian');
$c = mb_get_info();
mb_language('Traditional Chinese');
$d = mb_get_info();
#!/usr/bin/env python
# -*- coding: utf-8 -*-
prefecture = {
1: '北海道', 2: '青森県', 3: '岩手県', 4: '宮城県', 5: '秋田県',
6: '山形県', 7: '福島県', 8: '茨城県', 9: '栃木県', 10: '群馬県',
11: '埼玉県', 12: '千葉県', 13: '東京都', 14: '神奈川県', 15: '新潟県',
16: '富山県', 17: '石川県', 18: '福井県', 19: '山梨県', 20: '長野県',
21: '岐阜県', 22: '静岡県', 23: '愛知県', 24: '三重県', 25: '滋賀県',
<?php
if ($argc <= 3) {
echo <<<EOI
Usage:
% php {$argv[0]} operator arg1 arg2 [arg3 ...]
operator + or - or * or /
arg integer
EOI;
exit;
<?php
/**
* HatenaGroupDumper
*
* 失敗はほぼ考慮しない適当スクリプト
* はてなグループの日記をHTMLで保存します
*/
require_once 'HTTP/Client.php';
<?php
if (!defined('__DIR__')) {
define('__DIR__', dirname(__FILE__));
}
require_once(__DIR__ . "/core/jump.php");
App::config_path(__FILE__, "http://openpear.org/", __DIR__);
Lib::config_path(path("libs"),path("vendors"));
Template::config_path(__DIR__ . "/resources/templates", "http://openpear.org/resources/media");
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifier
*/
/**
* Smarty truncate modifier plugin
<?php
/**
*
*/
function ae($a, $b)
{
$c = debug_backtrace();
$c[1]['object']->assertEquals($a, $b);
}
@sotarok
sotarok / dekiwiki_php53.patch
Created December 3, 2009 08:49
dekiwiki (mindtouch) for PHP 5.3 patch
diff --git a/deki/plugins/special_page/special_page.php b/deki/plugins/special_page/special_page.php
index 209ab0e..407ace0 100644
--- a/deki/plugins/special_page/special_page.php
+++ b/deki/plugins/special_page/special_page.php
@@ -141,7 +141,7 @@ abstract class SpecialPagePlugin extends DekiPlugin
else if ($returnToTitle)
{
$Title = Title::newFromText($returnToTitle);
- // fix direct comparisons to 'Special', use Namespace::getSpecial() etc
+ // fix direct comparisons to 'Special', use Namespaces::getSpecial() etc