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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath group: 'org.twitter4j', name: 'twitter4j-core', version: '3.0.5' | |
} | |
} | |
import twitter4j.* |
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 'open-uri' | |
require 'nokogiri' | |
doc = Nokogiri::HTML(open('http://www.iana.org/domains/root/db')) | |
tlds = [] | |
doc.css('table#tld-table tr').each do |tr| | |
info = tr.css('td') | |
next if info.empty? | |
tlds << { |
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
buildscript { | |
repositories { | |
// mavenCentral() | |
mavenLocal() | |
} | |
dependencies { | |
classpath 'com.twitter:twitter-text:1.9.0' | |
} | |
} |
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" | |
) | |
OlderNewer