Skip to content

Instantly share code, notes, and snippets.

View sotarok's full-sized avatar
🍺
developing Crowi and beer

Sotaro Karasawa sotarok

🍺
developing Crowi and beer
View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import time
import datetime
import re
import Skype4Py
<?php
/**
*
*/
phpinfo();
fetch: /usr/local/var/log/http/openpear-access_log.20090809
fetch: /usr/local/var/log/http/openpear-access_log.20090816
fetch: /usr/local/var/log/http/openpear-access_log.20090823
fetch: /usr/local/var/log/http/openpear-access_log.20090830
fetch: /usr/local/var/log/http/openpear-access_log.20090906
fetch: /usr/local/var/log/http/openpear-access_log.20090913
fetch: /usr/local/var/log/http/openpear-access_log.20090920
fetch: /usr/local/var/log/http/openpear-access_log.20090927
fetch: /usr/local/var/log/http/openpear-access_log.20091004
fetch: /usr/local/var/log/http/openpear-access_log.20091011
<?php
/** ClassLoader
*
* Based on SplClassLoader by PHP Standards Working Grounp
* <http://groups.google.com/group/php-standards/web/final-proposal>
*
* @author Sotaro Karasawa <sotaro.k@gmail.com>
* @date 2010-12-02 18:59:39
*/
@namespace url(http://www.w3.org/1999/xhtml);
.xdebug-var-dump {
background: #fef9fb !important;
color: #000 !important;
padding: 4px 8px !important;
margin: 5px 10px !important;
text-align: left !important;
font-family: Menlo, Monaco, "Consolas", "Lucida Console", "courier new" !important;
-moz-border-radius: 10px !important;
<?php
/**
*
*/
include '__header.php';
?>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("jquery", "1.3");
<?php
/**
* <cron>
* * * * * * /usr/bin/php /path/to/reroom-rss.php >>/path/to/cron.log 2>&1
* </cron>
*/
require_once 'Net/Socket/Tiarra.php'; // openpear
$url = "http://reroom.jp/latest/feed/";
<?php
/**
* Bug in 5.3 __invoke() ?
*
* @see http://news.php.net/php.internals/49801
*/
class Hoge
{
public function __invoke()
<?php
/**
*
*/
trait A
{
public function smallTalk() {
echo 'a';
<?php
$hash = md5($_POST['imagedata']);
file_put_contents("uploads/$hash", $_POST['imagedata']);
$db_filename = "db/id.db";
$db = unserialize(file_get_contents($db_filename));
$db[$hash] = $_POST['id'];
file_put_contents("db/id.db", serialize($db));
echo "http://gyazo.hostname/uploads/$hash";