Skip to content

Instantly share code, notes, and snippets.

View jugyo's full-sized avatar
🏠
Working from home

Kaz jugyo

🏠
Working from home
  • The League
  • New Jersey
View GitHub Profile
@jugyo
jugyo / build.gradle
Last active August 29, 2015 13:56 — forked from seratch/build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath group: 'org.twitter4j', name: 'twitter4j-core', version: '3.0.5'
}
}
import twitter4j.*
@jugyo
jugyo / get_tlds.rb
Created March 10, 2014 07:17
Script to get TLDs from iana.org
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 << {
@jugyo
jugyo / build.gradle
Created March 13, 2014 01:49
Example of using com.twitter.Extractor with gradle
buildscript {
repositories {
// mavenCentral()
mavenLocal()
}
dependencies {
classpath 'com.twitter:twitter-text:1.9.0'
}
}
@jugyo
jugyo / gist:7440
Created August 27, 2008 06:34
Amazon ECS Sesarch
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):
@jugyo
jugyo / gist:7445
Created August 27, 2008 08:00
logging
import logging
...
logging.debug('debug message')
...
def main():
logging.getLogger().setLevel(logging.DEBUG)
class Test:
@classmethod
def test(self):
""" クラスメソッド
"""
print 'test'
@classmethod
def test2(self):
""" クラスメソッド2
<?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');
}
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
// ==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');
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"
)