This file contains hidden or 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 'mechanize' | |
require 'pit' | |
config = Pit.get("keiojp",:require => { | |
"account" => "Your keio.jp account", | |
"password" => "Your keio.jp password" | |
}) | |
@agent = Mechanize.new |
This file contains hidden or 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
# http://estar.jp/.pc/_novel_view?w=13428686 を読む | |
require 'open-uri' | |
require 'yaml' | |
page = ARGV[0] || 1 | |
page.upto(121).each do |page| | |
data = YAML.load(open("http://estar.jp/api/get_novel_page_info?_=1336496080883&w=13428686&p=#{page}").read) | |
puts "======== #{data["subject"].gsub(/<.*?>/,'')} ========" | |
puts data["content"].gsub(/<.*?>/,'') |
This file contains hidden or 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
c=0;'abracatabra'.each_char{|e|e=='a'&&c+=1};puts c |
This file contains hidden or 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
# 65 bytes FizzBuzz code | |
(1..99).map{|i|puts"#{a=i%3<1?:Fizz:nil}#{i%5<1?:Buzz:a&&''||i}"} |
This file contains hidden or 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
javascript:(function(){var m=function(a){return parseInt(a)};var d=document,p=window.prompt,c=':',s=p("start?").split(c).map(m), e=p("end?").split(c).map(m);d.querySelector('select[name=Day]').value=(new Date()).getDate();d.querySelector('select[name=SHour]').value=s[0];d.querySelector('select[name=SMinute]').value=s[1];d.querySelector('select[name=EHour]').value=e[0];d.querySelector('select[name=EMinute]').value=e[1];d.querySelector('form').submit();})(); |
This file contains hidden or 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
#coding:utf-8 | |
require 'open-uri' | |
require 'nokogiri' | |
require 'MeCab' | |
a = Nokogiri::HTML(open('http://tenki.jp/')).css("#descriptionEntries").text | |
mecab = MeCab::Tagger.new | |
node = mecab.parseToNode(a) | |
b = [] |
This file contains hidden or 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
第0b1001回アレ会 1/29無限肉参加(予定)のひと一覧 | |
1VQ9 | |
TakumiBaba | |
ancooo | |
kani_b | |
kanojikajinoBOT | |
kurokobo | |
myatsumoto | |
naotaco | |
nostalgia |
This file contains hidden or 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
unmap J | |
unmap K | |
unmap b | |
map e nextTab | |
map w previousTab | |
unmap t | |
map n createTab | |
map d removeTab | |
map u restoreTab | |
unmap x |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>brainf*ck</title> | |
<script> | |
var ptr = 0; | |
var memory = []; | |
var code = ""; | |
var ptrIncr = />/; |
This file contains hidden or 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
慶應義塾大学湘南藤沢キャンパス | |
教務担当御中 | |
政策・メディア研究科修士課程1年の××××と申します。 | |
SFCのお問い合せページ(http://www.sfc.keio.ac.jp/directories.html)からこの件について教務担当が適切な窓口であると判断したのですが、もしWebサイトについて担当されていないのであれば、担当部署に転送していただきたく存じます。 | |
SFCの講義案内サイト(http://vu8.sfc.keio.ac.jp/course2007/summary//class_list.cgi)について問い合わせいたします。このページから講義のリストを表示しようとボタンを押した場合、通常であればページ下部にリストが追加された画面が表示されるのですが、Google ChromeというWebブラウザではこのリストを表示することができません。 | |
こちらでその原因を調査したところ、授業の検索結果ページのヘッダに<meta http-equiv="refresh" content="0; url=#1">という記述が追加されてしまい、これがブラウザによって解釈が違うためにこのような事態になっていることがわかりました。 | |
これはページ下部に表示される授業のリストまでスクロールするために挿入されているものと考えられますが、Google Chromeでは「ページの再読み込み」が同時に行われてしまい、そのさいにGETメソッドが使われてしまうため、POSTメソッドで送信されていた検索条件が消えてしまう模様です。 |