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
// ==UserScript== | |
// @name hatena diarylist otsune mode | |
// @namespace http://rails2u.com/ | |
// @description 観測範囲が狭い人向け | |
// @include http://d.hatena.ne.jp/diarylist | |
// ==/UserScript== | |
(function() { | |
const CONTAINER_XPATH = '//div/ul[@class="list-plain"]'; | |
const LIST_XPATH = '//div/ul[@class="list-plain"]/li'; |
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 'rubygems' | |
require 'active_support/core_ext/numeric/time' | |
require 'active_support/cache' | |
require 'addressable/template' | |
require 'net/http' | |
require 'xmlsimple' | |
module MyTumblr | |
extend self |
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%20profile=$(%27.profile-photo%27)[0];var%20match=profile.src.match(/profiles\/profile_(\d+)/);var%20id=match[1];location.href=%27http://instagram.mitukiii.jp/user/%27+id;})(); |
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 'nokogiri' | |
require 'time' | |
module Evernote | |
def self.load_file(path) | |
doc = Nokogiri.XML open(path) | |
parse_document doc | |
end |
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
<html> | |
<head> | |
<script> | |
var search = function(query) { | |
var s = document.createElement('script'); | |
var q = encodeURIComponent(query); | |
s.src = 'http://search.twitter.com/search.json?callback=oncomplete&lang=ja&q=' + query; | |
document.getElementsByTagName('head')[0].appendChild(s); | |
}; | |
var oncomplete = function(json) { |
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 'spec_helper' | |
describe IndexController do | |
describe 'GET "popular"' do | |
context :html, :response do | |
before { get :popular } | |
subject { response } | |
it { should be_success } | |
end |
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
RspecRailsSample::Application.routes.draw do | |
get "/" => "index#index", as: :index | |
get "/user/:id(/max_id/:max_id)" => "index#user", as: :user | |
post "/find" => "index#find", as: :find | |
end |
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
# encode | |
defutf8 on | |
defkanji utf-8 | |
encoding utf-8 utf-8 | |
defencoding utf-8 | |
# set term | |
term xterm-color | |
# no start up message |
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 'rubygems' | |
require 'rubytter' | |
require 'yaml' | |
OAUTH_PATH = "*** oauth yaml path ***" | |
oauth = YAML.load_file(OAUTH_PATH) | |
consumer = OAuth::Consumer. |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
## task_notify はタスクを登録・通知するためのシンプルなスクリプトです。 | |
## | |
## 使い方: task_notify [options] | |
## | |
## タスクを登録し、指定時間後にGrowlで表示することが出来ます。 | |
## $ task_notify --new-task 牛乳買いに行く,東京ストアに牛乳1L2つ買いに行く,1.hours | |
## 上記のようにコマンドを実行することで1時間後に通知するようタスクを登録することが出来ます。 | |
## 時間は 1.hour+30.minutes のように書くことが出来ます。 |