Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
😐

Kaz jugyo

💭
😐
  • MUA inc.
  • New York
View GitHub Profile
@jugyo
jugyo / gist:7440
Created Aug 27, 2008
Amazon ECS Sesarch
View gist:7440
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):
View gist:7445
import logging
...
logging.debug('debug message')
...
def main():
logging.getLogger().setLevel(logging.DEBUG)
View gist:7885
class Test:
@classmethod
def test(self):
""" クラスメソッド
"""
print 'test'
@classmethod
def test2(self):
""" クラスメソッド2
View gist:9908
<?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');
}
View gist:10379
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
View gist:32223
// ==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');
View gist:34243
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"
)
View gist:34580
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
View gist:35853
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import gdata.photos.service
gd_client = gdata.photos.service.PhotosService()
user = '<ユーザーID>'
# アルバムの情報を取得
View gist:38344
#!/usr/bin/env ruby
require 'readline'
require 'open-uri'
Thread.new do
puts open('http://example.com/').read
end
while buf = Readline.readline("", true)