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
import urllib | |
import cgi | |
import wsgiref.handlers | |
import os | |
from google.appengine.api import urlfetch | |
from google.appengine.ext.webapp import template | |
from google.appengine.ext import webapp | |
class Amazon(webapp.RequestHandler): |
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
import logging | |
... | |
logging.debug('debug message') | |
... | |
def main(): | |
logging.getLogger().setLevel(logging.DEBUG) |
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
class Test: | |
@classmethod | |
def test(self): | |
""" クラスメソッド | |
""" | |
print 'test' | |
@classmethod | |
def test2(self): | |
""" クラスメソッド2 |
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 | |
$base_url = 'http://localhost/piki/'; | |
$admin_name = 'admin'; | |
$admin_password = 'password'; | |
$db = null; | |
function logger($message) { | |
error_log(date('Y-m-d H:i:s') . ': ' . $message . "\n", 3, 'piki.log'); | |
} |
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
require 'RNotify' | |
def rnotify(title, message, timeout_sec = 5) | |
Notify.init('rnotify') | |
test = Notify::Notification.new( "Test 1", "This is a test", nil, nil ) | |
test.timeout= timeout_sec * 1000 | |
test.show | |
sleep(timeout_sec) | |
test.close | |
Notify.uninit |
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
// ==UserScript== | |
// @name eee_google_reader | |
// @description Google Reader for eeePC | |
// @include https://*.google.com/reader/view/* | |
// @include http://*.google.com/reader/view/* | |
// @include htt*://*.google.*/reader/view* | |
// @author jugyo (http://jugyo.org/) | |
// ==/UserScript== | |
var myStyle = document.createElement('style'); |
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
require 'rubygems' | |
#gem "dm-core", "=0.9.7" #=> error! | |
#gem "dm-core", "=0.9.8" #=> error! | |
require 'dm-core' | |
DataMapper.setup( | |
:default, | |
"sqlite3:///#{File.expand_path(File.dirname(__FILE__))}/test.db" | |
) | |
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
require 'rubygems' | |
require 'dm-core' | |
DataMapper.setup(:default, "sqlite3:///#{File.expand_path(File.dirname(__FILE__))}/test.db") | |
class User | |
include DataMapper::Resource | |
property :id, Integer, :serial => true | |
property :name, String, :nullable => false | |
has n, :items |
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/env python | |
# -*- coding: utf-8 -*- | |
import gdata.photos.service | |
gd_client = gdata.photos.service.PhotosService() | |
user = '<ユーザーID>' | |
# アルバムの情報を取得 |
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/env ruby | |
require 'readline' | |
require 'open-uri' | |
Thread.new do | |
puts open('http://example.com/').read | |
end | |
while buf = Readline.readline("", true) |
OlderNewer