Skip to content

Instantly share code, notes, and snippets.

View sorah's full-sized avatar

Sorah Fukumori sorah

View GitHub Profile
require 'rubygems';require 'mechanize'
(puts "usage: g91twitter2tab.rb (csv|tween)";exit) if !ARGV[0]
agent = WWW::Mechanize.new;agent.get('http://generation1991.g.hatena.ne.jp/keyword/%E3%83%A1%E3%83%B3%E3%83%90%E3%83%BC%E4%B8%80%E8%A6%A7')
twits = [];agent.page.search(".section/table/tr/td[3]/a").each{|x|twits << x.inner_text}
if ARGV[0] =~ /csv/
twits.each{|x| print x+","}
else
twits.each do |x|
text = <<EOF
<FiltersClass>
#-*- coding: utf-8 -*-
require 'rubygems'
require 'open-uri'
require 'rss'
require 'wsse'
require 'net/http'
require 'kconv'
##################
def post_mixi(title,summary,mail,pass,memid)
site = 'mixi.jp'
" yet another mixi.vim - support for japanese cozy social networking system
" Author: sorah <http://codnote.net>
" [REQUIRE]
" -library wsse (gem install wsse)
" [NEW POST]
" :Mixi
" title is line 1.
" then, run :PostMixi to post.
" [POST]
" :PostMixi
#-*- coding: utf-8 -*-
require "rubygems"
require "mechanize"
require "kconv"
def get_members()
agent = WWW::Mechanize.new
ary = []
page = agent.get("http://generation1991.g.hatena.ne.jp/diarylist")
while page.at(".next")
page.search(".refererlist/ul/li/a").each{|m| ary << m["href"].gsub("/","")}
#!/usr/bin/ruby
#-*- coding: utf-8 -*-
require "rubygems"
require "mechanize"
require "hatenaauth.rb"
require "cgi"
####config
params = {
:api_key => "ここにapiキー",
:secret => "ここに秘密鍵"
function! Scouer()
echo len(filter(readfile($MYVIMRC),'v:val !~ "^\\s*$\\|^\\s*\""'))
endfunction
command! Scouter :call Scouter()
" これでもうごくのよ。↓
" command! Counter :echo len(filter(readfile($MYVIMRC),'v:val !~ "^\\s*$\\|^\\s*\""'))
@sorah
sorah / lingr.rb
Created September 14, 2009 00:24
#-*- coding: utf-8 -*-
=begin
lingr.rb
writed by Sora Harakami <sora134@gmail.com>
http://soralabo.net/
http://codnote.net/
=end
require "net/http"
require "simple-json.rb"
require "thread"
@sorah
sorah / lingr.rb
Created September 15, 2009 01:41
#-*- coding: utf-8 -*-
=begin
lingr.rb
Author:: Sora Harakami <sora134@gmail.com>
License:: MIT License (X11 License)
http://soralabo.net/
http://codnote.net/
========================
"viとの互換モードをオフ
set nocompatible
"行数表示
set number
"エンコードetcを設定
set enc=utf-8
set fencs=iso-2022-jp,euc-jp,cp932
set ambiwidth=double
18:36 Glass_saga: うひょひょひょひょー
18:37 Glass_saga: あへあへあへあへ
18:37 某紅い人: Glassついに壊れましたか><
18:37 Glass_saga: 壊れてなんかないぴょーん♪
18:37 某紅い人: 彼女でもできましたか
18:37 Glass_saga: ふへへへっへへへへへ
18:38 Glass_saga: 出来るわけねーだろw
20:07 某紅い人: glass本当にどうしてしもうたの…
20:07 Glass_saga: ※※※※
20:07 Glass_saga: I'm fine thank you.