Skip to content

Instantly share code, notes, and snippets.

View tobynet's full-sized avatar

tobynet tobynet

  • Toyama, Japan
View GitHub Profile
@tily
tily / input.txt
Created January 7, 2010 14:14
make text stammer
文字を読みながら、そこに表現されてある音響が、いつまでも耳にこびりついて、離れないことがあるだらう。オセロオであつたか、ほかの芝居であつたか、しらべてみれば、すぐ判るが、いまは、もの憂く、とにかくシエクスピア劇のひとつであることは間違ひない、とだけ言つて置いて、その芝居の人殺しのシイン、寝室でひそかに女をしめ殺して、ヒロオも、われも、瞬時、ほつと重くるしい溜息。額の油汗拭はむと、ぴくとわが硬直の指うごかした折、とん、とん、部屋の外から誰やら、ドアをノツクする。ヒロオは、恐怖のあまり飛びあがつた。ノツクは、無心に、つづけられる。とん、とん、とん、とん、ヒロオは、その場で気が狂つたか、どうか、私はその後の筋書を忘れてしまつた。
@koki-h
koki-h / pony_sample.rb
Created March 30, 2010 13:26
pony_sample. A good wrapper of Net/SNMP + TMail
#ponyを使ってgmail経由でメールを送信
#pony : http://github.com/benprew/pony
#メールクライアントの設定-GMailヘルプ : http://mail.google.com/support/bin/answer.py?hl=jp&answer=13287
require 'rubygems'
require 'pony'
Pony.mail(:to => 'XXX@XXXX.com',
:body => "あああああああああああ", #bodyもsubjectも日本語OK(windows/cygwin)
:subject => "テストとととととt",
:charset => "utf8", #つけないと警告が出る
@tily
tily / example.txt
Created April 10, 2010 16:27
convert text to japanese cafe name
マイクロソフト
COFFEE「舞黒想風人」
インターネット
歌声喫茶「伊多音都」
さむい
談話室「再夢伊」
はらへった
@tily
tily / rubytter4twitter4r.rb
Created May 6, 2010 14:55
rubytter4twitter4.rb
require 'rubygems'
require 'oauth'
require 'rubytter'
require 'mechanize'
module Twitter
class Client
def initialize(config)
@config = config
@rubytter = OAuthRubytter.new(access_token)
@tily
tily / bot.rb
Created June 6, 2010 07:29
twitter bot library for lazy maintainers
#!/usr/bin/env ruby
require 'tokyotyrant'
require 'rubygems'
require 'oauth'
require 'pit'
require 'json'
class Bot
include TokyoTyrant
require "rubygems"
require "highline"
require "mechanize"
hl = HighLine.new
email = hl.ask('E-mail: ')
password = hl.ask('Password: '){|q| q.echo = '*'}
list = []
@hitode909
hitode909 / always_140.rb
Created June 26, 2010 02:39
termtterで必ず140文字投稿する
module Termtter::Client
register_hook(
:name => :always_140,
:points => [:modify_arg_for_update],
:exec_proc => lambda {|cmd, body|
body.chomp!
max = 140
len = body.split(//).length
mod = max % len
ext = (0...len).to_a.sort_by{ rand }.take(mod)
// ==UserScript==
// @name Togetter: Block all users
// @namespace http://lowreal.net/
// @include http://togetter.com/li/*
// @require http://github.com/cho45/jsdeferred/raw/master/jsdeferred.userscript.js
// @require http://gist.github.com/3239.txt#createElementFromString
// ==/UserScript==
// https://gist.github.com/454574
(function () { with (D()) {
@hitode909
hitode909 / termtter-bashodb-itdajare.rb
Created July 22, 2010 09:46
termtterから#itdajare投稿する
require 'uri'
require 'open-uri'
require 'nokogiri'
require 'nkf'
module BashoDB
def self.get
db.choice
end
module RSpec
module Core
module Formatters
class ProgressFormatter
alias _example_failed example_failed
def example_failed(example)
_example_failed(example)
system 'say "failed" &'
system 'growlnotify -p 1 -t "spec failed" -m "failed" &'
system 'glitch'